I really enjoy thinking and writing about programming. Since I started writing code years ago, I’ve been obsessed with code quality and best practices–and I think it’s safe to say that a lot of hackers out there feel the same.
I’m pretty sure my urge to write excellent code is driven by some innate desire to perfect everything; regardless, I stopped trying to fight it long ago, and started embracing it.
DISCLAIMER: what I’m about to discuss is stupidly obvious. I actually feel quite stupid writing this; however, since this has made such a large impact on my code quality and programming mentality, I figured I would share it despite my shame.
Have a “Done” List
One of the greatest productivity tricks I’ve learned has been this: always have a “done” list.
A “done” list is checklist that you use as a personal binding contract. Having a “done” list means making a commitment to yourself that each time you touch a piece of code, you don’t consider it “done” until you’ve completely gone through your checklist.
For instance, my “done” list is:
- Purpose of what I’m doing is logged in some form of tracking system (GitHub Issues, sprintly, etc.).
- Tests are written.
- Code implemented.
- Tests pass.
- Code review.
- Documentation written.
If that means it takes a while longer to code, then so be it. A “done” list is a simple way to hold yourself to a high development standard, and consistently write quality code.
I’ve found that even when I’m not able to consistently go through my “done” list every time I touch code–through the process of trying to meet each of my “done” requirements, I write much better code than I would otherwise.