My student apprenticeship at 8th Light is coming to an end. During the past three months, I focused on learning Java, test driven development, and the practice of writing clean code.
Java and OOP
When I was learning Javascript and Python, I would hear people say that these languages are object oriented. I learned about classes and objects but if I wanted a function, I just wrote a function in the global scope and that was what I did most of the time. Java is a strictly object oriented programming language. Everything has to be contained in a class. Every object has to be instantiated as an instance of a class. After spending three months with Java, I now have a much better understanding of OOP. I can now laugh at this quote which I read in Eloquent JavaScript a long time ago (and didn’t get it back then).
“The problem with object-oriented languages is they’ve got all this implicit environment that they carry around with them. You wanted a banana but what you got was a gorilla holding the banana and the entire jungle.” _ Joe Armstrong _
I never ran into any problem of this scale while building my small game, but I get it now. A class might have a parent class, probably a few dependencies, all of which are bundled together. Reusability might not be as simple as it seems.
Test Driven Development (TDD)
I’ve only scratched the surface with TDD. Testing is hard and test first is even harder. I feel that TDD is the area where I still need to improve the most. I have had the most success with TDD while writing the separate components of my TicTacToe game: the board, the rules, the validator etc… It becomes increasingly harder when I start to put things together in the Game, or GameSetup (not to mention IO testing). However, I learn to appreciate tests very quickly. I realize how important and useful it is to have tests in place every time I need to refactor my code.
Clean code
This is one area where I think I have made the most improvement. I am much better at coming up with expressive names, spotting and refactoring out duplications, writing smaller functions. Writing code is a lot like writing an essay. There are guidelines to make code more readable. And just like writing an essay, the first draft is never perfect. Even though I wrote my first draft with all these guidelines in mind, when I review it, I always find something to improve upon. And when my mentors review my code, they spot even more areas for improvement.
With a little help from my friends
Before the apprenticeship, I was primarily learning on my own. I sought help from one or two software developer friends. But I never went to any meetup, or study group. At 8th Light, there is a group of apprentices. Since I start learning to code, this is the first time I’ve had such a group of peers. We have stand up everyday to share with each other what we are working on, we learn new things together during Zagaku (30 minute lessons delivered by a crafter), seek help from each other when we run into difficulties, be each other’s audience during practice presentations as well as be there for emotional support during real ones.
Avni was the furthest along in the apprenticeship program when I first started. She was always willing to help me with Java or Git questions, and help Eric with Ruby.
Matt is often the first to cheerfully say out loud something along the line of “Great, I don’t know anything about this topic. Today I learn something new”.
Kyle is constantly sharing everything he knows, whether it’s JavaScript, or Vim, or getting the weather report in your terminal with this command: curl wttr.in
.
I’ve really enjoyed the company of my fellow apprentices and have learned a lot from them.
Saving the best for last
Software is among most difficult things I’ve tried to do (software and ballet). There are several times during the apprenticeship when both Vincent and Cyrus had to explain the same thing to me, separately. Sometimes I got it after our discussion, sometimes things did not start to click until 2-3 weeks later, and there are stuff that admittedly is still fuzzy until today. But I’m getting better at this. I’ve done things I didn’t think I could. Like Aina told me during my first week, it never gets easy, but it does get a little easier over time.
Before 8th Light, I was like a frog sitting in the bottom of a well. Through her tunnel vision, the frog only knew a small piece of the sky above her well. My software curiosity and interest were restricted to dynamically type, interpreted languages, JavaScript and Python to be specific. When I was learning on my own, I did not venture to any statically type, compiled language. At 8th Light, I see people from all different backgrounds become crafters working with a variety of languages. Besides learning Java and TDD, I also had Zagaku on many software related topics (queuing theory, type, digital logic, to name a few). I learned about different programming paradigms (object-oriented vs. functional). Now I want to learn a functional language. Probably what’s most valuable about the student apprenticeship is that this experience makes me more curious and excited about software development and gives me more confidence that I can do this.