Thoughts as I help my daughter with high school python

An unrolled tweet thread, reflecting on what I noticed and how I felt helping my teenage daughter with a high school CS project …

My daughter (10th grade) is learning Python in school, and she's been coming to me for help with assignments. Some observations, as a #csk8 educator by day & dad by night…

1. Programming assignments haven't changed much over the years.

Tonight we were working on an encrypt/decrypt program (Caesar Cipher). Essentially: do or undo an ascii "rotation".

This is the kind of thing I remember doing in BASIC as a kid, probably age 10 or so. It's simple text processing, at least on the surface.

2. However, this assignment is HARD for new programmers. Why? Not the problem itself.

2a. It's hard to straighten out your understanding of the problem, and map out how you're going to use the building blocks you've just learned. It's distressing to discover how fuzzy "ok, i get the problem" actually is. You have to sharpen that considerably to get anywhere.

2b. Composing functions is common and essential. But this is hard too. I can see my daughter has mastered simple functions like input() and print(). But she struggled to compose ord(), chr(), and arithmetic together.

2c. It gets even harder when you throw in types. I watched my daughter *understand* the operations she needed to do to rotate a character through the ascii alphabet, but still leave a line assigning a numeric value to a 'letter' variable.

3. If the assignments haven't changed much, the programming environment sure has. I did BASIC on an Apple II, where there was just a text screen and ONE mode: you edited and ran your program right from command line. (Made sense at the time? 🤷‍♂️)

My daughter's class is learning Python using http://repl.it, so she gets a split screen for program + executing shell.

This means she's very quickly learned two different modes, edit and run, and has gotten adept at moving around, and juggling extra browser tabs for the assignment and Python references besides. This is cool.

When i jumped to xwindows and emacs as an undergrad, i almost drowned from the learning curve. I found it really hard to disentangle the signals i was getting from the code, from those from the IDE. My daughter just leapfrogged me. (🤩)

4. Another constant: her assignment includes a long list of test cases. She sees that as a burden 😫 but I see it as a really nice scaffold.

But that actually represents a change in perspective in *me*. After a decade of TDD (or at least understanding why tests are so important) I see that thoughtful testing is an essential defensive counterpart to the generative act of writing code.

5. I think my biggest contributions as a mentor for my daughter have been in what you might call Computational Practices and Perspectives.

I don't have anything to teach her about Python itself. I remember zero syntax. And she has already learned the basics and can look up the rest, anyhow. Good self-reliance there.

5a. But I definitely help her strategize her development.

ex: Baby steps. Try one thing at a time.

5b. Another: Test it at each step. And not with keyboard-mash inputs, or clever or goofy phrases, but with test cases chosen specifically to check the thing she just added to her code.

5c. The bedrock, though, is how to sit back and mull over the problem, and think through it out loud. Then, to assemble an approach in my head out of the building blocks that i know i can use.

5d. Maybe also: how to leave creative placeholders and debugging output to help yourself diagnose what's going on inside, from your perch on the outside. Put another way, maybe: help the Notional Machine talk to you.

After many years of software work this is now second nature to me, and watching my daughter I appreciate that this is a skill I've built over time.

That's a summary. I'm finding it fascinating to observe the #codingforkids coaching I give my daughter, as I give it.

In my day job at @KidsCoding I need to design effective but approachable coding activities. Because of our model, though, I don't tend to deal with (a) text languages or (b) tasks this advanced or intricate.

It's got me thinking about what an effective coding mentor might need to know what to do, and how i might approach more advanced tasks.

Epilogue: most of the stuff I'm talking about above – the mental models and discipline I've built over time, and my daughter is just now acquiring – is COMPUTATIONAL THINKING. Come at me, deniers. 😜

Originally tweeted by Mike Deutsch (@mdeutschmtl) on November 8, 2019.