Blog Post #1
Or
How I Learned to Stop Worrying and Iterate Through Deeply Nested Objects
Hello, world! It’s been a long couple of weeks since my initial blog post. After diving into the world of Software Engineering, there are plenty of insights to share. The first 3 weeks of Flatiron School have proven challenging and the “pit of despair” closer than I ever imagined.
The first week of class was like a shock and awe offensive. The three weeks of pre-work had left me feeling confident and savvy in my ability to utilize JavaScript, CSS, and HTML, as well as manipulate the DOM and debug my scripts. Then, came the first lecture. We dove into DOM events, optimistic and pessimistic rendering, and immediately began attempting to build out a website for a hypothetical small bookstore. Every few sentences, I would hear a term that resonated from pre-work. I realized quickly that in order to stay on track with the course I would need to get ahead. Class ended at 6 PM, but my coding did not. I spent that evening at home learning the art of array iteration (.map(), .reduce(), .filter(), .forEach(), etc.) and DOM manipulation via the dynamic duo of querySelector() and querySelectorAll(). Though, personally, I enjoy getElementById().
After realizing the now obvious truth that Software Engineering is hard and quite similar to the myth of Sisyphus, I was able to get up to speed and even contribute the occasional answer in our lectures. Week 1 turned into Week 2, and we were suddenly deep in labs. And that is how I met Objectball.
It was presented as a challenge during an otherwise normal day of lectures and seemed like a casual exercise in “for…in” loops. What it turned out to be was a one-way trip into the pit of despair that would mark my 2nd week and serve as an inside joke among the class as well as a representation of the challenges we would need to overcome to succeed as Software Engineers. I created the deeply nested object with ease and could call key/value pairs with relative ease. I was confident that the loops would be a simple matter of focus and logic. I quickly found myself lost in the data, struggling to find ways to pierce the deeply nested object’s data and retrieve the answers demanded by the lab.
After hours of struggle with minimal progress to show, I recognized my defeat and began to seek help from colleagues. A few of the advanced students had created functions that I had never even dreamed of. They were able to chip away at the data, isolate specific pathways, and successfully return obscure data, such as whether or not the player with the largest shoes had had the most rebounds. Then, we debriefed the exercise and it became clear that despite being on pace with class content, there was a significant foundation to be built.
Over the next few weeks, I returned to Objectball multiple times a day. The instructors laughed, remarking that I likely won’t encounter challenges like these often as a software engineer. But I knew that if I could master Objectball, deconstruct and reconstruct the logic behind every argument, and succeed in retrieving these data, I would be able to climb out of the pit of despair with confidence.
And I did. After seeing numerous solutions to the Objectball, I was able to learn the key focal points of data to focus on. I learned to declare the variables that would allow me to separate and recombine the data into different branches, search through its keys and values, and return the sought-after data. As the days went by, more and more labs came and went, and all of them reminded me of the lessons of Objectball.
This hard work learning the logic of looping, DOM manipulation, and server communication culminated in our Phase 1 Coding Challenge. I spent the days leading up to immersed in lab exercise after lab exercise to test my skills and adaptability. I was simulating JSON Servers, modifying arrays, and sending GET and PATCH requests with ease. I could append new images of ramen, ducks, and characters to navbars, add votes and comments to each object while having the data persist and update the API. It was a remarkable difference from Week 1 and even the beginning of Week 2. When it came time for the coding challenge, I finished with speed, efficiency, and ease, including the extra deliverables.
Just like that, Week 2 became Week 3. The coding challenge had come and gone. Objectball seemed a distant memory. It was now time to create a website of our own. As I write this post, we have made incredibly quick progress on our website. The working title is Curiosity Hub and it pulls data from a NASA API that hosts images from the Curiosity Rover. We have coded our website to be able to pull this data, created a searchable database of these images, and a randomized function to display any photo from the cache. We added functionality to favorite select images, creating a new array of objects and pushing these images into a separate collection. It feels like a fun challenge to make otherwise dense data into an intriguing and inviting interface, which allows users to explore a world beyond our own.
After the struggle of the first week and the battle of the 2nd week, it is incredibly gratifying to look at the progress made and feel like I am truly learning these languages. Curiosity Hub is looking like an almost-real website and it hasn’t even been 3 weeks of coding. I look forward to the culmination of Phase 1, showing off our hard work to our colleagues, and learning about all of the amazing functions we haven’t coded into the Hub.
As we celebrate the close of Phase 1 with the reveal of our projects, I know to prepare myself for Phase 2. I know that we will wade into the deeper, increasingly complex territory of Software Engineering, and I know what it will demand of me. I believe that the Pit of Despair isn’t somewhere you visit just once, but an iterative, incrementing recurrence. However, each time I find myself in the depths of the Pit, I know that patience, determination, and cooperation will help me re-emerge stronger than before.
Until next time.