The Tasks of Software Development

I recently started a new programming project. For me its new in a few different ways. Its the first job I have had with or for a local company in about 3 years, Its the first project I have worked on (for money) that was small enough for me to complete by myself really in maybe 10 years, and its the first serious Web development project I have done ever. I’m using Django and so far I’m mostly loving it. I would say 95% of my troubles have more to do with either me not undertanding some web technology, or me just not being able to believe that some web technology sucks as bad as it does.

All of this has gotten me to think more about what this thing we call programming actually involves. What does it take to go from the client’s needs to a working product? In short, what do they pay me for? I think there are 3 main areas of work that go on in my head or get commited to my subversion repository.

  • Knowing what you want to make
  • Construction of an abstract Model
  • Translating this Model into code

These three tasks are the major parts of any software project and are the tasks we sign up for as programmers. Some things to point out about the list. While it does seem like the tasks are in order that you need to accomplish them the truth of course is that often you iterate through these steps a few times. Its not something to fear but something to prepare for. Deciding everything up front is overrated and unless you have a boss/client who can never make up thier mind you will converge on something better if you start out thinking flexibly. If you do have a boss/client who can never make up your mind a detailed spec won’t help you in the end anyway.

Also its good to realize that moving down the list moves you into lower and lower value territory. If you are only good at “writing code” then you have basically limited your ability to make money. People who can work higher up in the list are less likely to have thier jobs sent to India and more likely to be able work as independents or entreprenuers.

Knowing what you want to make is maybe the most squishy to define of the three. Depending on the type of project you are doing it could mean different things and its very hard to know if you have done it correctly which is a big reason why you have to be open to iteration of the whole process. If your project is to write a program to convert jpg files into png files then you have a pretty good chance of nailing this part right off. You might even be able to write the tests first etc. If instead your project is to build a social network platform which is tailored to astronomers who want to share imagery and other observational data, you might have to spend some time on this before you even know where to start. You might think of this part as Design and you might think that this work is to be done by Designers and its the programmers job to wait till they are done and pick it up from there. It might be like that where you work but if it is then I’m glad that I don’t work with you.

Construction of an Abstract Model involves working out (in your head, on paper, on a whiteboard, or anyway you can) the basic concepts or building blocks your application will contain and how they will work together. How it is going to solve the problem. At this point you should be thinking about which things are going to be easy and which ones are going to be hard and what you are going to do if you are wrong about either of those assumptions. This too is essentially a design task but one that requires a more logical and frankly conservative approach. Over design in this stage can often be worse that over-design knowing what you want to make stage because sometimes its easy to just cut a few features than it is to rework your whole platform.

Translating this Model into code should be the easiest part but there are often difficulties in translating from the Abstract Model based on an inability to adequately describe this model to the people doing the actual coding. This is the key reason why small teams are so effective because usually the people who design the Model also code it up so nothing is lost. Even if you were diligent about specifying the model, its VERY hard to capture intention behind the model so you are stuck with either something under specified or over rigid. Your best hope is lots of clear open communication, preferably with food.

We are almost ready to talk about actually writing code but first I’m going to divide this task into its own little hierarchy of skills etc which are needed to do this well. Starting with the hardest and working our way down the list to the easiest.

  • Coding so it must work
  • Learning the platform
  • Mindless Typing

Coding so it must work means being able to determine the simplest most direct way in code to express what you need to do. Good programming means thinking about how your program might fail and not just how it will work. If there is an Art to coding it lies here in the ability of some people to produce clean, beautiful code while others seem to be throwing statements into the editor like some C++ version of magnetic poetry. Think hard about how your code can fail make sure you know what will happen in every case. No matter how smart you are, this is hard so your best option is try to keep the number of code paths (including exceptions) down. Less is almost always more. Simple pure expression of an idea can still make me smile as I read through code.

Learning the platform might not be considered programming per se but its what programmers spend a fair amount of time doing these days. It used to be that all you needed to know was libc, but for my current project I need to understand HTTP, django, DOM, reportLab, CSS, python, MySql and Javascript. The growth of the importance of platform over the last 20 years has led to these long lists of skills on resumes and job postings. I don’t put much stock in those lists. I have a few predjudices against people who have never used c, c++ or a simlar bare metal kind of language but all in all I think most people who can work well with one platform can learn another. They will be slower at first but they will eventually get back to thier normal speed. Almost everyday I learn some new thing about django or Javascript that makes me more productive and opens up new possibilities.

Mindless Typing is the lowest level of programming and one which has been the most helped with tools like macro processors, IDE, etc. What I mean by this is that some parts of programming are just basically brain dead entering characters into the keyboard for something you have probably done 100 times before. It could also just be something repetitive you need to do because your environment requires you to repeat things or you are refactoring some simple operation but you need to change it 10 places and you couldn’t make a good macro for it. The DRY principle and modern dynamic languages have reduced alot of the need for this and more and more tools have become available. I’m more productive in python than C++ even though I know C++ way better. I know that some of it is due to garbage collection and a better built in library but alot if just comes down to the fact that I don’t have to do so much typing.

The lowest form of Mindless Typing is trial and error. This is what you are down to when you are just typing in different numbers in your CSS file hoping something will make the damn image line up the same in both FireFox and Internet Explorer. Not that I am ever be reduced to doing something like that…


Posted

in

by

Tags:

Comments

2 responses to “The Tasks of Software Development”

  1. jonathan peterson Avatar

    If you’re going to resort to mindless typing, you may as well try to automate it. How about a greasemonkey script that lets you select a page element, which it then randomly changes every 10 seconds.

    As soon as it looks ok, you can click on it to make it stop changing.

  2. peter hargreaves Avatar
    peter hargreaves

    Although the reference to Django was almost in passing in your article, I had a quick look at Django package. Once on the site I saw that dreaded term “template language”… *sigh* It brought back memories of the times I dabbled in such CMS template languages – even to the point of considering “hmmm, perhaps I could write my own templating language, afterall, I know what I need in such a beast.” And then I ran across this enlightening article:

    “PHP templates: Smarter sans Smarty” – http://www.bigsmoke.us/php-templates/smarter-sans-smarty/

    Although this article refers to SmartyPHP CMS and the PHP language, I thought it quite applicable to other CMS’ and scripting languages.

    Using a perfectly good scripting language to create a less powerful scripting language… are those the sounds of wheels being reinvented I hear?

    Anyway, food for thought.

    Cheers!

Leave a Reply

Your email address will not be published. Required fields are marked *