Programming Defined
There are many definitions for the term ‘programming’. When it comes to computers and technology, the definition you apply can vary drastically based on the specific context. I’ve encountered many definitions for the term over the past 25 years. Some are brief and simple, some are very detailed and complex. The real problem with the definition is that quite often, you have to determine which version of the term you’re referring to, and if you don’t really know that, then the definition may not make much sense. How do you know the context you need? There’s a whole layer of learning to do before you can even really determine that for yourself. There are a lot of excellent definitions out there, and I don’t want to make it sound like I have the best definition ever. What I do have, though, is one which will apply properly for the context of this site. This definition is one that I’ve found properly defines the material I will try to teach in the scope of this website.
The definition of programming I will give is: the act of planning and writing instructions in a language that a device can understand, that will provide a reliable, repeatable and logical solution for a problem you wish to solve with that device.
You might note that I used the word “device” in my definition, rather than “computer”. The reason for this is that while many people tend to think of this form of programming as applying specifically to computers, it actually can apply to many types of digital hardware. The devices can be used to perform tasks in a similar fashion to your average computer. You see, there are other devices that can function in a similar manner to a standard home computer and can be given a program to be run. These devices are not precisely the same as a computer. For one thing, they may not have an operating system in the same fashion as a typical computer. An example of a device you may read or hear about something called an Arduino. An Arduino is a digital device (some models are the size of a credit card) which is smaller but greatly adaptable for running logic instructions and controlling other physical devices, such as lights, motors, and more. They can read input from a user by attached buttons, switches and sensors. And the logical instructions are similar, conceptually, to an application on an ordinary computer.
Now before the concept gets to complicated, what I am saying is that there are many types of electronic devices that you can learn to write controlling logic for. If you learn to write the logic for what is traditionally referred to as a computer, you can do the same for these devices. The effort to learn for the new devices is minimal. And in the end, writing software for your typical computer is not terribly different than writing for these devices. Writing the instructions and logic in any of these cases is programming.
This article is introducing you to the concept and applying it first to a computer. However, it can also be applied to quite a few other devices, which I will cover in future articles.
What Is Programming? The First Part of the Definition
The first part of the definition of programming is planning and writing instructions in a language that a device can understand. We’ll talk about the other section of the definition in a bit. Let’s focus on this first part, though. Computers are bound (driven) by some fairly simple laws. The laws are really very explicit logic, generally best understood within the laws of mathematics. This tends to be a topic that turns off or terrifies some people. I used to be one of those people. You see, the very concept of math has sometimes been portrayed as being complicated, and some people learn a false fear of the idea of complex math. But realistically, even complex mathematics is really just about taking a problem and breaking it down into smaller, simpler parts, solving those simple parts and working our way back to the original problem, eventually substituting all the individual pieces to generate an answer.
Take for example, a math problem like this:
1 + 1 = ?
There’s no trick to this math equation. If you’ve come through 1st grade, you can add 1 onto 1 and know that the answer to this is 2. While some deeper math courses will go into WHY that’s the case (and yes, there are reasons for such courses), we can simply say that this is a mathematical fact. For now, that’s enough for us to understand. And probably this math won’t scare anyone at all. If I said:
1 + 2 = ?
Everyone would immediately say the value of the question mark is “3”. But the moment I write something like this:
x + y = ?
some people might start to worry a bit. Others would say “OK, what’s the value of ‘x’ and ‘y’?” Then I might introduce a more complicated problem. Something involving parenthesis, division… perhaps an trigonometric function like sine. As the problems introduced more and more complexity, or more functions, more people would start to get a bit worried, or panic, or outright say “I can’t do that!” Ultimately, however, learning to solve many of these problems is not really that complex. And instead, you only need to understand that writing computer programs is really not all that different. It’s still a process of taking a problem, and looking at what bits and pieces you need to solve, learning to write a solution for that portion of the problem, than applying it back in and combining the steps together until you have a completed solution. After 25 years of working in this line, that’s still my jobs, day-in and day-out. The problems are different, the solutions may require learning new techniques. There is always the possibility of taking something you’ve already known and realizing it can be applied in a new manner. And ultimately, it still comes back to “how do I solve this next step of the problem”. Learning to program isn’t so much about learning some crazy new concepts, but learning to ask the question “what do I do next?” And then learning how to seek the answer to that question.
What Is Programming? The Second Part of the Definition
The second part of our definition sad “that will probide a reliable, repeatable and logical solution for a problem you wish to solve with that device.” You can ignore that last little bit about “with that device” for now, just because we already have talked about how our definition can actually apply to more than your average computer. Let’s consider the “reliable, repeatable and logical solution for a problem” statement. This part of our definition might sound like it’s adding in extra work to the entire concept of programming before we even get started, but actually it results in the exact opposite. Take this example: if you’re in a some sort of automobile (let’s assume one with an automatic transmission) and are on completely level ground, if you have the card in drive, stepping on just the accelerator pedal means the car will accelerate in a forward direction, picking up speed, generally until you hit some maximum speed that the car can make. You know that pressing on the accelerator more means a more rapid acceleration, applying less pressure means that the car will accelerate at a lower rate, releasing the acclerator entirely generally means that the care will begin to decelerate until it is moving at a very slow speed or stops entirely. This is, of course, a simple example. In real life, driving involves a good deal of input, control and foresight. You have to take into consideration obstacles (either static or moving). You have to consider whether there is an incline or decline, different materials that make up the driving surface, the power of the car, the effects of wind and weather. And even more complications come into play. But the basic concept of how the accelerator is used results in a reliable, repeatable and logical solution to the problem of making your automobile move forward.
Programming works the same way: when you write instructions for whatever device you’re working with, progamming is about writing a set of logical rules that will solve a problem in the same way each time. The only challenge you really face is to write the simplest, best logic to solve an individual step of a much larger problem. That’s it. Really. Programming involves taking some problem and saying “what do I need to do next”. And then you write the simplest set of instrutions you can to solve that individual step. The instructions might have to allow for a few courses of action to be taken, but you learn over time to write your logic to cover each case you will encounter, and in the end make sure you’ve accounted for all of the cases possible. And be ready to make a mistake or miss a case. Because that happens. It happens a lot, even to experienced programming professionals who’ve been at their careers for the better part of half-a-century. Don’t worry, though. Along with learning to write the instructions, you’ll learn how to identify mistakes, make changes, and evaluate the results of what you do differently to keep refining your solution until it does precisely what you need. And once that’s done, the computer will run that logic in a predictable, reliable way, and give you the repeatable results you desire. Yes, that’s really what happens. Getting to that point is merely a matter of practice; like learning to drive an automobile without endangering yourself or others, and getting you to your desired destination.
Wait. What Else Is There?
You might be wondering at this point “If that’s all there is to it, why don’t more people become programmers?” The answer is pretty simple: are you willing to put in the time to learning to do this form of work well? Any field of work really requires some dedication to learn. Do you have the passion to work through some of the frustrations you’ll encounter? I won’t say that you won’t encounter challenges. I’d be lying if I did, and I’m not going to lie about this. The truth is that you really have to enjoy the process, to be OK with making mistakes, and to be willing to take the time to learn what mistakes you’re making and how to move beyond them. The reason why more people don’t become programmers, other than thinking it’s utterly beyond them, is that they don’t have enough passion for this field to learn that it’s really NOT beyond anyone to learn to code, even just for fun. Playing a guitar is challenging, but unless you have a severe physical limitation, it really comes down to how hard you’re willing to practice. Learning to play a musical instrument, learning to use artistic tools, learning how to program, learning how to perform CPR; all of these things have a common thread – you have to learn the process, and practice it – and pratice it more – and practice it even more – and then learn the next step, technique, tool, whatever. And you have to have a passion for the process; it has to be enough to overcome the frustration that learning to do anything comes with inherently.
So the real question isn’t “why don’t more people become programmers?” The real question is “am I will to apply myself diligently and regularly, and am I willing to keep challenging myself to go further, even if at times I make some (or a lot of) mistakes and have setbacks.” Or maybe the best way to put it is “Am I going to let frustrations or challenges stop me?” If you’re not going to let yourself get overwhelmed and quit at the first error, then I promise you, you can make a go of learning from this site.
Oh, One More Thing
With all the positivity I am trying convey here, I also want to point out one important fact: going into the field of programming, professionally, because you can make a lot of money is NOT a guarantee of success.
By that, I mean that I have often had friends and students who went into this field because it can pay well. That is certainly true. But the money will not actually get you through frustration on its own. You don’t overcome the frustrations by going into the field of programming to make money. You can make a lot of money in the field of programming because you enjoy the challenges and don’t get frustrated, and the true gain you feel is pride for solving complicated problems.
In the end, if you get frustrated with the field and don’t enjoy the work, you will not likely go far enough to develop the necessary skills to get a well-paid position.
On the other hand, if you seek out the challenges, and ultimately get your joy from solving them, then before long you may just find a well-paying position that rewards you with good pay, and that good pay will be icing on a cake of fulfillment from your career. It’s not really some unrealistic, idealistic mindset. It’s simple truth: if you don’t enjoy these challenges, the amount of money won’t ever seem worth it. And probably with good reason.