An Ounce of Prevention
I have just completed the first week of Launch Academy, and it has been incredibly invigorating to just be able to focus on developing my technical skills. It is amazing how much and the other members of my cohort have been able to learn in a single week.
I feel more confident in my decision to become a software developer each day. I think that people from outside the tech industry think that programming is an isolating experience, and they also do not see programming as a creative endeveaor. I am happy to see first hand that software development does not conform to these stereotypes. I often times found that I was most productive when I was not typing away at a keyboard. Instead, I was often times at my best when I was talking with another aspiring web developer about our approaches to a particular problem, or when I was visualizing a process on paper.
I am already starting to see how important these skills will be as I start to address more complicated programs. Over the weekend, I worked on a coding challenge that Launch Academy had prepared for us. In this challenge, I was given a hash of data about particular restaurants. The data stored in this hash was often times buried several layers deep in several sub hashes. For example, the challenge required me to compare the prices of several items that were lactose free. Unfortunately, these pieces of information were at very different points in the data structure.
The first time that I went through this program, I solved this particular problem by simply taking tiny bits of data and then storing it over and over again until I was able to identify each lactose free item and its price. I did not properly plan out this part of the program, so my solution was very haphazard and unwieldy. I basically just solved the problem by a lengthy process of trial by error, and I felt like I needed to figure out a more methodical way of approaching problems like this where I had to gather specific data points from much larger data set.
I went back and wrote this program again two times to see if I could gain any insights into how to efficiently gather and compare data. I eventually realized that it was best to just focus on gathering a particular data set that would be vital to answering the question that I was trying to answer. After I obtained that one bit of data, I could go on to write a method that would be able to pull similar bits of data.
For example, I started off rewriting this code challenge by trying to write the expression that would pull one particular meal that one restaurant served for breakfast. I then converted this expression into a more generic expression that could gather information of the other food items. I was then able to write a method that used this generalized expression to pull all of the information about each item of food that each restaurant served.
When I completed this exercise, I realized that I should have been planning out my programs more carefully using the white boarding and pseudo-coding techniques that Launch Academy taught me. Both these techniques require the programmer to identify all of the sub-tasks that he or she must complete in order to solve the overall problem.
If I had done all of this planning, I may have realized that I should have just wrote methods to solve each one of these subtasks. It would have been much less confusing and frustrating to just write each individual method separately rather than to just try writing a single, giant block of code that haphazardly solves the bigger problem.
I remember reading on Quora that a software developer’s productivity cannot be measured by the number of lines of code that he or she writes in a given day. Instead, it is measured by the problems that the developer is able to solve. The whiteboarding and other planning techniques that Launch Academy taught me are effective problem solving tools, so I should really see them as a much more vital part of my job than I had previously. Do more conceptual work early on in the project will save me a lot of trouble when I get to the coding later on.