This is a very basic deconstruction: instead of “programming,” we now have three subconcepts to work with: Input—information you use to execute a process. Process—a series of steps the program takes, given the input. Output—the end result of the program.
This breakdown is much more useful. “Writing a computer program” means defining what information you’re starting with, defining a series of steps that describes exactly what the computer will do with that input, and defining the output the computer will return when the program is finished running. Think of a flowchart, which appears to be a useful mental hook for how programs work. You start the process with certain inputs. Along the way, you take certain actions when specific conditions are true or false. The process ends when you reach the end of the flowchart, and you’re left with the output: the end result of the complete process the flowchart describes. Creating a computer program seems to be a different way of doing the same kind of thinking you do when you create a flowchart. You ask the same sorts of questions: What am I starting with? What happens at the beginning of the process? What happens after that? After that? When does the process end? What do I have when the process is done? That’s basic programming, really. Defining inputs. Setting variables. Creating processes that lead to the desired outputs. Thinking through those processes like a flowchart, adding conditionals and exceptions as necessary. If all goes well, you supply the inputs, run the program, and get the desired output. This is a massive oversimplification of a very complex activity, but it’s detailed enough to be useful for someone new to programming. By deconstructing programming in this way, it’s easier to know where to start. The First 20 Hours: How to Learn Anything . . . Fast! by Josh Kaufman Comments are closed.
|
Click to set custom HTML
Categories
All
Disclosure of Material Connection:
Some of the links in the post above are “affiliate links.” This means if you click on the link and purchase the item, I will receive an affiliate commission. Regardless, I only recommend products or services I use personally and believe will add value to my readers. I am disclosing this in accordance with the Federal Trade Commission’s 16 CFR, Part 255: “Guides Concerning the Use of Endorsements and Testimonials in Advertising.” |