Programming gets easier and easier as you do more of it. Languages and logic become familiar, in ways that extend from looking up less and less all the way to muscle memory in your typing. The first few iterations in a new language are often difficult, as everything seems odd. Shifting not just to new languages but to new approaches makes practice even more important.
One of my worst features has been that I never liked to practice. I understood rehearsing, working together in a group, but practicing? Exercises, especially for the sake of exercise, were never my thing. That character flaw has hobbled my writing. I can come up with examples for books, focusing tightly on an issue I’m explaining. But then, really? I have to ask readers to go solve a particular (already solved) problem?
I’m not alone in this—too many writers have inflicted that attitude on their readers. Exploring sample code is not the same as writing your own code. Miguel de Icaza points out that:
When you finish a chapter in a modern computing book, there are no exercises to try. When you finish it, your choices are to either take a break by checking some blogs or keep marching in a quest to collect more facts on the next chapter.
During this process, while you amass a bunch of information, at some neurological level, you have not really mastered the subject, nor gained the skills that you wanted.
We can fix this.
While I was writing Introducing Erlang, I was extremely happy to hear from J. David Eisenberg. I’d edited his SVG Essentials long ago, but he was doing something new and different: he was writing an extended series of exercises to complement Introducing Erlang.
David’s exercises were almost as big as the book itself— exactly as they should be!—and evolved into Études for Erlang, a collection of exercises for learning basic Erlang and functional programming. They’re available for free online, can be extended through GitHub, and include a key to using them with other Erlang books.
A New York City meetup has taken the études concept to a whole new level by working on them together. As much as I love instructor-led classes, I also wonder about how examples can find new life in groups of people helping each other. The ‘flipped classroom‘ may not need an actual instructor present.
(And yes, I know, musical études typically start harder and are meant to be repeated. We’re growing toward that.)
We’re taking the same approach with Elixir, an exciting new language built on Erlang’s virtual machine but with syntax more like Ruby. Macros make metaprogramming possible, and the approach overall feels like a gentler way to bring the power of Erlang’s functional programming to a broader audience.
What kinds of études would you like to see? We’re just getting started, but it feels clearer and clearer that practice is a key part of this kind of learning.