Code checklists

The best things in life are free smart and simple! As code checklists for example. I’m currently reading Bob Walsh‘s recent book Mirco-ISV – From Vision To Reality, which is a book about running your own Micro-ISV (independent/internet software vendor). Micro-ISV’s are often one-man companies, for example single developers producing and selling their own software. Early in the book Walsh talks about ‘developing the Micro-ISV way’, and this is where he gets into code checklists:

Using a code checklist is the easiest method of the lot. Go into Microsoft Word, write the half-dozen coding mistakes you’ve last made, print the document, and look at the list as you review the code you wrote today. See any familiar faces? Write down other ways you miss the mark as they crop up, and revise your code’s checklist.doc periodically. What you’ll notice over time is coding is just like spelling. You make certain coding mistakes repeatedly, but if you focus on them, you’ll make them less often. Just the process of checking my code against my private coding checklist identifies about half of the coding mistakes I make, especially those nasty increment-by-zero blunders and other simple errors. Give it a try! Strange I haven’t thought about this before, or done it before – but I haven’t. At least not that I can remember. I’ve just started doing it, so I don’t know how much it will pay off, but it looks like a good idea at least :) .. I’ve decided to use one checklist for each language I code in (e.g. java.txt, php.txt, javascript.txt, etc.) – as I code in multiple languages each day. In addition I think it could be a good idea to include functions and things I often forget that I have to look up way too often (like various string functions in JavaScript!).