Flatiron Portfolio Project — CLI

Coming to the end of Phase 1, I found myself falling further and further behind. Being a stay at home dad, I thought I could make some adjustments and schedule changes to accommodate the new work load. Unfortunately, with homeschooling two kids, looking after the new baby, and everything that comes with feeding and cleaning up after a family of five, finding quiet time to work on projects and study has been difficult. That being said, there is a light at the end of the tunnel. While some chores and responsibilities and fallen by the wayside, my family has stepped up to help me find more time and given me more space to focus on coding. I do feel that this project needs more work and have plans to improve it in the coming weeks, but I am proud to have figured it out and finished it despite still being behind.

The API

For my project I started with a Pokemon GO API that I wanted to use to show users if shiny versions of Pokemon were available in game and how to obtain them. Unfortunately, the rapid API gave me issues, and with the deadline inching closer, I had to scrap that idea so I could present a complete project. I came across a Rick and Morty API and, as I’m a fan of the show, thought it would be fun to create something fun using the character data. I thought I could save myself some steps by using the code structure I had created for my Pokemon API, but quickly found myself in an endless loop of debugging.

After focusing on restructuring my buggy code, I was finally able to get it to a workable state. It was at this point really started enjoying myself. I have found that I really struggle when I don’t grasp how code works, but when I get into a groove and can focus on implementing new ideas or improving my code, coding is a lot of fun.

Rick’s and Morty’s

Using an API can be overwhelming. Some have an enormous amount of data to sift through and implement into a project. I settled on using one endpoint of the API to look at different characters from the show. Even then, I still decided to pair it down as that endpoint contained over six hundred characters and I was not confident I could write a proper search function for them in time.

When I found I could call that endpoint with a name parameter, I had an idea. Any fan of the show would know there are many different Rick’s and Morty’s from other dimensions introduced in the show. I decided it would be fun to create a project that could search through these unique versions of Rick and Morty.

This gave me a solid starting point as I plan on expanding this project further whenever time permits.

The first problem I ran into was that I was no longer calling one endpoint for my data, but two and needed to sort through them separately. The only way I knew to resolve this was to call each endpoint and create classes for each so I could iterate through them individually. While this works fine, I would like to research other methods to see if there is a more efficient way.

Menu’s

Another issue I ran into was with my user inputs. While I had initially created a menu to start with, I found it didn’t mesh with every method. This lead to my program ending abruptly as invalid and exit inputs didn’t always work. First I went about correcting this in a counterproductive way, using if else statements all through my code to take in inputs.

This made a mess of my code and created a myriad of problems. I wasted time repeating this mistake in a number of ways in an effort to make it work, but eventually decided there had to be a better way. I changed my invalid method so it wouldn’t call the menu back, created one more menu method, and used these methods in place of if else statements.

With this implementation, I was able to get my code working properly. Since I have been behind, there is a lot I haven’t learned yet as well as lessons I rushed through to catch up, and it has left gaps that are difficult to overcome. Solving this in a way that eliminated extra code without having to look for ideas on Google felt good.

My project is in no way perfect, but building it has taught me a lot. I’ve found when it comes to coding, practice is paramount, and while this comes with frustration, I’m looking forward to continuing this journey.

Husband, Dad, writer, coder

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store