Ask HN: Is Scratch a good tool for teaching coding?
I'm doing some research on the coding programs available for kids and have come across some pretty negative reviews of Scratch from developer parents...essentially along the lines of anything more than trivial code becomes a big mess. Or that it's good for exploration but not structured learning.
On the other hand, I know a lot of families and kids who love it. It's truly incredible that this free resource was created, persists, exists that's been enjoyed and used by so many kids around the world.
What's your opinion? Is Scratch a good tool for teaching coding to kids? Why or why not? What, if anything is a better approach/program? Scratch isn’t meant to build massive projects where everything needs to be well structured and organized. It’s meant to teach some basic concepts and give learners a quick win. I built a little game on Scratch for my nephews. It was starting to boarder on turning into a big mess, but it was much easier than if I would have done it in an actual game engine, and one of my nephews almost instantly jumped into the code and start tweaking variables and had a great time tweaking and changing stuff, with little or no direction from me. I think there is a lot of value in presenting code in a way that makes kids want to use it, where it feels like a toy. It should be about exploration. “Structured learning” sounds like school, and isn’t always the best way to learn. Scratch lets them learn by doing, through experimentation. That’s how I like to learn. At some point if the kid wants to keep going, they will need to graduate to something else, but at least at that point they should have a general idea what variables, conditionals, etc are and an understanding of basic logic. Those skills will translate to every other language. Thank you so much! Very helpful to see how it's a foundation for moving on to other tools. I know that code.org's lessons have a "view the real code" box, helping to ease one into the "here's how to think about problems and structure, but here's the actual JavaScript that underpins it". If you haven't tried that, it may help I also recently learned that Brilliant uses block-based lessons, too, so there's obviously some there-there I would guess that a lot of the problem is one of actualization: how does one go from solving "someone else's problems" to one of realizing their own ideas. Based on what I've seen, I'd guess that a Minecraft mod port that maps blockly down into lua would go a long way toward "do some things that materialize change in an environment that is familiar." I haven't used Roblox, but I believe it's similar so if they have a programming language, same-same. I started to suggest using Valoren <https://gitlab.com/veloren/veloren#get-veloren> since it's actual FOSS and thus would be much, much easier to integrate into, but I haven't played it in order to know how much uncanny-valley it would have with any preexisting Minecraft experience Tangential, but kind of related, a lot of the first "real" programming was in monkeying with webpages, since "view source" used to go a long way toward showing how any cool trick was done. I guess the risk to that approach is that kids may not care very much about swooshing colors or alert("hello") but it for sure is accessible. I can recall typing Basic programs out of magazines to get a game running, but I don't actually recall what happened from there in order to know if "learning by transcription" is helpful or just feels rote Thank you. That's super helpful! Harvard’s introductory-level computer science course, CS50, teaches Scratch for the first week. The course then uses Scratch like pseudocode to outline the high-level structure of programs for students to write in C. This is a proof of concept that Scratch can be part of a good introduction to programming, though the introductory coursework I took at university went straight to learning with Python instead of with Scratch. For teaching a child, it depends on the person’s interests. You can’t go wrong with Scratch (it looks fun, it’s easy to start with, and it’s immediately accessible within a browser), but the child might eventually want to move on to a more flexible language like Python for more complicated programs. How interesting. I didn't know that about the Scratch course at Harvard. Seems like it is a good intro for sure. Thank you! It's a nicely designed course, and you can find a version free for any person to take online and receive a certification (with the submission of auto-graded assignments within a certain timeline): https://cs50.harvard.edu/college/2023/fall/syllabus/ The lectures are well-produced and come with detailed lecture notes, though the assignments are technically difficult to complete. You can find the materials for Week 0 on Scratch is at: https://cs50.harvard.edu/college/2024/spring/weeks/0/ It's not a Scratch course, they just use Scratch in the first week of a programming course which uses C, Python, JavaScript, SQL. My daughter uses scratch and loves it. My sense is it's good for learning really basic programming concepts (eg, learning a while or for loop controlling a hardware output), and setting up a context for things like Python or Lua later. That's very helpful. Thank you! Did you orient her in some way or just log her in and say have fun! They use it at her school, and I've bought her some books with projects for her because she's liked to do things outside of school too (for example, ML for kids, which is odd to think about but that's what it is). We've worked through some of the projects in the book, she's made simple pong-style games, and some other things. Her school has kind of gradually been working through apps and scratch to build up concepts. Some of the early ones were games where you had to program a route out of a maze or something like that by doing things like providing the steps (up down right left, number of each) out. That kind of led to other things, which led to other things. It sort of built from "tell this robot how to get out of a maze" to "tell your ipad how to do X" where X got gradually more complex over the course of months or a couple of years. So cool. Thanks so much for this explanation of how Scratch is implemented in the classroom. I would use scratch to teach how code is structured.
After that i would use python for teching most of the rest, like seperating your functions into modules. Super helpful. Thank you. Scratch is an excellent tool to have kids exercise what they have learned about computational thought. Because that is what kids are taught in schools when they say "coding". The lessons are about variables, loops, algorithms, logic, etc. Not how to build complex systems. Scratch is a great playground at that level. This is a really helpful, clear description of the benefits. Thanks so much. My first language was QBASIC. I had fun making a lot of games. But then I ran into things I couldn't do (with low-level hardware), were too slow (with graphics), etc. This motivated me to learn C and assembly. I imagine it will be similar with Scratch! this showed up today <https://news.ycombinator.com/item?id=39757496> and seems relevant to this thread https://marianoguerra.org/posts/playing-with-code-programmin... Thank you! Definitely great at 8-12 years old. Gave me a huge head start when actually getting into coding. A lot of concepts people got stuck with just made sense I suggest starting kids with Python and asking an LLM like ChatGPT for help when stuck. That sounds like a great method. This might be the wrong website upon which to poo-poo LLMs, but as a counter-observation: the trick with LLMs is knowing how to evaluate their output for correctness, since hallucination is a very real risk. Professionally, reading forums, blogs, and the Stack Exchange network carries similar risk, but also comes with (a) at least they were trying to be helpful (b) the voting and moderation system as a mild form of reining it in Thus, unless one wanted to make a "ParentalLLM" through which one could submit questions to an ourhouse.internal/api/v1/prompt api and get back "chat" responses over sms/some existing chat protocol, I'd carefully consider the risk verses reward of bringing LLMs into that process I also recognize that I came up in the era of autodidactic lessons, and that predisposes me to "teach yourself how to fish" style approaches, but just wanted to draw attention to those LLM interactions coming with trade-offs I don't know what the right web-site would be to "poo poo on LLMs" :) It's here or nowhere, I think. Also, thanks so much for these nuanced reflections on the pedagogy. Super helpful.