Last weekend I got fairly excited about my guitar tab writing app. It was going to become a big traffic source for Redundant and I was going to build street cred as the guy who made tabbing fast and easy.
But then something happened, my app got complicated. Before I knew it I had three nested loops needed just to print tabs to the screen. It required method after method just to check if chords were in the library, and if they weren’t were they integers. What was the user trying to enter exactly?
Yes, things got complicated to the point that I was procrastinating just “thinking” of making this into a Sinatra App. Creating embedded ruby from all my poorly named variables and giant loop methods was the opposite of how I originally envisioned this project. I was avoiding my once exciting project.
def print_tab(spacing = 3)
@song_chords.size.times do |row|
6.times do |string|
@song_chords[row].size.times do |note|
print @string_notes[string] + "-" * spacing if note == 0
print "-" * spacing
I have been told from the beginning of Dev Bootcamp to adopt the mantra <buddhist drone>”I am not my code”</buddhist drone>. I’ve understood this advice should be taken for a few reasons:
Primarily, it was to enable ourselves to received feedback/critiques on our code without feeling we were being personally attacked. What you’ve programmed does represent your knowledge base and effort, but at the end of the day you have to realize that it can always be improved upon.
Secondly, there may come a time when your code has become ugly, unmanageable and confusing to the point where it needs to be put out of it’s misery. If you are too attached to your code then you risk wasting mucho time in trying to give hope to hopeless code. Sometimes you gotta know when to let go.
So that’s what I’m doing with the guitar tab project. Letting it go. I realized that building the views, database, and controller for the code would probably be rage inducing and I feared having to deal with it. Furthermore, I feared having to manage the code as I attempted to improve the project. Ultimately, I had coded myself into a corner and the best way out was to just walk away.
The idea is still very much alive in my mind but I think I’ll approach it again when I get more comfortable with Rails and can take a little more time on it. Until then, this will become yet another abandoned repository on github (https://github.com/TravisL12/guitartab_builder).