The Daily Developer

Use more version control


Listen Later

Early in my career I worked closely with an extremely experienced engineer on a python project. I was headstrong and egotistical about how great my code was. He was quiet and unassuming.

Guess who wrote better code?

One time while I was observing him write code, I was struck by how much his version control system was interwoven into his entire process. After writing or changing a piece of code, he would constantly switch back to his terminal and look at the diff. Many, many times. He would make small commits, even within a file (git add —patch) approximately 100 times more frequently than I ever would have.

At first I thought this was pretty strange, but after working with him for awhile, I realized how liberating it was. I copied his behavior without really understanding it, and I’m very glad I did.

There is a sort of cognitive load that was lifted from my shoulders. Increasing my discipline with my commit strategy exposed all of the gaps in my knowledge of my tools and it increased the clarity with which I could hold my code in my head.

Give it a shot sometime - make your commits more often than you think you need them. Observe how it affects your work product.



This is a public episode. If you would like to discuss this with other subscribers or get access to bonus episodes, visit thedailydeveloper.substack.com
...more
View all episodesView all episodes
Download on the App Store

The Daily DeveloperBy A daily meditation for new software developers