Draconian Overlord

Oppressing software entropy

Compassionate Code Reviews

I gave a short talk about code reviews the other day.

Not entirely sure if the slides are useful without the in-person commentary, but I thought I’d publish them anyway.

As a summary, obviously I really enjoy code reviews. To me they are fun, and I would do them as a hobby even if I didn’t have to as part of my day job.

All things considered, I think the industry has really embraced code reviews over the last ~20 years.

When I started, or at least the places I started at, it was very odd/unexpected to read other people’s diffs. I had picked it up from following various open source projects, but in-house/enterprise/day-job projects just didn’t do it (granted, I’m sure there were exceptions, but it was definitely not the rule).

But I started to apply it to in-house projects anyway, because I’d seen how effective they were.

(Not to claim I had any affect at all on industry-wide code review adoption, I just copied an up-and-coming best practice. To me, it was the open source movement, with its “all communication is electronic” constraint, that pioneered code reviews as a primary means of project collaboration, and drove adoption of code reviews as an industry-wide practice.)

The tooling at the time was also immature and basically “a Perl post-commit hook that emails text diffs” (one of my first open source projects, commitmessage…can’t believe that’s still online, was a Python framework for writing cross-SCM commit hooks; it supported both main SCMs at the time: not git, but CVS, and the new hotness, svn).

But now basically all tech companies do code reviews, such that you will get raised eyebrows if you come interview and your current place does not.

If your company is not doing code reviews, I will wonder: a) what other best practices has your current company ignored and so failed to teach/expose you to, and b) why haven’t you evangelized code reviews and showed them the err of their ways?

Or maybe that’s why you’re interviewing, in which case, good call. :-)

Anyway, that tangent side, most places do code reviews and I also think most places do them pretty well, e.g. as part of an overall healthy culture of quality.

I hope you work in a culture where code reviews are similarly enjoyed, and if not that you can guide your team and culture towards that.