Code Life: Results May Vary
Welcome to 2013. A point in history where our lives revolve around code. Whether you are writing it or not, it is highly likely that your livelihood depends on it. Common tasks such as paying bills, sending emails, research, and more than likely the things you do at work… all use software!
So where is all of this going? Anywhere you are willing to take it. While programming is obviously not for everybody, you should at least have some understanding on how it works. That is what this article is all about, the concept of programming.
As human beings we accept input/instructions natively and we can process that command with very little input. For instance, if I were to ask you to write your name on a piece of paper, you should have no issues completing this request. However, telling a computer to write your name on a piece of paper is like telling your dog to write a symphony… it’s not going to happen.
Computers need detailed instructions on how to accomplish a task. As an example we will walk through the steps of opening a door:
- Check to see if the door is open
- If the door is open, no action is necessary
- If the door is closed,check to see if the door is locked
- If the door is unlocked, turn the doorknob and push the door open
- If the door is locked, check to see if a key is required
- If no key is requires, unlock door, turn the doorknob and push the door open
- If a key is required, find the correct key, insert the key, turn the key, remove the key, turn the doorknob and push door open
- If a key is required and you do not have the correct key, knock on the door and wait
I could have made this list of instructions much more detailed, but I think that is enough to get the point across. Have you ever had to put that much thought into opening a door? I sure hope not. The good news is, is that once a program to open a door is written, it can then be applied to any door. Of course, you would have to add in more instructions to include sliding doors, folding doors, etc…
Thanks to modern programming languages writing actual code is not much different than the pseudocode (the list of instructions to open a door) we just wrote earlier.
Now that you know how to prepare instructions for a computer, the next barrier you will need to overcome is the language barrier. I will save you the pain of taking this post into further detail, but I will continue to post on the topic. If you plan to learn how to code, I suggest you keep practicing pseudocode (writing detailed instructions) when you get the time.