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:
- “missed assertions” — Unstated assumptions about inputs and outputs.
- “missed else” — Logical branches that don’t cover all test domains.
- “will it stop” — Looping errors that will cause classic infinite loops or short loops.
- “check that return” — Return values that aren’t dealt with properly (which are really assumptions about other inputs and outputs).
- “unexpected exceptions” — Exceptions are pretty darn evil since they’re rarely documented.
- “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.



