Tuesday, January 28, 2014

Book Review: Apprenticeship Patterns

Apprenticeship Patterns (Disclaimer: That's an affiliate link; here's the non-affiliate one) is a book I found on linked on HackerNews. I read it over the course of this past week during my commute, and I wanted to share my thoughts on it.

Description

First of all, Apprenticeship Patterns is a very general book. There's little to no code, and it talks mostly about high-level best practices. The authors describe a set of "patterns", similar to the kind you may find in a software design patterns book. These patterns are intended to be adapted and applied to the lives of aspiring software craftsmen as they come across typical situations in their careers. The hope is that even as the pattern language led to great strides in code quality by codifying certain programming concepts, the same can be done for developers' careers using these Apprenticeship Patterns.
 

The authors structured the book in a very interesting way. It's organized it in a very hyperlink-heavy format. There are constant, hyperlinked references to other patterns in the descriptions for each pattern. Sometimes the hyperlinked reference to a pattern exists even before that pattern has been covered in the book. The authors say they did this to encourage the user to meander rather than read linearly and hence discover the relationships between families of patterns.

Each pattern in the book has a context, a problem, a solution, and an action:

  • The context is the point in life where the aspiring software craftsman may find himself. 
  • The problem describes an artifact of that situation that may be stunting his growth as a craftsman.  
  • The solution describes a general plan the developer can undertake to resolve the problem and move on to the next stage of his career. 
  • The action describes a concrete first step the developer can take towards implementing this solution.
For example - Apprenticeship Patterns contains a pattern called "Breakable Toys." Roughly paraphrased:
  • The context: As a developer, you know that you learn as much (if not more) from failure, as opposed to success.
  • The problem: You're in a high-stakes environment where success is critical and there isn't much room for failure. 
  • The solution: Design and build toy systems outside of the context of what you do for work. Do something like, build a wiki, or a calendar, or a to-do notes system. Or build a game. This will allow you to fail without suffering severe consequences. 
  • The action: Build the world's simplest wiki.
Of course, there's a lot more detail in the actual book, but that's a general idea of what these patterns look like. 

Criticisms

Apprenticeship Patterns describes the mindset you need to have in order to become a truly great developer. For me, it was a good reminder of what my motivations should be as an aspiring craftsman, and which aspects of my career I should be focusing on more. However, it's a very high-level reminder. Maybe it's the stage in my career, but I think I would have preferred something a little more gritty.

The whole hyperlinked thing definitely did not work for me. I'm the sort of person who read those old choose your own adventure series by bookmarking every choice and then once I had reached an ending, I went back to the last choice I made, and made a different decision until I had recursively "read" the entire book. If I were looking up articles online, I wouldn't mind working with the hyperlinked approach. When I'm reading a book, please let it be linear. 


Finally, a design patterns book is usually something you consider as a reference. Human lives and careers are infinitely more complex than code. I don't really see myself using this as a reference book for various stages of my career. 

Take-aways

Like I said earlier, Apprenticeship Patterns is a good reminder of what one needs to do to be a world-class developer. Here are some solid take-away points that stood out to me:
  • Surround yourself by people who know more than you
This is kind of a given. It's well known that you are the average of the five people you spend the most amount of time with. If you want to be more like someone, go spend time with them. Apprenticeship Patterns places a lot of value in social learning - learning with and from people. Social learning is much much much better than learning from a book or a video and is, I think, one of the prime benefits why going to an institution of higher education beats out MOOCs. 
  • Don't be ashamed of being dumb. Everyone was dumb once.
Ask questions. Don't worry whether someone might think you stupid. It's far more likely that they'll appreciate sharing their knowledge with you. If not, then they're not the sort of people you want to be asking questions anyway. This is something that has been driven into me at my job and something I've really come to embrace.
  • It might be a good idea to reinvent the wheel if you're doing it as an exercise.
This is something I got from the Breakable Toys pattern I mentioned above. For a while now, I've wanted to build an app that I can publish to Google Play, but every time I got an idea, I checked Google Play and someone else had already done it. I realized that "don't reinvent the wheel" is so deeply ingrained in me that I was hesitant to do something that had already been done, even if its only purpose in doing it was to hone my coding skills.
  • Don't be afraid of taking on something difficult
Sometimes, throwing yourself into The Deep End (that's a pattern) is the best way to learn. I'm a fairly conservative person myself, and I've found that every time I've pushed myself into taking ownership of a difficult task, regardless off whether I consider myself "ready", I've grown tremendously - both as a software craftsman and as a person. Yes, there's a chance that you'll drown, but as my boss at work reminds me, what's the worst that could happen? No one's going to die if I fail (my fiancée who's doing medicine can't say the same about herself).

Summary

In summary: Apprenticeship Patterns (non-affiliate link) is a very general book. It's a good reminder about the values of a software craftsman, but it's also very high-level and not as concrete as I would like. It's a short read, so if you have the time to spare and you haven't read a similar "inspirational" book recently, definitely do read it. We can all use reminders about what it means to be a software craftsman, and this book is definitely a good reminder.