Progress, not perfection: CLI project - The Hard Way

Posted by thesilentc on May 17, 2017

Early on into my journey of learning to code with Flatiron School and I figured out the best way for me to fully immerse myself into the curriculum. Along with mapping out goals over 13-week cycles and printing out every single lesson and lab and posting it on my wall (17 pages, in case you were wondering), I chose to handwrite all my code on graph paper. I didn’t stop there. I color coded each line to match the ruby linter installed on my text editor of choice (currently Atom). I will write another blog post about ‘How I Learn’, but for right now I want to talk about how much that has helped me out during the final projects in the Ruby section.

When it came time to pick a website to scrape for my CLI Gem, I was vacationing with my family on a dude ranch in Arizona. I chose to scrape the official website of National Team Roping , a professional sports league located in Wickenburg, AZ. Team roping a rodeo event in which horseback riders compete in pairs to rope the horns and legs of a steer in the fastest possible time. To be clear, I have no interest in this sport, but since I was in Wickenburg, Arizona anyway I thought it would be a great idea for a project.

Writing all that code by hand was very helpful when it came time to write the CLI from a blank page. After creating a new gem using Bundler made the process pretty easy. Because I had written Ruby code by hand for a few months, the process from there was just a matter of cycling through my memory and knowledge of Object Orientation programming. Setting up the environments, building the classes, and knowing what to require and what require_relative all came quite easy. I used feedback from my Tic-Tac-Toe with A.I. to make sure I had a separate class whose only job it was to do was scrape a webpage.

The whole project met the requirements (objects, not hashes, etc..) needed to demonstrate that I had a good understanding of OO programming. It took me less than three hours to get a fully functioning CLI gem that went two levels deep from a terminal command. That felt pretty easy. Except that I got obsessed with making it absolutely perfect.

I wasn’t happy with a plain CLI, nor was I satisfied with the complexity of the Scrapper class I wrote. I wanted to prove to myself and to the instructor that would be reviewing my project that I was a master programmer. But I’m not. It didn’t matter that I only started this journey a few months ago with practically zero experience writing code. It should have.

Instead of submitting the project and moving on, I searched for ways to make it better. I wanted to colorize it and make it beautiful. I spent over three weeks alone trying to perfect a working CLI gem that I know my future self is reading this right now and laughing about how wasteful I was being with my time. It was like I was putting on the frosting before baking the cake. I’ve since learned it didn’t matter how pretty my program looked. All I needed to demonstrate was how well of a grasp I had on OO programming. How well did I understand object relationships?

My review is set up for tomorrow night. I am going to learn that many of the errors I was getting returned during the weeks of purposeless testing were to all due to a Ruby version compatibility, I just know it……