I hadn’t broken anything in production in a while until last week, so it seems like a good time to write about that. Last week I deployed an upgrade to one of our services containing two changes: A several thousand line refactor of the entire service A few dozen line removal of a redundant authorization check Which one of those changes do you think introduced a problem that caused me to roll back this attempted upgrade, not once, but twice?
I don’t remember where, but I saw a recommendation a few months ago to keep a written, daily log of everything you do at work. Toward the end of February, I decided to apply this to my own work and I’m writing this after just finishing the third month of doing so. This is my method for tracking my work. I have a folder on my laptop called work_log and each month gets its own Markdown file.
When I submit a change for code review, I take time to review it myself before tagging any of my teammates. Of course I look through the code in my editor before deciding I’m finished with the change, but that is only the first step. After I think the change is ready, I push my changes to Github and open a draft pull request. Using an interface designed for code review puts me in a critical mindset and helps me find issues I didn’t notice in the editor.