The Ten Commandments of Programming

Which of these do you consider most important?  Or is there something I missed?

One thought on “The Ten Commandments of Programming

  1. Using braces as the first commandment, is a turnoff. It’s also language specific, and as such conflicts with the commandment about following the conventions of your language. I suggest to drop this.

    Following conventions of your language might not be possible if your team uses a non-standard variation. I think a commandment is too hard a rule for this. This should be a recommendation, not a commandment.

    Off by one is hardly commandment-grade. This is a problem of testing, which is already covered by another commandment.

    There’s a typo in “datatime”. And the point can be generalized to not reinventing the wheel.

    The items should be ordered by importance. In my opinion, this ordering for the first few would be better:

    – use source control, and do it right (small logical commits, feature branches, etc)
    – unit tests, and other automated tests as needed
    – read! Code Complete for all programmers, + the best book of your language (for example for Java, it’s Effective Java)
    – measure twice, cut once: don’t skip on requirements analysis
    – follow SOLID principles in OOP (google uncle Bob), design ADTs well (see chapter 6 in Code Complete)
    – make your functions functionally cohesive (see chapter 7 in Code Complete)
    – don’t ship crap (although, if you follow all the above, you won’t have crap to begin with)
    – be humble. The bug is almost never in the programming language/library/operating system. It’s almost always in your own damn code
    – find a code review buddy; expose your code to a broad audience and get criticized
    – teach

    Just off the top of my head. If I re-read chapter 33 in Code Complete I might have more to add.

    I hope this helps!

Leave a Reply