Gamasutra is part of the Informa Tech Division of Informa PLC

This site is operated by a business or businesses owned by Informa PLC and all copyright resides with them. Informa PLC's registered office is 5 Howick Place, London SW1P 1WG. Registered in England and Wales. Number 8860726.

Gamasutra: The Art & Business of Making Gamesspacer
View All     RSS
May 23, 2019
arrowPress Releases

If you enjoy reading this site, you might also want to check out these UBM Tech sites:


The Neurotic Pre-Check-In Re-Check

by Neil Gower on 12/17/09 02:05:00 pm   Expert Blogs

1 comments Share on Twitter    RSS

The following blog post, unless otherwise noted, was written by a member of Gamasutra’s community.
The thoughts and opinions expressed are those of the writer and not Gamasutra or its parent company.


Somewhere along the way, I picked up this habit of where I go through each file I'm about to check-in and diff it with the current repository version. In theory, this isn't really necessary - since I've synced to the latest version and tested the build, the files should be good to commit. Practically speaking though, reviewing the diffs is good for a number of reasons.

First, it makes me mentally run through all of the work I did to get to this point. At very least, this helps me write a useful check-in comment. Very often, it also reminds me of something I meant to go back and finish or fix before committing. Typey fingers represent coding!This avoids embarrassing check-ins, so the rest of the team nevers sees those horrifying hacks I used "just the get things going". 

Perhaps more importantly though, looking over the changes I'm about to apply to the repository makes me think about how applicable these changes are to the rest of the team.  Many times, I've caught config options or hard-coded "test" values that only make sense for me on my computer, and would break the game for someone else. This kind of stuff doesn't show up when running tests locally. It's sort of like proactive bug fixing - instead of encountering a bug and trying to track down the source, I'm reviewing each change thinking, "how could this break something?"

I'd like to say that I developed this habit through a dedicated effort to improve software quality. In reality, I think it started because (a) I'm really forgetful when it comes to the code I've written, so can't remember what I just did that I'm trying to check-in, and (b) TortoiseSVN's commit dialogue makes it super easy to do. You just double click on a file in the change list, and it opens it up in your visual diff program of choice. Perforce does something similar (in P4V anyway) when you hit Ctrl-D.

It feels pedantic and even borderline neurotic every time I do it, but reviewing my diffs has definitely contributed to the quality of my code. It's worth a try, maybe as one of the easiest New Year's resolutions ever!

Related Jobs

Crystal Dynamics
Crystal Dynamics — Redwood City, California, United States

FX Artist
Hyper Hippo Games
Hyper Hippo Games — Kelowna, British Columbia, Canada

Software Developer - Unity
Wizards of the Coast
Wizards of the Coast — Renton, Washington, United States

Sr Lead Software Engineer - Arena
Wizards of the Coast
Wizards of the Coast — Renton, Washington, United States

Lead Software Engineer - Arena

Loading Comments

loader image