Beginning Programming All-in-One For Dummies
eBook - ePub

Beginning Programming All-in-One For Dummies

  1. English
  2. ePUB (mobile friendly)
  3. Available on iOS & Android
eBook - ePub

Beginning Programming All-in-One For Dummies

About this book

Let there be code!

Beginning Programming All-in-One For Dummies offers one guide packed with 7 books to teach you programming across multiple languages. Coding can seem complex and convoluted, but Dummies makes it simple and easy to understand. You'll learn all about the principles of programming, algorithms, data structures, debugging programs, unique applications of programming and more while learning about some of the most popular programming languages used today. Move confidently forward in your computer science coursework or straight into the workforce. You'll come away with a rock-solid foundation in the programming basics, using data, coding for the web, and building killer apps.

  • Learn the basics of coding, including writing and compiling code, using algorithms, and data structures
  • Get comfortable with the syntax of several different programming languages
  • Wrap your mind around interesting programming opportunities such as conducting biological experiments within a computer or programming a video game engine
  • Develop cross-platform applications for desktop and mobile devices

This essential guide takes the complexity and convolution out of programming for beginners and arms you with the knowledge you need to follow where the code takes you.

Information

Publisher
For Dummies
Year
2022
Print ISBN
9781119884408
Edition
2
eBook ISBN
9781119884422
Book 1

Getting Started with Programming

Contents at a Glance

  1. Chapter 1: Getting Started Programming a Computer
    1. How Computer Programming Works
    2. The History of Computer Programming
    3. Figuring Out Programming
  2. Chapter 2: Different Methods for Writing Programs
    1. Spaghetti Programming
    2. Structured Programming
    3. Event-Driven Programming
    4. Object-Oriented Programming
    5. Using Protocol-Oriented Programming
    6. Design Patterns
  3. Chapter 3: Types of Programming Languages
    1. Your First Language
    2. Curly-Bracket Languages
    3. Artificial Intelligence Languages
    4. Scripting Languages
    5. Database Programming Languages
    6. Comparing Programming Languages
  4. Chapter 4: Programming Tools
    1. Choosing a Compiler
    2. Finding an Interpreter
    3. Compiling to a Virtual Machine
    4. Writing a Program with an Editor
    5. Fixing a Program with a Debugger
    6. Saving Time with Third-Party Components
    7. Optimizing a Program with a Profiler
    8. Managing Source Code
    9. Creating a Help File
    10. Installing a Program
    11. Dissecting Programs with a Disassembler
Chapter 1

Getting Started Programming a Computer

IN THIS CHAPTER
Bullet
Understanding how computer programming works
Bullet
Diving into the history of computer programming
Bullet
Discovering programming
Believe it or not, if you can write a recipe on an index card, you can program a computer! At the simplest level, computer programming is nothing more than writing instructions for a computer to follow, step-by-step. The most important part of programming isn’t knowing how to write a program or how to use a particular programming language, but knowing what to create in the first place.
Some of the most popular and useful computer programs were created by people who didn’t have any formal training in math or computer science. Dan Bricklin invented the spreadsheet while studying for his MBA at Harvard. Scott Cook, who worked in marketing and product development at Procter & Gamble, created the popular money-management program Quicken after hearing his wife complain about the tedium of paying bills. Nineteen-year-old Shawn Fanning created Napster, the first peer-to-peer file-sharing network, after hearing a friend complain about the difficulty of finding his favorite songs on the Internet. Game developer Dona Bailey wanted to create a video game that would appeal to both men and women; as the only woman working at Atari’s coin-op division, she created the video game Centipede, which became Atari’s second best-selling coin-op game.
The point is that anyone can figure out how to program a computer. What’s more important than knowing how to program a computer is knowing what to do with your programming skills. As Albert Einstein said, “Imagination is more important than knowledge.” After you have an idea for a program, you can use programming to turn your idea into reality.

How Computer Programming Works

Computer programming is nothing more than problem solving. Every program is designed to solve a specific problem. The more universal the problem (calculating formulas in a spreadsheet, managing your money, searching for music files over the Internet, or keeping people amused playing a game creating virtual buildings), the more useful and popular the program will be.

Identifying the problem

Before you even touch a computer, identify the specific problem you want the computer to solve. For example, spreadsheets eliminate the tedium of writing and calculating formulas manually. Word processors make editing and formatting text fast and easy. Even video games solve the problem of challenging people with puzzles, obstacles, and battles.
Although the most popular programs solve universal problems, literally thousands of programs are designed to solve specific problems in niche markets, such as hotel reservation software, construction billing and invoice management programs, and dental office management programs. If you can identify a problem that a computer can solve or simplify, you have an idea for a computer program.
Remember
You must know exactly what you want your program to do before you start designing and writing it. One of the most common reasons programs fail is because the program doesn’t solve the right problem that people really need.

Defining the steps

After you know what you want your program to do, you need to define all the steps that tell the computer how to solve that particular problem. The exact steps that define how the program should work is called an algorithm. An algorithm simply defines one of many possible ways to solve a problem.
Remember
There’s no single “best” algorithm for writing a program. The same program can be written in a million different ways, so the “best” way to write a program is any way that creates a useful, working, and reliable program as quickly as possible. Anything else is irrelevant.
Knowing what you want the computer to do is the first step. The second step is telling the computer how to do it, which is what makes programming so difficult. The more you want the computer to do, the more instructions you need to give the computer.
Think of a computer program as a recipe. It’s easy to write a recipe for making spaghetti. Just boil water, throw in the noodles until they’re soft, drain, and serve. Now consider a recipe for making butternut squash and potato pie with tomato, mint, and sheep’s milk cheese from Crete. Not as simple as boiling water to make spaghetti, is it?
The same principle holds true for computer programming. The simpler the task, the simpler the program. The harder the task, the bigger and more complicated the program. If you just want a program that displays today’s date on the screen, you won’t need to write many instructions. If you want to write a program that simulates flying a space shuttle in orbit around the Earth, you’ll need to write a lot more instructions.
The more instructions you need to write, the longer it takes and the more likely you’ll make a mistake somewhere along the way.
Remember
Ultimately, programming boils down to two tasks:
  • Identifying exact...

Table of contents

  1. Cover
  2. Title Page
  3. Table of Contents
  4. Introduction
  5. Book 1: Getting Started with Programming
  6. Book 2: Programming Basics
  7. Book 3: Data Structures
  8. Book 4: Algorithms
  9. Book 5: Web Programming
  10. Book 6: Programming Language Syntax
  11. Book 7: Applications
  12. Index
  13. About the Author
  14. Advertisement Page
  15. Connect with Dummies
  16. End User License Agreement

Trusted by 375,005 students

Access to over 1.5 million titles for a fair monthly price.

Study more efficiently using our study tools.

Frequently asked questions

Yes, you can cancel anytime from the Subscription tab in your account settings on the Perlego website. Your subscription will stay active until the end of your current billing period. Learn how to cancel your subscription
No, books cannot be downloaded as external files, such as PDFs, for use outside of Perlego. However, you can download books within the Perlego app for offline reading on mobile or tablet. Learn how to download books offline
Perlego offers two plans: Essential and Complete
  • Essential is ideal for learners and professionals who enjoy exploring a wide range of subjects. Access the Essential Library with 800,000+ trusted titles and best-sellers across business, personal growth, and the humanities. Includes unlimited reading time and Standard Read Aloud voice.
  • Complete: Perfect for advanced learners and researchers needing full, unrestricted access. Unlock 1.5M+ books across hundreds of subjects, including academic and specialized titles. The Complete Plan also includes advanced features like Premium Read Aloud and Research Assistant.
Both plans are available with monthly, semester, or annual billing cycles.
We are an online textbook subscription service, where you can get access to an entire online library for less than the price of a single book per month. With over 1.5 million books across 990+ topics, we’ve got you covered! Learn about our mission
Look out for the read-aloud symbol on your next book to see if you can listen to it. The read-aloud tool reads text aloud for you, highlighting the text as it is being read. You can pause it, speed it up and slow it down. Learn more about Read Aloud
Yes! You can use the Perlego app on both iOS and Android devices to read anytime, anywhere — even offline. Perfect for commutes or when you’re on the go.
Please note we cannot support devices running on iOS 13 and Android 7 or earlier. Learn more about using the app
Yes, you can access Beginning Programming All-in-One For Dummies by Wallace Wang in PDF and/or ePUB format, as well as other popular books in Computer Science & Object Oriented Programming. We have over 1.5 million books available in our catalogue for you to explore.