In the course of drafting my code, I often find myself wondering how I could have possibly raveled myself into such a sloppy cesspool of incomprehensible Ruby.
It’s early in the course and the instructors have been emphasizing the importance of breaking your code into small methods that can be altered and duplicated and played with. The idea, from my view, is that a separation of powers makes for simple alterations.
The first week we were here, I wrote a cash register application that didn’t contain a single method. This code was horrible. I have no idea how I’d build on to it or use any part of it in some sort of practical context. So naturally, when they asked us to add more functionality to our program, I started from scratch.
This is not uncommon. We’re encouraged to rebuild programs from scratch. It helps solidify the concepts we learn, and organize our code more efficiently.
Proof of my progress came to me this morning. Friday afternoon, we were given an assigment that that began as a simple script that repeats the users input. The assignment then mandated progressively more complex iterations that would have been difficult to implement without using methods.
As I mentioned in last night’s post, I spent my weekend working on my breakable toy, so I never got around to working on this little gem. I got to class this morning and realized I was behind, because everyone else had finished the assignment.
I asked around, most people took an hour or two to complete the assignment.
I burnt through it in about half an hour.
Not only did I finish the small project in record time. I was so methodical in my production, that I never felt out of my element. Even when I wasn’t sure, I just kept typing whatever I thought made sense.
This small accomplishment is the sort of validation that keeps me working every day. It’s proof of concept for Launch Academy. If I had tried to do this two weeks ago, it would have taken me a whole day. Maybe longer.
My skills are growing at an exponential pace, and it feels great.