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
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:
so I also know to read loadSong and printSongArray. loadSong should presumably tell me what array I’m trying to load:
@song = YAML.load_file(@songFile)
Who would have thought: the song array! Getting somewhere feels good, especially when it’s this simple.