Programmers • Gated Logic • nevali.net

Many people have said it before me, and I doubt I’ll be the last:

Programming is not about writing code.

Programming is about reading.

In a small organisation, two things will typically happen:

  1. Long-term projects get assigned to the more senior developers
  2. Everybody looks to the more senior developers for answers

The mistake a lot of people make is believing the two are necessarily related (“oh, they only ask you because you’re that’s your project”). Unless your whole business centres around developing an entire platform from scratch, with no legacy baggage, there is always code that nobody at your organisation wrote or actively maintained. It doesn’t matter whether it was written by third parties, or by people who have left—or even if it was written by somebody who’s away on holiday. The senior developers are in no better a position to be able to solve your problem than you are, except that they’ve had more practice at reading source code. That’s all there is to it.

Sometimes, yes, you might be asking about something they did write, but unless they wrote it or performed some non-trivial update within the past fortnight or so, they’re going to have to read it just the same as though somebody else had written it.

The key skill of a programmer is the ability to read code and comprehend it. Senior programmers are not, by definition, any better at doing this than more junior programmers. This means that asking them for help is by no means guaranteed to do anything except put them in a situation where they have to find out the answer to your problem, using exactly the same methods that you should be using, when they should be working on something else.

Now, discussion is good. Bouncing ideas and issues off one another is something developers regularly do, and for the better. Looking at a piece of code for 30 seconds, giving up and asking for help is different. That’s a case of not being able to do your job.

Fixing or modifying code other people wrote is something I have to do on a regular basis. It is, in fact, something virtually every developer has to do on a regular basis. Unless you’re working on adding pretty much self-contained modules to a wonderfully modular platform, given an hour scheduled to work on something, you’ll spend on average about half of that time reading what’s already been written. Spend significantly less than that, and there’s a very good chance you’re doing it wrong.