Code Review on the Brain

It looks like Peer Code Reviews are on the agenda for quite a few folks at Readify. Darren and I are working on the same engagement at the moment and he has instituted peer code reviews. I was a little hesitant at first because I’ve seen some code reviews come a monumental waste of time but Darren managed to carve out a process that is not only efficient but will probably improve everyones coding skills – mine included.

On Friday I sat down with Darren so he could walk me through the process he had defined for getting my stuff in for code review and we encountered a few kinks that we ironed out there and then. I now eagerly await the feedback from the reviewers since I know there are probably a few rough bits, especially in some of the designer bits which I wrote over twelve months ago.

It seems fellow Readifyian Scott Baldwin also underwent a code review. I think his comments about check-ins and code reviews are completely valid. Code – even if it isn’t perfect is the product of a very expensive resource and should be preserved at all costs. This is why Microsoft has multiple tiers of check-ins before you reach the main Windows trunk with your feature.

Given that there seems to be a bit of discussion about this amongst the Readify folks I thought that maybe as an internal excercise we should all offer up some code for someone in the company to review, just to see how much we can learn from our own individual coding styles. Here is the snippet I am offering up, its from Shrinklet. If anyone is interested – feel free to e-mail me the critique or leave them in the comments.

About these ads

5 thoughts on “Code Review on the Brain

  1. Scott Baldwin

    Good point about learning from each others coding styles, I failed to mention that in my article, but I’m becomming more and more aware of it, the more code reviews I have and when I do them for other people. I think it also helps in keeping a teams style consistent. Also as the code reviews we do here at QSR are of a walk through type nature with the original developer at their physical location, you also get to pick up some cool Visual Studio tricks from other developers.

  2. Mitch Denny

    Alot can be said for spontaneously changing your own coding style too. I’ve used some gawd awful coding styles in the past just so I can find out that one thing that people like about them.

  3. Leon

    Hi Mitch.

    Peer Code Reviews can be quite expensive, as they take up the time of two highly skilled professionals.

    That’s why I recommend a new process of “Automated Code Review.”

    The process works like this:

    1. A visual studio .net plug-in detects that you are attempting to check new code into source safe.

    2. The new code is automatically emailed to Alex Papadiddlydappamossololimimini (sp?) who runs the DailyWTF.

    3. After a week, if the code hasn’t turned up on the Daily WTF, then the check-in succeeds.

    cheers

    Leon

  4. Nick Wienholt

    Hi Mitch – how come you never PInvoked down to set yourself up as a clipboard viewer so you could receive notifications of clipboard changes rather than polling? It would be a useful sample to have floating around cyberspace.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s