I’ve spent the last year (ever since I started coding in Rails) realizing over and over that I’m way behind in learning the ‘best practices’ that have come to define quality in my industry. MVC architecture, DRY principles, Agile Development, Test-Driven Development, working without distractions (closing my Gmail tab!), version-controlling everything, automating deployment, life-hacking my way to productivity.
It’s been a long trudge uphill but I’m now feeling comfortable with how my work habits reflect the investment I’ve made in them. I’m sleeping earlier, working faster, and feeling better about the code I write.
And yet, there was something missing. My code has improved a lot but little was done to improve my attention span, my ability to stay alert even when I’m not in “flow”, and to avoid the spectre of depression that has been the biggest detractor from my professional life. At first I thought the solution to all these would be some mental excersize or emotional element but I was wrong: it was purely physical.
Introducing: My Programmer Juice:
I’ve started a routing of daily excersize. I know, it’s revolutionary isn’t it? I’ve often done daily excersize before but it’s not until now that I’m realizing that excersize is fundamentally necessary for me to write the highest quality code.
My biggest roadblocks in development come when I don’t have a clear list of tasks in front of me. I’m facing some big ugly monster of a legacy script that I’ve inherited and I don’t know where to stop. The difference between my good days and my bad hinge on my ability to persevere and find some entry point into accomplishing the mammoth task at hand. And that all hinges on whether I’ve got the endorphins running and giving me the edge.
I’ve found I don’t have to do that much in the way of excersize, I just need to exhaust myself somehow. I typically run every other day (to spare my knees) and do little workout stuff on my livingroom floor on alternate days. It’s become my most rewarding habit because it only takes 20 minutes a day and it improves all the work I do on both work and hobby projects.
So that’s my best practice. I’m sure lots of people do it but I never ran across it in all the books I read on “how to code awesomely” - so here it is.