Code Review Review

Comments

[this is good]
Nice post.

I especially like the point about having unit tests instead of "running the code in your head."
We review all our code (of course, since code review is what we do), and we've found that this process works well:

1. Review the unit tests. Make sure they are complete but don't over-specify. A bug here means you probably don't even have to look at the code yet.
2. Review the method doc. Since the true behavior is now fresh in your head (you read the tests), it's easy and quick to verify that the doc is right.
3. Review the method, looking for things as in the first 1-9 above, not in the first 1-6. You don't need to check for method behavior since the tests work.

I also agree that static checking is vital. No need to waste a human's time on things that can be automated.

Thanks!

P.S. My blog about running a software company, and a little about code reviews.

Post a comment

Already a Vox member? Sign in

genman

About Me

genman
United States
Outdoor otaku - is this possible?

Neighborhood

Explore friends, family, friends & family, or entire neighborhood.

Archives