Code Critiques

Every Tuesday afternoon the developers at iMarc hold group meetings. We talk about such nerdily interesting topics as code standards, ways of indenting CSS, naming directories, frameworks, and any other programming issue that we deem worthy.

About six months ago we started holding code critiques. They've been really positive and educational. Here's what we do...

1. On Monday – sometime before lunch – one or two developers post a single page of their code on our Wiki. Maybe it's a snippet from a class, maybe it's part of a page, maybe it's a complete small class. We try to keep the code posting somewhere under 300 lines.

2. All the other developers download and review the code.

3. On Tuesday afternoon, during our weekly developer meeting, we look at, talk about, and critique the code snippets.

The intent is not for the developer to write of the perfect 300 lines of code or spend 4 hours finding the cleverest ternary condition they've ever written. Instead, they just pick anything that they want to get feedback on.

For those critiquing the code, they offer constructive criticism. If you're the person doing the critique, you also often find yourself thinking, "wow, that's a really neat way of doing that...."

Whether your getting critiqued or doing the critiquing, you tend to learn something with every review.

The idea sprang from design and photo critiques that I had to do in college. These typically included getting an assignment one week, then doing the assignment, hanging it on the wall, and letting the class rip into it the following week.

Our code critiques have been really helpful and constructive. If you work with two or more developers, I highly recommend trying code critiques.

Comments

Tuesday, Jun 26, 2007 / 7:14pm Nick said…

If this practice was a Virus, I would secretly hope it was a good one and everyone would catch it. Too many times I've had to debunk code because someone JCP'd it (Just Copy Paste) without understanding what it was doing and it went from functional to borked. We've been doing this lately too in our Dev meetings as a way of really digging into the code and utilizing all of our team assets to complete to goal as best as possible. We have a bunch of different "experts" in various coding languages and getting the chance to all sit down and tear apart some code has been an extremely beneficial practice, more than a mean exercise is making someone look stupid.

Tuesday, Jun 26, 2007 / 9:45pm PJ said…

Code review and pair programming can also have those effects, but this is a neat idea.

Wednesday, Jun 27, 2007 / 9:30am riffraff said…

I agree with PJ. In my mind, the real reason for Extreme Programming's collective code ownership and pair programming is to push this kind of collective review straight into the code-writing phase.

I believe that the effectiveness of both approaches comes from having multiple people look at each other code thus improving at once the code quality _and_ the skills of the developers.

Comments have been turned off on this blog.
Read something more recent.

Statements and opinions expressed in this blog and any comments made are the private opinions of the respective poster, and, as such, iMarc LLC is neither responsible nor liable for such content.

Meet The Author

Dave Tufts

Vice President, Director of Technology

Search

Recent Blog Posts

Recent Comments

  • 10 years and a Les Paul

    Jaime commented: Is that Dave Despres in the flesh?

  • The Scientific Method

    TJ Kelly commented: "After 2 seconds on the Chamber page, she realized that she wasn't interested and wanted to get back to iMarc." Therein lies my favorite argument for opening links in the same window.

  • The Scientific Method

    Angelo Simeoni commented: Our issue tracker has a user option to open issue links in a new window. I can't remember if that's enabled by default, but that's one good use case. Imagine if it were default browser behavior to open all links in a new window. I'm going to mention that the next time someone suggests that interaction. Ironically…

  • The Scientific Method

    Marc Amos commented: When somebody who's signing my checks asks me to make their links automatically open in a new window, the scenario you describe above is pretty much the same scenario I describe to them as 'my professional opinion.' I ask them to consider what happens when the user aims for the Back button and it doesn't…

  • The Scientific Method

    Errol Sayre commented: Your key point says it all: "anyone who wanted that behavior was sophisticated enough to create the behavior on demand" My favorite are sites that go to such great lengths to produce open in a new-window-links that they make it impossible for you to right-click and choose "open in new tab". (Generally due to a…

We heart Visitors

  • iMarc
  • 14 Inn Street
  • Newburyport, MA 01950
  • Phone: (978) 462-8848
  • Fax: (978) 462-8807
  • Directions

Contact Us

Whether you have a huge project specification or just want to talk about updating your site, we’re here to help. Fill out the form, and we’ll get right back to you.

Contact Us
  • All Fields Required

Close