I think teaching programming is pretty easy as long as you have mindset.
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.
> 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.
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.
Teaching programming is extremely difficult, I think because it is a learning staircase instead of a learning curve.
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.
Wow that is an awesome comment I think maybe even teaching people in languages such as shell which specifically and explicitly state when variables are being referenced (prepended with the $ symbol) would be an excellent technique in teaching to let students understand the different syntactics of programming, I think syntax highlighting would also help a lot, cause it would let kids (on their own) figure out that all text in pink is of the same groups and refers to variables, while code in blue is a function, therefore a ‘group of code’. Of course, I’d maybe explain first what data types there are and really what a computer is, because many people don’t necessarily understand what is happening behind the scenes and do not see it with such technicalities, maybe the majority say about computers that they ‘just work’.
The one thing that helped a lot, was teaching HTML. How td is child of tr and sister to another td, and it has a child of h1, or how things have properties border=2 and etc.
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 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.
That’s just great, what a great parent you are! I personally do not know much HTML or even much about web dev in general but I suppose it’s worth a try.
> 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.
I wish subjects enumerated the tools up front so it is easier to fill in the gaps and make connections.
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.
Lies to beginners are necessary thing, but things concepts like "strings" "bytes" "conditionals" "lists" "dictionaries" "functions", are not to be assumed. Each one is more than a single lesson's instruction.
They are elementary to your understanding now, but they are concepts not even available to someone who is just beginning.
The speaker is a researcher on programming education at the University of Leiden. If you’re interested in this talk, would definitely recommend checking out her programming language, Hedy (hedycode.com), or her new book, The Programmer’s Brain https://www.manning.com/books/the-programmers-brain
I've done a little research on student perception of programming in grades 5-9. One thing I found was that kids in 5th/6th grade (elementary school where I'm from) love programming. It's fun and engaging, and it feels like a game to them. If you look at their programming environments, they're using things like Logo, Blockly, and Scratch, which are intentionally designed for this demographic. There's color characters and graphics, interlocking blocks, programming models tailored for their level of cognitive development, etc. It all works very well.
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 had a hell of a time finding an IDE for a Girls Who Code class that used Python with middle schoolers.
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.
Well, if you're willing to try something different, look at Racket with its DrRacket IDE[1]. It couldn't be simpler. Racket is actually a decent starting language for beginners, and some universities start off with it for their introductory CS courses (no prior experience required)[2], but I'm not quite sure how well-suited functional programming is for middle-school-aged kids.
>I'm not quite sure how well-suited functional programming is for middle-school-aged kids
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/
Jupyter notebooks will give you syntax highlighting, and all you need to do is hit the run button or Shift+Enter and it will run the code that was just typed.
Replit, potentially. No need to install anything beyond a web browser and once the project is setup, it really is just pressing play to get it running. Then things like version control can be added on later if there's interest, but even without it sharing projects is sharing a link. This also can make it easier for the learner to take this home and not just do the work in class or the classroom setting.
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.
I looked at repl.it, it was much too complicated! It had integrated version control and other stuff I didn't want.
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.
The integrated version control can mostly be ignored, I don't recall it ever pestering me. I did set up some as git repos and sync to GitHub, but most of the time I'm just spawning a new session and throwing code in to demonstrate a particular language feature or concept. It does have autocomplete, I forgot about that bit (I guess it became invisible to me since I'm so accustomed to it). I'm not sure if it can be turned off.
I was helping teaching my son's grade 8 class for about a month and a half. I was surprised at the enthusiasm from the majority of the students - most of them were really into it.
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:
We're trying to create a more advanced (3D) text-based version of Logo that we hope will fill in the gap between blocks-based languages and 'real-world' languages https://turtlespaces.org
I have had success teaching programming to beginners by simply letting them program simple text based adventure games. I show them the minimum to get started (print, read, if) and they run with it, creating their own little adventure games. Then they start asking question about “how do I keep track of health?” and I introduce variables etc. But only when they have identified a gap in their knowledge, and have an interest in filling that gap. I had a class room full of kids excitedly programming away even after the class was done. And the quicker students started teaching other kids. It was a wonderfull experience.
That sounds utopian. Maybe there are also other reasons why this worked?
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.
I personally think you never really learn anything the way it feels you do. Instead your mind is actually much more like a multidimensional lense that given enough training data will start to pattern match “learning to program” or whatever other skill you’re trying to learn. An important one no one teaches is “decipher business requirements into pseudo-code”… oh and the feeling of frustration and being out of your depth is the lens moving.
... 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!?".
I can't think of any better entry to programming than making games. You get the loop, the variables, conditionals, functions, and gradual sophistication grows organically. For kids, I would look for a programming language where making graphics is easy.
Very interesting talk. I am currently trying to teach my daughters some python, as a means of filling summer vacation time. Also writing down some notes while preparing the lessons: https://github.com/MoserMichael/pythoncourse . I will try and make them read the python statements aloud, lets see if it works... Not sure about the tests mentioned, I somehow dislike this type of multiple choice questions, don't know how to do something like that.
Also check out her excel talks, her spreadsheet skills are better than my programming skills, it's insane. This VC funded push to unbundle excel is just stupid, fast food for IT.
I'd contend that Excel spreadsheets are an acceptable LISP.
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.
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:)