First Milestone with CLI

Posted by kristinreddington on April 11, 2018

Before beginning this project, I projected my timeline to be around three to four days, maximum. In reality, it took me a good five days to code my CLI gem, and currently, I still have the video walkthrough to record before submitting everything for approval.

Along the way, though, I realized that like everything with programming, there are nuances, bugs and discrepancies I’ll bump into that are unplanned. I felt confident with my object orientation, scraping and refactoring skills, thinking that with that alone, I’d finish in no time. Staring at a blank file in Atom, with no previous understanding of how files communicate with one another, what a gemspec really is or how to simply make a file executable triggered a sense of imposter syndrome. I spent my first day simply setting up my project, learning the difference between require and require_relative, refreshing my git knowledge and installing the right software to feel comfortable moving from the familiar IDE safe-zone to a local environment on Atom.

After I began, I felt in the zone again, banging out most of my code that scraped a website rating products one-ten on their level of hazardous ingredients in about a day. Stuck on one bug, a one-on-one session helped me realize the site was relying on a lot of Javascript with very dynamic content. I then dabbled with the gem Poltergeist, a PhantomJS driver for Capybara. With a lot of trial and error, I realized that this website’s format just wasn’t going to make the cut for what I was trying to accomplish.

Moving onto a completely different webiste to scrape, I was able to re-work my old code, changing variable names and my scraper class to have a completely different gem without having to start from scratch. After a few days of fixing bugs and refactoring, I finally got a working program I felt good about.

What I learned from doing this project is that things don’t always go as planned- but that’s okay. Although I was behind schedule, along the way, I ran into some hurdles that forced me to learn new things, such as scraping websites with Javascript, the fundamentals of setting up a program, and problem-solving without the crutch of the Ask a Question feature. I really had to research and play around with different methods, as well as work with my peers to help stitch my project together. All of which I’m beginning to understand are the core of what being a coder really is.

Programming is complex and overloaded with information and different ways of doing things that it’s easy to forget that just because you’re not where you planned to be, you may just be getting further by taking it slow. I’m learning to ackowlede problems that definitely aren’t the path of least resistence, but will open up a can of worms to more information, learning and ultimately - improvement.