Strange Loop Day 1- How to Teach Programming

I’m here! I’m at Strange Loop! It’s opening keynote time!

The opening keynote was presented by Felienne Hermans. This was more like two talks which are sort of connected, but she didn’t make the connection explicit. In the first half, she talked about the work she is more known for, about spreadsheets.

Her grad studies started with research in a domain specific language for finance. She interned and discovered that finance already *has* a DSL- it’s spreadsheets! And people were programming all over the place in finance. But, their work wasn’t recognized as programming- because it was in spreadsheets. So, she decided to change this. She started presenting her work on spreadsheets-as-coding at conferences. The universal reaction? “That’s not REAL programming”

Well, she was in a running club, and even though she was slower than many of the members, no one told her “That’s not REAL running”. And she was in a knitting club, and even though she knitted with old-fashioned straight needles when everyone else was using circular needles, no one told her “That’s not REAL knitting”. Why are programmers so mean? It made her sad and burned out, so in an effort to get her mojo back, she started teaching programming to kids in a coding club.

Spoiler- she didn’t know how to teach programming. She thought about how she learned, which was sitting in front of a computer and typing in BASIC code from a book, and then fixing all the syntax errors introduced in her transcription, and then fixing all the syntax errors that happened while she was fixing syntax errors, etc. So she gave the kids some books and said “come find me when you have questions!” And that’s how most people teach coding, because constructivism.

But that’s not how we teach someone to read. So she read books on how we teach reading, and discovered that there are all kinds of pedagogical wars about how to teach reading. Why don’t we have fights about how to teach programming? Why do we think “oh you just do it for a while, and you find all sorts of bugs and it’s painful and hard and you make tons of mistakes but trust me one day it’ll be FUN”?

Let’s start some fights! Fight #1- exploratory approaches to learning to write code suck. Just explain shit and practice it. Fight #2- you don’t have to write code to learn how to code. In fact, in a study of three groups- one group that was just asked to write code, one group that asked to write code and also to read code and explanations of how the code worked, and one group which didn’t write any code but just read code and explanations of how the code worked- the third group performed just as well as the second group, and both performed better than the first group. You can learn to code just by reading code. This sounds like a bit of a duh moment because most coders learn how to write more code by googline and reading someone else’s code- but remember, that’s what you do when you’ve already learned to code, not necessarily how you learned to code in the first place.

And this isn’t just about learning- it’s also about motivating people to learn. Motivation- “let’s get excited to program! you’ll make money! it’ll be great!”- doesn’t lead to skill. Skill leads to motivation.

There’s way more in the talk, including a fascinating bit about reading code aloud. Watch it here.

Oh- and so why did I say the connection between the first half (spreadsheets-as-code) and the second half (teaching how to code) wasn’t explicit? I mean, it was presented as a narrative- this is what I did, this is how it made me feel, this is what I did next, these are all the things I learned from that thing. But I also wonder if the way knitters and runners learn how to do their thing, as opposed to the way most programmers learned, has something to do with it as well.

This talk was a great way to kick off Strange Loop! I realized I had never really thought about how I learned to code, or how to teach others, before. And it made me question my usual approach to teaching things, which is “try some shit and call me when you get stuck.” Science says- Not a good approach at all!

Leave a comment

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.