Trip Down Memory Lane

Good lord I used to be a [more] incompetent programmer. Last night I was putting the Stick Game in shape for uploading to the web site. I was appalled at how poorly written the code was. Magic numbers everywhere, no page flipping. Strange (and so far unpredictable) side effects from executing innocuously named functions.

All I can say, is that, in spite of all the dynamically allocated arrays, at least it didn’t have any memory leaks.

On the other hand, before I judge myself too harshly, I should keep in mind that the version of me who wrote that code originally wasn’t writing it to be read. The game was intended as a substitute for a writing project in a GE class about treatment of time in literature. As such, it did what it was intended to do. That is, it compiled, it was functional, and it included some explanation of algorithmic complexity and trade offs between storage optimization and processor optimization suitably dressed up in language from the course to get me through the class.

Still…yuck. In any case, I had hoped to be able to upload the program last night. Given the poor state of the code, that didn’t happen. The new plan is that I’m going to need to figure out what I was doing with all those blasted magic numbers and poorly named functions, then try and polish up the interface without breaking everything. Then I’ll upload it.

Advertisements

Tags:

One Response to “Trip Down Memory Lane”

  1. A Stitch in Time… « Developer Diary Says:

    […] the Stick Game, and got it into a form where it can be distributed. The delay: memory leaks. Yeah, that post where I said the game didn’t have any was tragically, horribly, wrong. It turned out, that it just didn’t have any in the main […]

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s


%d bloggers like this: