CLI Data Gem Project — MLB Yankees

Luis Castillo
2 min readFeb 4, 2021

--

My first CLI project, this project was challenging for me since I was getting more skill on just resolving labs. I was kind of lost I ask myself “How can I start this project?”, I started doing brainstorming and I start writing down what my hubby like and one of my favorite things is Baseball by selecting baseball it made it easy for me since I know how the game work.

In my code editor, I started bundling my gem files, this part was easy just by using bundle gem name_of_app in my terminal, running this gem in my terminal automatically create the basic structure.

In the CLI project, we had the option to work with Scraping data from a website or work with external data API. I follow my instructor's way to work with an API, working with an API was much easy than scraping data from a website. My first attack was the API that I got from a website (https://appac.github.io/mlb-data-api-docs/) this was my MLB API. I spent hours trying to understand how to get the data I want from the API, it was my first time working with API, I looked for help in my cohort to understand the API and what I need to be looking for. I learned that when I need different data I need to read and understand the endpoint of the API and what I need to change to get different data from the API.

I realize after 2 days I was planning my project the wrong way, I was more worried about the API than thinking about how my CLI App it will work, I started making notes and making fake data in my code editor, I was making all of these data inputs so I can see it in my terminal after I put all of these data I started working on what my first line was doing and I start looking for code to make that data work in code. When I did the fake data it has seen so much easy but when I start working with the code that was the moment I start getting stuck and I realize that I couldn’t ask questions in the AAQ, that made me look for the solution on my own, I spend hours in just one line of code I also ask for help to my peer in my cohort.

I learned from this project a lot which now I can implement in my next CLI project, Now I know what I should start working on first and how to get data from an API. Working on this project from scratch helped me how I can use and when all I have learned in phase 1, this project was challenging but it was really fun as well and I can’t wait to see what else Flatiron school has for me.

--

--

Luis Castillo
Luis Castillo

Written by Luis Castillo

Software Engineer at Lowe's Companies, Inc.

No responses yet