programming is terriblelessons learned from a life wasted

Learning from Nostalgia

If you ask any programmer how you should learn to program, you will get the following answer:

People should learn programming from my mistakes by repeating them exactly, because my mistakes have been refined and polished over the years

Nostalgia, and the way in which the teacher learns best—both have a significant influence on how programming is taught. A cargo cult of learning—do what I do and you will learn what I did.

Much of the discussion of education focuses heavily on “what students must know”, rather than “What do students want to learn, and how do they learn?”. A vital skill for a programmer is a willingness to learn and to explore unaided. Instead of encouraging autodidacticism, we prescribe a series of features, tools and factoids to consume and regurgitate.

Sure, a little guidance and help goes a long way, but many teach in the way that they prefer to learn, rather than working with the student’s preferences. If someone asks you to teach them to program, ask them what they want to create, and then guide them in the right direction, rather than asking them to copy you.

I encourage people to find a sandbox to play in. Be it a 2d environment with a turtle drawing pictures, or a musical environment, or even a browser—somewhere you can add elements and program them, experimenting by changing existing programs. I try to focus on getting them to explain things to me and asking questions, rather than the drudgery of rote exercises. I want the computer to be a tool for learning and exploration, driven by the student.

Why? I must confess that I too am tainted with a nostalgia—for Logo

Logo’s creation is described in Seymour Papert’s book, Mindstorms, in which Logo and Turtle Graphics are used to build a ‘math world’ for students—an environment in which to construct their own rules and problems—leaning by creating, exploring and experimenting in this world. One example from the book is how code helped someone to learn english grammar.

The student in question was struggling with tense, so the teacher suggested she wrote a poetry generator. Working through the code allowed her to internalize the rules they had originally struggled with.

Mindstorms argues that learning is more fun and rewarding when the student is allowed to be creative. Papert isn’t alone, I’ve seen a similar idea espoused in Math education—let the students solve the problem, rather than making them memorise a solution

Creativity doesn’t require originality—when I found the web, I started by taking other peoples JavaScript, HTML and changing things to make things work. Playing with code I didn’t understand to find out how it worked has always been more fun for me than laboriously stepping through a problem in tiny chunks. I learned a lot more from reading other peoples code and changing it, than I’ve learned from writing my own

Despite my nostalgia, I’m not arguing for everyone to learn Logo, or that we start teaching dynamic html, or demanding people program on 8-bit machines in a crazed basic dialect. I’m arguing we should be optimising for fun—back when I learned, I couldn’t share code so easily with my friends, either I had to type it in manually again each time, or find some fragile electronic container to lumber around. Now I can hack up something in JavaScript for the rest of the Internet to play with.