Making THE OCTOBER GAME: Finding your motivation
I took a couple of days at the beginning of the month to let my brain cool off. THE OCTOBER GAME is my largest software development effort to date and I temporarily ran out of steam. It’s not large in absolute terms but it’s right on the edge of my ability to mentally juggle all the moving parts.
To be honest, I didn’t make a decision to take a break, I was just couldn’t bring myself to open up Xcode. The disappointment of not making the Ludum Dare challenge deadline hit me harder than I thought.
Luckily* I have techniques to get back on track when I feel blocked or unmotivated. Without adding any new code, I’ll clean things up:
- Conform code indentation to my house style
- Fix whitespace and tabs
- Remove stray blank lines
- Delete superfluous comments
- Remove commented-out NSLog() statements
- Group and label related methods
If looking at all my old code doesn’t make me want to do new work, I’ll do a light refactoring pass. Without adding any new functionality, and while checking for breakage, I’ll:
- Make hard-coded numbers into #defines or static variables.
- Split long methods into shorter ones at functional boundaries
- Make parameter-less methods (that calculate intermediate values) into properties
If the code is clean, and I can’t decide what to do next, I’ll look at my task list, pick an item and keep breaking it down until the steps are small enough to accomplish within 20 minutes. Then I’ll start up the Clock app on iPhone and focus just on getting that one task done. No web access, no TV, no podcasts and no music. That’s usually enough to handle workaday distractions.
* it was not luck.