Sunday, September 30, 2007

What is a Computer Programmer?

Not terribly long ago, someone asked me what I did for a living. This person knew that my title is Software Engineer, and that I call myself a computer programmer, but didn’t know what I actually spend my days doing. Unfortunately, I couldn’t give a good answer immediately. Obviously I need to work on my elevator pitch. So, what does a computer programmer do anyway?

Computer programming is a complex, largely mental activity, which has elements of math, science, and art so how should I explain it? I can’t just describe the actual writing of software. That’s not all of what I do. Heck, with tasks like requirements gathering, design, documentation, and communications involved, the actual writing of programs is not even the majority of it. Plus, the physical artifact that we produce is called “code” and nobody outside of the field knows what code is anyway. Talking about tools is an even more labyrinthine dead end. The myriad environments we use to design, write, find and diagnose defects, and produce documentation for the software don’t tell the whole story either. Not to mention that attempting to describe them to a lay person leads to conversations dying under the weight of a thousand acronyms. Simply speaking about my current task also doesn’t tell the whole story. Programmers change tasks often as we complete things or discover (or are told about) defects. Even within a given task there are layers upon layers of smaller tasks.

Actually, I’ve read something that defines a computer programmer as a creator of layered abstractions. That’s both fancy and accurate, but it doesn’t really tell you anything. The Wikipedia definition (at the time of this writing) is nicely circular: “A programmer or software developer is someone who programs computers, that is, one who writes software.” So a programmer programs, and a software developer develops software. There’s no help for me there. The Software Engineering Body of Knowledge defines software engineering as “...the application of engineering to software.” Hmm. With all these circular definitions floating around, perhaps I should step back and look at the individual words involved instead of the term as a whole. Us programmers call breaking a big problem down into discrete steps “decomposition.” It’s not as smelly as the name might imply...

The first part of computer programmer is the computer. What is a computer exactly? Originally, computers were people hired to do math calculations. The technology that we now call a computer was first known as an electronic computer. Thus a computer is a machine for doing math. Folks that don’t know the internal working of a computer may find that to be ridiculously simple, but it’s totally accurate. Even your fancy modern PCs are nothing more than glorified calculators with some special attachments. One of the most fundamental things about computer programming that can separate those-who-can from those-who-can’t is a grasp of the implications of everything going on inside the computer being simply numbers. And the numbers aren’t even that complex. The physical machine can’t handle anything but integers within a certain range. It can’t do more than the most basic arithmetic and logical calculations. Most computers can’t do much more than add and subtract, multiply and divide, compare two numbers to see if one is greater than the other or if they are the same, and move numbers around. However, the average computer can hold and manipulate quite a large quantity of numbers. And it can fiddle with them very, very quickly. This gives us a place to start when thinking about what programmers do.

We’ve already read that a computer programmer programs a computer and figured out what a computer is, but what’s a program? This time around Wikipedia is a bit more helpful: “A computer program is a collection of instructions that describes a task, or set of tasks, to be carried out by a computer.” That seems simple enough, but the devil, as always, is in the details. If you think about the things you do with your computer, you may notice something. Things like checking your e-mail, looking at digital pictures, reading Schlock Mercenary on the Web, or writing rambling ‘blog posts don’t sound much like basic integer math do they? You need computer programs to tell the computer how to do those things. In fact, you need layer upon layer of computer programs, all slowly building up abstractions to transform trillions of numbers being shuffled around into “send an e-mail to my aunt.” Thus, computer programmers are the ones who create the instructions for the computer that allow it to bridge that gap.

What do I do for a living you ask? That’s a very good question! I help design and build the instructions that allow machines that are only capable of doing very simple math very quickly to be used for all sorts of practical applications. It’s an interesting and rewarding field to be in...