Software Development Phase 1: CLI Project

Hunter Kolasa
3 min readDec 5, 2020

As the first major project on my path to becoming a proficient software developer, building a CLI was a fairly daunting task. The premise of the project was to build a command line interface that would allow a user to access multiple levels of data from a chosen API based on their inputs. As simple of a concept as it seems, I had some initial trouble wrapping my head around the best way to organize my code. A couple hours and several failed flowcharts later, I was able to find a viable API and draft up a decent plan for how to approach the project.

Given my interest in stars and the unthinkably massive nature of space, I chose to build my CLI around NASA’s Exoplanetary Archive. My initial idea was to allow users to access the full list of known exoplanets and then further select a single planet to see more detailed information. Well, that was quickly foiled by a data return containing over 4,000 planets each with approximately 20 statistics. After a short hiatus of repeatedly knocking my head against my wall, I came up with a fairly straightforward solution in three main parts. First and easiest, I would allow users to select a distance from the sun that would limit the data return only to the planets within range. Second, I would only return a specific set of statistics for each, reducing a set of 20+ to around 7. Last but absolutely the most difficult, I would rearrange the returned hash of data so that it would list whole star systems as opposed to exoplanets. This added an extra level of depth to the user experience and just made sense as pertaining to organization.

After painstakingly building a rehashing method, I further dented my wall ensuring that the returned lists were correctly formatted and free of duplicate entries. With that, the functionality of the code was essentially complete. I began to build a more appealing CLI for the user and passed my code on to peers for testing/breaking. This last half of the project has been almost entirely refactoring and bug-fixing (which I am actually still in the process of as I type this). From top to bottom, my program allows user access to all known star systems within their selected distance and further allows individual information on each system including stellar mass, radius, temperature, number of exoplanets and their names.

Despite the aggravating moments and cost of new plaster for my wall, I thoroughly enjoyed this project and hope to continue updating it as a come to understand better control flow, organization and efficiency in my coding. What currently resembles a patchwork quilt of puts commands, if-else statements and while loops will eventually become a well-oiled API requesting machine with deeper functionality and quicker runtimes.

Anyways, its getting late and I have about ten thousand little fixes on my list before I submit so I’ll see you in the next blog!

--

--

Hunter Kolasa

⁍ Full-Stack Software Developer ⁍ Biology/Environmental Conservationist ⁍ Avid Computer Nerd⁍