Snippet · Writing & changing code
Review it like a stranger would
A structured pass over code you're too close to.
Review this as if you'd just joined the project and have to maintain it: <paste> Answer in this order: 1. What does this do? If you can't tell in 30 seconds, say what's in the way. 2. What would surprise you here — anything doing something other than what its name suggests? 3. What breaks with unexpected input: empty, null, enormous, the wrong type, hostile? 4. What's not handled — errors swallowed, cases ignored? 5. What would you have to ask the author about? Then: the three changes with the best ratio of improvement to risk.
Question 5 is the useful one. Every item in that answer is something that only exists in your head, and it's the list of comments actually worth writing.