How to teach programming and other things (2019) [video]
youtube.com
youtube.com
The first and most important point is to only teach people that want to be taught. Don't try to shove it to them, it just doesn't work.
I am teaching my kids programming and so I spent a lot of time thinking about it.
Nobody taught me programming. I just had access to things I could play with and it was fun to make them do stuff. I learned because it was fun. If somebody forced me to do things their way it would likely not be fun.
Another part I have learned is to solve problems on my own. It is not very instructive to have teacher tell you solution to every problem after some time.
I think solving problems on your own is core part of knowing how to program and so having somebody you can constantly lean on deprives you of chance to develop this important ability.
So in the end teaching my kids programming is basically making sure they have access to a good environment where they can do stuff that is fun. I answer questions if they have any and react when I see them bored or stuck for too long, but that's about it.
Sometimes I try to discuss a topic to see what kind of mental model they have and maybe I point something or show them a counterexample or a trick to steer them into better mental model.
I am not religious, but God bless Minecraft:)
That's how the speaker describes her initial approach and then later goes into the research on why it's not the most effective. In particular, the relative novelty of computer programming means we haven't had much time to develop a pedagogy, particularly a pedagogy for kids [0]. And even the methods that we have developed haven't been fully explored, but what research there is offers ideas for other ways to approach the education that yield better results than just letting them explore on their own (though, like the speaker, that's how I did it circa 1990 as an 8-year-old).
[0] I recently learned that the root of pedagogy (makes sense, just never stopped to think about it) has the term relate specific to the teaching of kids. There's a related term andragogy which is for the teaching of adults. This does make my sentence a bit silly, but the distinction is not typically made in English. Not sure about other languages.
And they have a lot of time to learn. I started learning programming in my late teens, before that there weren't even any computers around.
For example, `color = input("what is your favorite color: ") .. print(color)` seems like the variable name is somewhat related to the content. The first time I saw my daughter "get" variables was after some time she just started naming them `kj`, `jdh`, `hdj` when she was going to use them immediately after.
I am writing a log of how the lessons go: https://github.com/jackdoe/programming-for-kids
It helped with understanding where does code belong, how the code in the for loop is related to the code above it and etc.
I also spend time on things like how to steal someone's cookie, and what is a cookie day 51,52,53 (https://github.com/jackdoe/programming-for-kids#day-52-basic...) and also we spend a lot of time touchtyping, so her thoughts easier to be expressed through the keyboard.
Also as the talk also mentions, we spend a lot of time reading code, https://github.com/jackdoe/programming-for-kids#day-72-basic... i just print it on paper and we go over it with a pencil.
The most difficult lessons are the more abstract ones understanding what the memory holds, and what the variable points to https://github.com/jackdoe/programming-for-kids#day-95-basic...
Also tearing down commodore64 and showing the actual memory address space in physical manner helps, the variable color points to somewhere >here<.
We are spending about 50 days now only doing lists and for loops, I write the next day's lesson after the current lesson finishes, and I try to see what she grasps, and what is somewhat interesting and prepare for tomorrow.
- Did she have experience with board/card/pen-and-paper games before? Dice games?
- What was starting typing speed and how it goes now? Do typing lessons causes frustration?
- Have you noted some prior math skills? I see lessons start with strings but then move to "geometry" stuff
She just turned 10 when we started.
> Did she have experience with board/card/pen-and-paper games before? Dice games?
We did play https://www.thinkfun.com/products/robot-turtles/ quite often, since she was 6 or so. and we play a lot of ticket to ride, and some memory games (like Lumina). We don't play dice games though.
> What was starting typing speed and how it goes now? Do typing lessons causes frustration?
I have not actually measured the speed recently, as we use our own programs to train (she enjoys using her own programs a lot), but she is at the point that she is faster to type with 10 fingers than with 2.
> Do typing lessons causes frustration
Not at all, they are a lot of fun. I enjoy them a lot as well. Today we were using the program we wrote yesterday (https://github.com/jackdoe/programming-for-kids#day-100-basi...) and we tweaked it a bit to have 'pause/start' and she wanted to continue even after the end of the lesson.
> Have you noted some prior math skills? I see lessons start with strings but then move to "geometry" stuff
She is good in math in general, but at her age math is kindof boring. But geometry I think is fun, especially when you think of 'how do two rectangles collide', and since she plays a lot of roblox, the whole game is made of rectangles, so it is very relatable.
Tell folks they'll be using input and output from various places, numbers, strings of letters and bytes (images, video, crazy stuff), conditional logic to make decisions, a couple of key "data structures" to group data (lists, dictionaries), and organize code (functions). You could cover all of these in an hour lecture, then dive into them on subsequent lectures.
They'll absorb everything as they proceed, but a high level helps immensely to help organize concepts.
I wish other subjects did this too.
I also like that my chemistry teacher admitted to us that we were learning lies in General Chemistry. And then again in Organic and Physical Chemistry. We were being taught models that would be continually refined with new information.
They are elementary to your understanding now, but they are concepts not even available to someone who is just beginning.
This is why teaching is hard.
But a strange thing happens around 7th-9th grade (middle school where I'm from). Suddenly perceptions about programming drop off a cliff. Students increasingly describe programming as "frustrating", "confusing", "boring", "scary" and generally not enjoyable. If you look at their programming tools, they're using VSCode, Javascript, Java, C++, Visual Studio, Xcode, Eclipse... tools meant for professional developers!
And the results are a lot of them just stop considering programming as a viable career path. They are presented with these tools and told these are what the pros use, and when these students hit roadblocks many conclude they don't have what it takes to become a professional developer. They get discouraged and become disengaged entirely in the idea of programming.
Now, as I said this is all just preliminary research in my local community. Maybe things are different elsewhere, but I think there's an opportunity for programming tools that target this middle school group, to help facilitate a transition between toys like Blockly and full-blown professional developer environments.
I wanted:
1. A plain text editor
2. With syntax highlighting
3. With a "run" button that would display program output in a side area.
What I didn't want: version control, autocomplete, package managers, refactoring. Not even as little buttons on the side which never have to be pressed but which act as a visual distraction and suck brain power. I'm trying to get these kids to understand what a loop is, they shouldn't ever think about damn git commits!
We mostly settled on Notepad++ but I really would have liked something more basic, and ideally browser-based given the, uh, quality of our hardware. Trinkit.io was also pretty good, but python3 required a subscription (python2 does not...), and for some reason it had issues with cursor focus.
There are probably other solutions out there, but I've mostly been liking it as a way to help people (especially remotely) but at work and just in general with exploring programming. Especially since I don't have to walk anyone through installing anything, which is a PITA.
trinkit.io was really very close, and we maybe should have just purchased a subscription to use python 3, but as a little free class run out of a library, we didn't exactly have tons of funding.
[1]: https://docs.racket-lang.org/drracket/interface-essentials.h...
Functional programming works perfectly well with middle-school-aged kids. The only problem (imo) is that understanding (and hence using) recursive functions can be a barrier, but this doesn't even come up for a _long_ time (depending on your approach).
That site you linked as [2] is pretty bare-bones; try https://htdp.org/
Our classes were shut down at the start of COVID-19 in March 2020, but if we ever actually go again, I will definitely use this!
It was great expericence, both for me, the other parent helping, the teacher, and the students (as far as I could tell). I have written more about what we taught them, how we went about it, and things we learnt here:
In my experience, kids have no ideas on their own. And they don't like discovering things on their own. They want lectures and wait for assignments. Only few are different.
I was amazed how this went contra my expectations.
Step 2. Variables
Step 3. Types
Step 4. Loops
Step 5. Functions
Step 6. Strings
Step 7. Arrays
... on and on. This is a disaster recipe that 90% of the books, tutorials, etc follow. This is perfectly ok for a reference book but doesn't do anything to teach people how to program.
Programming language is tool to solve problems. Without a problem, you're loading people with dry concepts that don't stick in the brain. In fact, this is the same crap in Electrical Engineering classes as well - not one engineer in my class could tell when to use a BJT vs. a MOSFET. They all know the characteristics, how to compute the gain, etc. but not the practical aspects of why it exists and what problem it solves. Anyways, programming needs to be taught in a project oriented fashion with optional reference books. Teach them what happens if you hardcode a "loop", write repetitive code and then try to show what for-loop does. You gotta get into the brains of the pupils and imagine them asking "But why!?".
Sure, you start out statements with an = and variables are named things like B42 rather than foo... but there's a rather nice vector based functional language asking to get out of there.
To that end, teaching Excel could be a more accessible way to teach programming fundamentals than some other approaches.
I still miss LOGO and its unrealized potential.