Cool software design insight #4

Mathematicians and philosophers often make terrible programmers. They also tend to write gibberish even in English. (Ok, I do not know if it is a fact, but stay with me.)

A terrible way of programming is to try to hold the entire problem in your head and to put it into code in one shot. Why? Because you are almost certainly overestimating your brain. Your mind can only cope with few parameters at a time.

Here is how you have to program:

  • If you have the luxury to start fresh, start small. Otherwise, make sure you understand and respect the code you start with.
  • Identify specific changes you want to implement. Small changes! Then implement them. Then test them!

You should never redesign working software from the ground up without incremental testing. Never. Even if you work alone.

Interestingly, I also write my papers incrementally, fixing small things one after the other. No other way works for me.

Published by

Daniel Lemire

A computer science professor at the University of Quebec (TELUQ).

One thought on “Cool software design insight #4”

  1. Excellent advice!

    I used to have a real tendency to over-complicate my software projects (I’m a scientist who programs). I’ve now largely beaten this out of myself, but it still lurks from time to time.

    I find a reasonable rule to use for writing software “make it as simple as it can possibly be”, then wait for this approach to become inadequate. Strikingly, it often fails to do so 🙂

Leave a Reply to Rich Cancel reply

Your email address will not be published. The comment form expects plain text. If you need to format your text, you can use HTML elements such strong, blockquote, cite, code and em. For formatting code as HTML automatically, I recommend tohtml.com.

You may subscribe to this blog by email.