oscartheduckin’ around

October 17, 2009

reading old code

Filed under: Uncategorized — oscartheduck @ 4:37 am


I’m retracing that code so I can pick up my command line guitar tablature tool again. And I’m stuck with a problem many folks complain of: what the hell was I doing and why was I doing it?

I’m reminded of Knuth’s contention that literate programming makes sense. It seems to right now; if I had a solid documented ream that was telling me “Okay, do this next”, I’d be happier.

Fortunately, I’ve got the handy indicator:

0.5 — write an addChordToSong method

So I know what I’m meant to do next. But what the hell does that do?

#TODO: Print isn’t building the known song array; that’s because there’s no fucking method for adding chords to the song array
if print
exit 0

I just added a BSD license to the code, so feel free to take a look at it.


I have a good idea where to look now, at least. If the printSong method ain’t workin’, then I need to fix that! printSong() reads:

def printSong()

so I also know to read loadSong and printSongArray. loadSong should presumably tell me what array I’m trying to load:

def loadSong()
@song = YAML.load_file(@songFile)

Who would have thought: the song array! Getting somewhere feels good, especially when it’s this simple.


Leave a Comment »

No comments yet.

RSS feed for comments on this post. TrackBack URI

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 )

Google+ photo

You are commenting using your Google+ 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 )


Connecting to %s

Create a free website or blog at WordPress.com.

%d bloggers like this: