Getting Behind

The first week of October was the opposite of the kind of effort it’s going to take to actually finish an app by the end of the month. Lots of distractions kept me from doing much work on the challenge. Mind you, they were mostly my of my own creation. This weekend was terribly lazy and I probably could have gotten quite a bit done, though it was pretty great to spend some time with Matt and Sascha.

I find I do this a lot. When I’m starting a project, especially when I’m not completely clear on the direction I need to go. It seems like it’s easy to procrastinate and go back and forth with ideas and never get anything accomplished. I get this paralyzing dread whenever I think about whatever it is I should be doing. I start going through the list of questions that need answering and tasks to be done. The longer it gets, the more inclined I am to promptly turn on the TV. I’d be a lot more accomplished if I could figure out how to just get things done. The way out (and I’m well aware of this, but that fact doesn’t seem to help) is to just start in on one small thing at a time until they add up to something substantial.

The problem I was facing was that I hated what I had written. I didn’t feel like I was really understanding the way my drawing thread was interacting with the Activity. It was a complete mess. So I started from scratch tonight. I stripped out everything but the essentials and stared building up with a bit more rigor and style. Style is not to be overlooked when you’re writing code. Of the developers I’ve worked with over the years, the ones that really impressed me have this supernatural ability to format source in a clear and concise way that just makes it sexy. Unfortunately the profession tends to contain a lot more developers that appear to like to drink when they write their code. But I digress…

So back to general code cleanup and trying to reshape my understanding of how to put a good game loop together and tie it into the paradigm of Android development. A big stumbling block is how to decouple the drawing thread from the rest of the loop. I’m still not 100% on this, but I’m a little happier with what I wrote tonight. The big foggy right now is making sure I’m synchronizing between that and the logic thread appropriately. All the examples I’ve seen kind of mush that all together in a way that I’m skeptical about. Hopefully I’ll have that all figured out by tomorrow.

Off to test out some theories…