Everyone learns in different ways. And learning to program is one of those things that is unique to the individual. I learned by reading books and researching online, then applying that in sample programs. One of the first things you need to decide is the programming language you want to become proficient in.
There is a lot of debate in the software world about what language is best for each application, but I still feel that some languages are better for learning than others. For example, C# is a great language because it is so forgiving and errors are much more clear and concise. C++ is a powerful language, but it tends to have more obscure errors and allows a much lower level access to system resources. With that said, the language is mostly irrelevant as most high level languages have similar constructs (loops, variables, functions) and once you learn one language, it is very easy to pick up other languages.
For this series, I’ll be using C# and what we refer to in the software world as pseudocode. Pseudocode is basically a way to write the logic of the program in a way that is not language specific.
One final note before we get started. At first, I won’t be digging into code, and this may feel frustrating. However, I feel it’s important to understand the concepts before we try to make something actually run.
What is a program?
Let’s begin by answering the question of: “What is a program?” A computer program as defined on Wikipedia is “a sequence of instructions written to perform a specified task with a computer.” Simply put, it is an ordered list of things to do. If I had to write a program for my son to make a peanut butter and jelly sandwich I may write a pseudocode program that looks something like this:
Now, back to the definition. We have a sequence of instructions written to perform a specified task, but this is in a format that a human can read. So the last part of the programming process is to compile this code into something a computer can read. The compiler will take these instructions and turn them into a very low level machine code that isn’t readable by a human, but it is very efficient for the computer to process.
In short, that is all there is to programming! In the next part we’ll start talking about tools of the trade. There are a multitude of tools out there and deciding what to use for any given task can be overwhelming.
If there is a particular topic you would like to see discussed, please don’t hesitate to ask and I’ll try to answer it in comments or as it’s own post if the response demands the space.