Does this ever happen to you? You finish coding something up and the very second before you become pleased with yourself you suppress that wonderful feeling and wrestle with the fact that coders aren’t exactly impartial when it comes to judging their own code. You realize you have two options. 1, you can accept the fact that a second pair of eyes can’t hurt and you can go around the office in search of that nonbiased someone who is willing to sit down, review your code and provide honest feedback. Or 2, you can say “to heck with it” and just move on to the next thing.
I’ll leave you with this – there is value in every code review. Whether it’s you, or the reviewer, or the project, someone/something is always better off because of a code review. Next time, don’t avoid a code review. And who knows? Maybe you’ll get that chance to be pleased with yourself after all.
Question: In my experience code reviews are held far too rarely and they turn into snooze sessions because you’re reviewing kilo-LOC.
Do you try to do lots of mini-code reviews instead so people can focus in and actually last through the whole review? The only problem here is that its sometimes hard to get everyone together for so many meetings.
Either way, Code Reviews are quite good, especially when you can ‘show off’ cool stuff you’ve done, then they’re actually fun!
@TJB, You nailed it. I prefer and suggest ad-hoc reviews which are focused on a current coding task. I prefer less formal, one-on-one code reviews which are initiated by the coder rather than big-meeting, mandatory reviews which are often scheduled by the powers that be. I believe the coder is best fit to decide WHAT is worth reviewing, WHEN it is worth reviewing and WHO would be best to perform the review.
The bottom line is I put the onus on the developer to get their code reviewed and how they go about it. With the coder calling the shots, I believe that reviews are more likely to happen, they will be comfortable and guaranteed to be worthwhile. This promotes what I think is ideal – reviews taking place often and throughout the project lifecycle. Otherwise, one finds themselves in the terrible situation as you mentioned – an unfocused, really-too-much-to-review, too-late-to-make-changes-anyway, end-of-the-project review with a terribly bored audience.
Many thanks for the question and I appreciate the conversation.
Its settled then, this will be my next mission @ work, propose new review procedure. Just gotta make a snazzy powerpoint, get a few laughs and hopefully they will all fall for it ; )
Thanx much! TJB
@TJB, How about that? And you already know the secret snazzy-powerpoint + few-laughs formula! You can’t lose. I can’t wait to read about the results on YOUR blog.