How to Deal with Pre-Commit Nervousness

You build your project one more time, run your unit tests, run your integration tests, look over your commit log, hold your breath, hover your finger over the mouse button while you do that last mental check, take a deep breath… and click

Of course it’s normal to feel a bit nervous before you commit to production. But should you?

One way to feel less nervous about committing your code is to commit early and often. Some might suggest that you commit when you “Complete a ‘full thought’ of code that compiles and runs” (Cris Pietshmann, 2008).

Committing at a higher frequency makes you feel much more confident about the impact that each commit will have on the codebase. Feeling nervous before committing might actually be a sign that you’re affecting too much for one commit.

This is a supporting argument for “Continuous Delivery” coined by Jez Humble, author of “Continuous Delivery: Reliable Software Releases through Build, Test, and Deployment Automation” and Lean Enterprise. Jez defines Continuous Delivery as “[Reducing] the cost, time, and risk of delivering incremental changes to users.” High risk = high stress and you don’t need that.

So, next time you feel like holding off until you’ve crossed all your t’s and dotted your i’s, go ahead and push! You don’t need any fancy “continuous integration” tools. Just follow your normal release process, but do it prematurely.

Your code might not do anything at all yet, but your pre-commit confidence will increase. You’ll see other benefits, like finding it easier to break your work up into more manageable bites.

comments powered by Disqus