Breakfast. Commute. Work. Commute. Dinner. Family. Were all busy. I remember the days of endless nights, like pastures of green before me, free time roaming the virgin countryside. Now, for all the countless ways my life is better, this freedom escapes me.
Allow me to introduce es6-crpg. This cleverly-named hodgepodge of EMCAScript 6 and gluten is my latest project, and an effort composed in its entirety of Opportunistic Development. Take a look at its punch card. Don't bother clicking the link, actually, here's what it looks like at time of writing:
By looking at that, I bet you can guess what time my son goes to bed. On the weekends, we make family trips to Starbucks - Pat loves playing Mario Kart or another 3DS game, and I get a few good commits in then as well.
The rest? Two heroic pre-8 am contributions I don't remember (and probably didn't later that day) and naught. That's what I'm calling Opportunistic Development.
What motivates you to keep with a project? The world is an ever-expanding maze of options and adventures, the road outside your door leads to a hundred hundred experiences you've never had, and for each that you pass up a door shuts, the space behind it unknown to you and unwelcoming. What keeps you motivated to keep with a project?
Besides a paycheck.
It's accomplishment. It's looking at something you made and saying "yeah, that's good." It's showing a friend, a colleague or spouse or child or parent or some other living, breathing person to validate that your effort has not been thrown into a void because it has touched another life in even the slightest way. It's finally getting that damn sprite positioned where it had aught to be. It's accomplishment. Or else I'm projecting.
To stay motivated, sit down to work on a small, attainable, but tangible portion of what there is to do. "Tonight, I'll make an AI that can take a turn." I did. "Before we leave Starbucks, I will have usable inventory items." Done. Page through those commits - small, maybe even tiny steps toward something bigger, and each step onto solid ground, each step showing progress.
To the end of the strategy, it is almost necessary that we do not plan. This project started as a "huh, I bet I could," and has continued as such for so long as it has continued. There has been no long-term plan, in overall design or in code structure. Does it show?
The advantage to having no plan is to keep the canvas clean, blank, and accepting of the brush. The more space you fill, the more restricted you are in spaces to work, until work is a chore. And don't be afraid to paint over old strokes, either - rewriting old code to accommodate new ideas is easy if the code isn't too rigid.
As an example: In general, it's bad practice to use a "kitchen sink" design - through a hash around with all of your values paired to keys that made sense when you wrote them - but in this case I find it liberating. An inventory item? That's a hash with a name and a texture for an icon, maybe where you can equip it. I later rewrote it into a proper object with some logic, but not until I needed to, not until that crumb was the one I was chewing.
My final thought is schedule. Keep a schedule. It doesn't have to be intensive, but block out even the most marginal interval that you would regularly do nothing. A commute on a train. The time before work when you're awake but it's too early to leave because it would be awkward to get there that much earlier than everyone else. That half hour you sit in your son's room while he gets to sleep. Keep to it.
Skip sometimes. Tonight I am beat, I wrote a lot of code and did a lot of things today and I am done with it. Tonight, I did this instead. Skip, sometimes. When you need to.
But then keep the schedule.
There is time for the things you think of when you think you have time to do them. We're all busy. Develop opportunistically.