Chicago + Coding = A CLI Made In Heaven

Posted by Lexi Sandoval on February 17, 2021

While I was a computer science student at UW-Madison, I rarely had the opportunity to write programs that interested me. So, the CLI Data Gem Portfolio Project was exciting for me as I could finally create something realistic, interesting, and meaningful to my life.

When I was deciding what I wanted to create, I wrote down a list of things that I am passionate about – running, sports, fashion, and Chicago. One of my greatest wishes is to become a software developer and live in the city, so I thought it would be fitting to create a CLI that relates to my favorite city in some way. One of my favorite Chicago blogs is TimeOut, so I figured exploring the website would be a good start. I came across their 40 Best Bars article and thought that a CLI which provides a user information about Chicago’s best bars would be extremely useful, and realistic, so my project was decided! Unfortunately, I realized that it would be very difficult to scrape the information that I was interested in from the TimeOut article. This ended up being the case with several other websites as well, but I eventually found a suitable webpage on The Infatuation.

Once my information source was decided, I created a list of actions that I wanted the CLI to perform or accept (a technique that I learned by watching Flatiron instructors’ videos):

  • User types ./bin/bar_search
  • Show user a list of bars
  • User chooses a bar
  • Show user information about selected bar
  • Ask user if he/she wants to view the list again
  • Repeat the process or exit the CLI

By creating this list, I was able to understand exactly what classes and methods I needed to create. I first began by creating a skeleton CLI class, then I moved onto the Bar class, and then Scraper class. My project preparation, which lasted a couple of days, was extremely helpful and I was able to complete the coding process within about 3 days. However, during this time I ran into several issues with my environment setup and faced several annoying errors that took too long to figure out. I continued to remind myself that it was all a part of the coding journey and eventually I was able to create a functional (and awesome) CLI! Overall, I’m really proud of myself for developing the CLI on my own, and although it is quite simple, and I feel that the experience gave me the validation that I needed to know that I can do this.

I can’t wait to see what I can create next!