Practice Makes Programmers

A few iterations make even functional programming digestible

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.

Études for Elixir is out now. (The GitHub version is also available.) Our Introducing Elixir is now available in Early Release.

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.


Sign up for the O'Reilly Programming Newsletter to get weekly insight from industry insiders.
topic: Programming
  • foobarmustache

    I’ve been going to the NYC Meetup and it’s great! The group discussions tend to take us deeper and further into erlang than I’d probably go on my own.

  • Patrick Mulder

    Nice idea! Maybe an Études on Git, esp. on Git rebasing, might be interesting. It might also be interesting on a higher level, like Études on TDD might be nice.

  • benjamintanweihao

    I really like this idea. Looking forward to try this tomorrow. By any chance this will be available as a hard copy?

  • Mal

    A practice book for python will be. Awesome.