Do-it-Yourself Peer Review

When I get asked about tools for quality assurance, I will pretty much always mention that the technology is not the answer. In my experience, the best improvements in quality come from process, from letting as many people as possible have access to all aspects of the system as early and often as possible (this is exactly why evolving projects “release early, release often”). A great tactic is to have another developer review each change – but what do you do if, like me, you work alone?

I’ve been freelance for almost 18 months now, and while I often develop as part of another team, I do also have my own projects that I work on. In addition, I’m currently the sole project lead on the project, which means I’m the only person with merge privileges on the main repository right now (I don’t imagine this will be a long-term arrangement, but it’s how it is at this point). I duly review and test (at least a little bit!) all the pull requests I get for the project, but that does leave me feeling a bit vulnerable when it comes to putting in my own changes. I tweeted this the other night:

tweet reads: Sending myself pull requests, I *think* the patches are good but I need to test/merge/deploy when I'm more awake than this

There were a couple of relatively small features that I wanted to work on, but it was late and I am pretty ditsy even when I’m not tired, so I was unsure whether to leave them until another time. If I start something in a branch I tend to sort of lose it in the excitement, because I have so many branches going on at any one time (I merge pull requests into private branches on my local repo for testing before I merge to the master on the main codebase). So what I decided to do was this:

  • For each feature, branch and make the changes I wanted to make
  • Open pull requests (to myself, but that kind of doesn’t matter) for those branches
  • Come back another day and check, test and merge those patches exactly as I would do with anyone else’s change

I always tell people “comment your code so that strangers can read it … and that includes you if you’ve slept since writing it”! This is totally true and by opening the pull request and leaving it for a couple of days, I can do the closest thing to peer review that you can do with one person and I think it really does help me to catch problems. What strategies do you use to manage team processes when there’s only you on the team (or when you’re the only person who cares about quality?!)? Leave me a comment, I’m always looking for new ideas!

Leave a Reply

Please use [code] and [/code] around any source code you wish to share.

This site uses Akismet to reduce spam. Learn how your comment data is processed.