“If you can’t stop thinking about it, don’t stop working on it” - Michael Jordan
I’ve found in life that as much as I want to compartmentalize areas and focuses in my life it’s nearly impossible. While I am at work I am constantly thinking about what I am learning in web development and itching for the work day to be over so I can learn more and develop my web development skills even more. I find myself constantly talking to my friends, family, finance and even my dog, about what I am learning. And since I clearly can’t stop thinking or talking about coding, MJ suggests that I shouldn’t stop working on it.
And funny enough, my worlds are beginning to collide, so I don’t have to stop working on it. I work at a company with various online stores accompained by various outlets and platforms that the products can be sold on. As our product line constantly changes I have to update all these platforms (or as I know now, databases) with updated information. Which made learning SQL, ORMs and ActiveRecord very easy, as I was able to connect it to my current job. I was learning the mechanics behind something I do on a daily basis. Being able to connect and make sense of what I was learning brought coding into perspective to me. It’s not just about completing labs and assignments, I was able to apply it and understand better how it translates into real life situations.
You guys. I did it.
I built a command line interface as my final project for the Object Oriented Ruby section in the Learn curriculum. Let me start by saying the CLI Data Gem Project wasn’t an easy feat. First it took some time for me to actually get the courage and start writing code from scratch, something I had never done before. And secondly, I ran into multiple problems with scraping which altered exactly what I wanted my initial application to do, so getting a continuous work flow going also took some time.
It was fairly easy for me to think of an idea for my project. My entire life I have always been trying to invent something (I wholly believe that I thought of the pay to park mobile app before it came out, but that’s a story for another time). I think of everyday interactions and what I would want to use. While starting this project I was in the process of looking for nearby weekend getaways for my fiancé and I to go visit during Memorial Day weekend; the caveat: the place had to allow us to bring our furry child– I’m sure you can see where this is going. I decided to create an application to scrape sites for pet friendly hotels and lodging, in other words my “Pawlidays Inn” app (I’m a huge supporter of puns and dad jokes).
After watching the CLI Data Gem walkthrough about a dozen times, I figured it would be best to start by creating the skeleton of my code based on the walk through and other examples given as resources. I wrote down Avi’s steps from the walkthrough on how to build a CLI Gem:
As I started to write my code I found this list to be a good reference to keep looking back at. It’s intimidating beginning on a blank slate, but looking at it by steps helps you not only keep organized, but gives you a sense of direction.
I knew I wanted three different classes so I could better organize my code, so I started with the following: a CLI Class, a Scraper Class and a Listing Class.
From there I created my environment so all my files and gems could be aware and access each other.
Once the skeleton was in place I started to look at what websites I wanted to scrape, I initially wanted to scrape multiple sites such as AirBnb, Hotels.com, Bring Fido etc. However, since I wasn’t scraping a plain URL I ran into trouble with altering the URL to output the user’s input and the different filters selected to view pet friendly options. After much research and experimenting, I found a site with a simple URL I could easily manipulate depending on the user’s input.
From there it was a lot of binding.pry to test scrapings and to get exactly the right output. Then I had to make sure my objects and methods not only worked, but worked together. I surprised myself at how “easy” I was able to write the code from there (easy being a generous word, as it was a ton of trial and error and looking at other CLI gems). I continued to make edits and create more methods to simplify and organize my code better. This was the first time throughout this whole process where I actually felt like a developer, and let me tell you, it felt pretty damn good.
After two weeks of huffing and puffing, it was finally working, I actually MADE something, something that I came up with in my head and something that I am extremely proud of. I know that it’s just a CLI gem and I’ve only just started, and I hope in a couple weeks, months, years, I will look back at this and laugh at how simple this assignment was. But for now I will pour myself a nice glass of whisky and bask in the feeling of completing my first application. It is starting to look like my aspirations of inventing something isn’t too far out anymore.
Cue happy dance
As I’m about to sit down and start my CLI Data Gem Project, I can’t help but feel the effects of Imposter Syndrome. This is the first time in this whole process where I have taken a hiatus of work from more than just a couple of days (I’m coming up on my 1 week mark since I submitted my last repo). I could go on and list excuses between life events and a full time job, but the honest truth is that I’m scared to start this project.
As I near the end of Object Oriented Ruby in the Learn curriculum, I am starting to feel a huge sense of accomplishment. In the beginning of this section, I found myself experiencing the dreaded “Imposter Syndrome”. Something I had never heard of before entering the coding world, but have certainly experienced previously in my life.
Having professional experience in managing and creating content on webpages, I had a very basic grasp on HTML. However, CSS was completely new to me. Before I just inserted styling directly onto the content. What I have loved about coding so far, is how smart it is. “CSS was created as a better solution to style HTML elements” it’s genius, you merely call on the selectors throughout the code, it makes it cleaner and so much simpler to follow. Plus, you can then use your CSS styling throughout various pages.