Home Blog About Jinx Gizmo

git commit -m "Version control and me"
how I learned to stop worrying and trust git commit

In the beginning...

There was the source. The master copy of the master program, the omniscient stack of ones and zeroes that flitted across arrays of wires and gates. It effortlessly found space in the heap, and provisioned stacks if necessary. What language was its original dialect? It didn't matter. It just functioned.

And just as there was Adam, there was the Systems Engineer. The Holy Programmer Analyst III that held impressive certifications and had trekked to the high summit of Big Iron to bend the mainframe to his or her will.

Well, not really. Software has always been built by, with, around, and under teams of people. Whether that means two people or four, most serious software efforts that succeed are like the Beatles: If it was just John, then they wouldn't be the Beatles.

In order to facilitate orderly delivery of work product, different systems and schemes have made their mark on the industry. Waterfall, Six Sigma, CRC Cards, Microsoft Project, and so forth. A veritable rogue's gallery of tools and methods that have had some imprint on the way we plan and execute things. One thing, one type of tool, above ALL by many miles, has endured: Source control and versioning. For those of you that don't know what I'm talking about, this brief paragraph does a pretty decent job of explaining.

I'm not going to go into the history of the subject but I've been around long enough to have endured Microsoft Visual Source Safe, which was only terrible in hindsight after I'd used a better product. Over the years, I've used BitBucket with Git, git locally, Subversion, and (mostly) Git and GitHub. I have my preferences, but I try to be less dogmatic in my old age.

I recently was part of a discussion at work that made me think about the importance of using Git properly. Why do we do it? Why is it that I just KNOW by instinct that badly implemented source control habits are worse than none at all? Nobody told me that, I just know it like I know my eye color.

It also made me think of the many vainglorious efforts I've been part of (or spearheaded) to herd engineers into a proper set of practices when collaborating, specifically in the way source control is implemented. Why sometimes it succeeded, sometimes it fails, and what the happy middle is. A few things came to mind:

So What is the Happy Path to Blissful Commits?

Keep things ridiculously straightforward and don't overburden yourself with fancy tools. My biggest recommendation is that you automate as much of this as possible. If developers use disparate tools, make sure you know what plugins or extensions they need to grab. Create scripts, leverage the IDE's ability to extend itself, and just make it easy on everyone. PR templates are nice, but don't overburden people with paperwork.

I know all of this is horrifyingly obvious stuff, but it bears repetition because I have seen a trend that indicates that developers are sliding back into bad habits. Much of that comes down to a simple skill gap that can be fixed with training, or better yet, mentorship from awesome people like YOU.

  1. Pull
  2. Work the story
    1. If using static analysis, address any issues the tool finds
  3. Commit your changes
  4. Push
  5. Create a PR for review
  6. Herein lies the review loop: absorb, fix, submit for rereview
  7. Some authority (or maybe even you) merges to master/main
  8. Just for tidiness, ditch that old branch. You can always recover it if disaster strikes.
  9. Tell your project manager the good news, rejoice, drink punch, whatever blows your hair back

Please...check out this essay on software projects. It is truly priceless, and I re-read it once a year just to keep myself grounded.

Love and Happiness,
Justin

Ovalhead : Justin Stroud : The views expressed here are my own

This site is hosted by RackNerd on Alma Linux
Pages served by a dirt simple Express/Handlebars app