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!

Electrical Engineering 101

The current state of Firepower- after fixing a couple of broken connections and replacing all (ALL) of the fuses, most of which were horribly mismatched, Firepower boots! Sort of. One of the coils is most likely shorted, as evidenced by the knock you hear when you flip on power, the horrible smell, and the immediate failure of the solenoid fuse. The previous owner might not have noticed the problem because they had a 20 amp fuse in a 2.5 amp rated slot; however, they might have noticed if they had left the machine on for any period of time because the coil would’ve definitely caught on fire.

So now I have to fix it. There are a few things that could be wrong. The coil itself could be shorted- I’ll know this because I’ll measure resistance across all of the coils, and see if one is significantly lower than the others. There is a diode that runs across the two terminals of the coil. I should probably know what it does, but I don’t. I do know that sometimes the diode shorts, so if the coil isn’t shorted maybe it’s the diode. If that’s not the problem, then one of the transistors on the driver board (which controls current to the solenoids) could be fried, so I’d test all of those next.

If that doesn’t turn up anything, well, that’s bad news. The two remaining problems are that a chip on the MPU or driver board could be bad- at which point you might as well buy something like this. Or the 40-pin connector could be bad, which is common on these games. The MPU (game logic) and the driver board (controls power to the lamps/solenoids) sit on top of each other, and are connected by a 40 pin connector which is super fragile. You can see it in the below image- it’s the connector between the top (MPU) and bottom (driver) boards on the left.

So anyway, a solid couple of hours of ruling out various things that could be wrong, starting from the most localized problem (a bad coil, which would only affect one mechanism) to the most global (a bad chip or 40-pin connector, which would break whole game systems). Not too different from debugging software!

Mental and Physical State

Everything starts to feel a bit floaty. For one thing, it is just a weird, very mentally taxing environment. You are in a pretty small space with 100 people and a lot of very loud pinball machines. Between rounds you can escape outdoors or to the hallway, but when you’re playing it is really a total sensory assault.

Pinball also demands a very high degree of attention. It’s one of the things I like about it- it’s a very meditative game in so much as it tends to naturally quiet other parts of your brain which aren’t engaged with tracking and affecting the movement of a very small very fast object.

Physically, you’re on your feet on a concrete floor. My lower back suffers from the usual forty year old wear and tear, so that’s uncomfortable. There’s a bit of an adrenaline rush from playing, though, so at least right now I’m not feeling that physically tired. And I’ve got coffee for when I do – saving that for later!