DEV Community

Cover image for Phase 1: Coding for the Future.
Rylie Spriggs
Rylie Spriggs

Posted on

Phase 1: Coding for the Future.

With my first phase of Flatiron coming to a close, I've taken the time to do some self reflection over the last two months that I have been in the program.
On day one, I had absolutely no coding experience. My first few assignments were eye opening, pushing me out of my comfort zone and activating my technical mind like never before.
In the beginning variables and iterations seemed complicated enough, but after spending hours upon hours doing assignments, research, and collaborating with others, Ruby is by no means mastered, but I consider myself very familiar and capable with the language.

At the end of the section, I had to create my own Command Line Interface (CLI). Now, I have built them before, but guided by tests and assignment requirements, so starting from scratch and creating my own was the true test.
I was quick to decide that my project will be a Final Fantasy character guide (FFX is my all time favorite game). Luckily, I was able to find a community created API => https://www.moogleapi.com/.
From here using URI and JSON, I parsed through the URL and assigned it to my Character class.

 character_array = JSON.parse(response.body)
    character_array.each do |character|
        Character.new(character)
Enter fullscreen mode Exit fullscreen mode

Now, in my character class I used key value pairs in a hash to grab the attributes that I wanted.

 :name, :job, :description
Enter fullscreen mode Exit fullscreen mode

Then, in my CLI class, the fun began. Creating a menu that was interactive with the user looked like this:

 Welcome to the world of Final Fantasy!

 Are you ready to choose your Guardian?
Enter fullscreen mode Exit fullscreen mode

Invalid message:

 You've shaken up the Chocobos!
Enter fullscreen mode Exit fullscreen mode

Exit the program:

 May Yevon be with you.
Enter fullscreen mode Exit fullscreen mode

I used the Moogle API to puts out ALL characters across every Final Fantasy game in an indexed list. By searching a name it output their attributes, for Tidus:

Name: Tidus.

Job: Guardian.

Description: Tidus (ティーダ Tīda) is the main protagonist of Final Fantasy X, a rising star blitzball player from Zanarkand. After the gargantuan monster known as Sin attacks his hometown, Tidus is transported to the world of Spira. Lost, confused, and seemingly out of place, Tidus meets a newly-fledged summoner named Yuna, and her guardians. Yuna is to set out on a pilgrimage to put an end to Sin, and by joining Yuna on her pilgrimage Tidus hopes he will find his way home. Yuna is the main protagonist in Final Fantasy X-2, but her relationship with Tidus works as the prime motivation for her to start her quest..

It took me just over a week to get my code running, the moment my program responded flawlessly was a moment of pure joy, relief, and pride. After two months of constant learning, coding, and assignment after assignment I have learned and retained more than I ever expected.
After just one programming language, I am excited to delve deeper into the programming world. A hopeful jack of all trades, but still a master of none.

Top comments (0)