Going in to this project I was was uneasy about how to structure the gem. From the very basics. What folders/files did I need? What would I name them? How would I get this thing to actually work? I met with my advisor. She told me to take things one step at a time. Read all that I could about building a gem and where to start. Web searches would be my best friend. I watched the walkthrough video where Avi did a fantastic job of making it easy to follow his thought process and gave excellent pointers. I was starting to feel confident that I could do this.
After learning how to bundle a gem and get all of the basic necessities in order my mind was at ease. I simply just started. When something broke (which was immediately) a copy/paste in to google was all I needed to get me going on the right track. If I got stuck somewhere I would cue up the Avi walkthrough video and think about the code I wish I had. There was a ton of trial and error. After 1 very long night I had my code working basically how I wanted it. I just wasn’t using live data scraped from a website.
I met with my advisor once again and showed her where I was stuck. She gave me some pointers and showed me a few commands that improved my code drastically. I was finally ready to scrape live data. I implemented the new code and ran my gem aaaaaaaannnndd it broke. A few google searches and some refactoring and I was back in business. I was finally scraping live data and having it display how I envisioned all along.
Some of my code is easy for me to understand. Other parts of it work, but I’m not sure why. I’m sure that if a real Ruby pro were to look at the source code they could tear it apart and refactor it to make it much more DRY. I learned a lot through this project, probably most importantly was to start coding small. Don’t think of the whole project. Start at the very beginning and write code for little portion. Break things and fix them again. I had a great time coding this project and can’t wait to get in to the next section.