about img
blogger img

scotts posts image

UnderPaidLoveMonkis posts img


Zed Shaw’s code review checklist

Scott Rippee @ 8:00 pm January 6th, 2007

I was reading through an interview of Zed Shaw (Mongrel developer extraordinaire) and liked his personal code review steps before a release. He looks for:

  1. “missed assertions” — Unstated assumptions about inputs and outputs.
  2. “missed else” — Logical branches that don’t cover all test domains.
  3. “will it stop” — Looping errors that will cause classic infinite loops or short loops.
  4. “check that return” — Return values that aren’t dealt with properly (which are really assumptions about other inputs and outputs).
  5. “unexpected exceptions” — Exceptions are pretty darn evil since they’re rarely documented.
  6. “simply readable” — Replacing clever code with readable simple code where possible, and documenting complex code so it can be reviewed by others.

Many would benefit from additional focus on 1 and 6. Myself, I need to start putting assertions to greater use.

link to interview

Leave a Reply

Subscribe without commenting