O'Reilly logo

Apprenticeship Patterns by Adewale Oshineye, Dave Hoover

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Practice, Practice, Practice

The people we know as masters don’t devote themselves to their particular skill just to get better at it. The truth is, they love to practice—and because of this they do get better. And then to complete the circle, the better they get the more they enjoy performing the basic moves over and over again.

George Leonard, Mastery

Context

You want to get better at the things you do and you want to develop Concrete Skills in new areas.

Problem

The performance of your daily programming activities does not give you room to learn by making mistakes. It’s as if you’re always on stage.

Solution

Take the time to practice your craft without interruptions, in an environment where you can feel comfortable making mistakes.

In an ideal world we would use the technique of “deliberate practice” as described in K. Anders Ericsson’s research, and a mentor would assign you an exercise based on her understanding of your strengths and weaknesses. When you finished the exercise, the mentor would work with you to rate your performance using an objective metric and then work with you to devise the next exercise. Your mentor then would use her experience of teaching other students to devise new and more challenging exercises that would encourage you to reflect on your skills, find more effective work habits, and develop the ability to “see” in terms of ever more abstract "chunks” of knowledge. Over time, this chain of exercises would hone your strengths and correct your weaknesses. Sadly we do not live in an ideal world, and apprentices must fall back on their own resources to achieve the same effect.

“Pragmatic” Dave Thomas borrowed the concept of code katas from martial arts. A kata is a choreographed sequence of movements provided by a master to help his students internalize the fundamentals of the art. Katas are performed without opponents, emphasizing fluidity, power, speed, and control. Dave Thomas posted kata in his blog, encouraging craftsmen to use the kata to practice.

Laurent Bossavit and a group of software developers in Paris took the martial arts metaphor a step further and created a coder’s dojo, a place where people could meet regularly to publicly perform code katas. “Uncle” Bob Martin, inspired by the Paris dojo, also posts katas to his blog, espousing the merits of practicing the craft:

Obviously code kata are just one of the ways to Practice, Practice, Practice (Breakable Toys are another). The key to this pattern is to carve out some time to develop software in a stress-free and playful environment: no release dates, no production issues, no interruptions. As Dave Thomas says of practicing, “It has to be acceptable to relax, because if you aren’t relaxed you’re not going to learn from the practice.”

Short feedback loops need to be incorporated into your practice sessions. While practice is good in theory, if you’re not getting periodic feedback you’re probably developing bad habits. This is the beauty of the coder’s dojo: public performance within the context of a tight-knit community of craftsmen. This need for constant feedback lessens as you grow as a craftsman, and is gradually replaced by your duty to take on the role of a senior apprentice, modeling good habits by practicing with less experienced developers.

One of the reasons that the masters described by George Leonard love to practice is that they do something a little bit different each time an exercise is performed. The point is not to hone your memory, but to discover the nuances in even the simplest skilled activity. Your grandmother may have told you that practice makes perfect. She was wrong. In fact, practice makes permanent. So be careful what you practice, and constantly evaluate it to ensure you haven’t gone stale. Choosing the right thing to practice every day is a skill almost as important as the act of repeated practice. A good way to ensure you have interesting exercises to use in your practice sessions is to trawl through old books like Programming Pearls, More Programming Pearls, or Etudes for Programmers. They were written long enough ago that they had no choice but to focus on the fundamentals of computer science rather than the latest fashionable framework. Their authors understood that getting the fundamentals of algorithmic complexity and data structures deeply ingrained is seldom harmful and rarely stops being useful. These topics also offer a near-infinite source of interesting little problems to keep your practice sessions interesting, fresh, and educational.

Action

Find an exercise in one of the previously mentioned books or contrive one of your own. Make sure that it’s just a little harder than one you know you can easily solve. You should have to struggle to solve it the first time. Solve this exercise from scratch once a week for the next four weeks, and observe how your solutions evolve. What does this tell you about your strengths and weaknesses as a programmer? Take that knowledge and try to find or devise a new exercise that will have a measurable impact on your abilities. Repeat.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required