Ask HN: The easiest programming language for teaching programming to young kids?
Hi,
I want to start a small community pilot project to help young kids, 8 and above, get interested in programming. We will use video games and robotics projects. We want to keep our tech stack as simple as possible. Here are some of the choices:
Godot + Aurdino: We can use C in Godot and Aurdino. Aurdino might be more interesting for kids as opposed neatly packaged Lego Kits.
Apple SpriteKit + Lego Mindstorm: We can use Swift with Legos. But cost will be higher.
Some of the projects we are thinking are:
Game-ish:
1. Sound visualizer like how Winamp and old school visualization were. Use speakers. And various other ideas around these concepts.
2. AR project that shows the world around you in cartoonish style. Swap faces etc.
3. Of cousre, platform games.
Robotics projects:
I see a lot of tutorials for Arduino such as robots that follow sound or light, or stuff like lights display. We will use mostly those.
Some harder project ideas I have are for drones, boats, and other navigational vehicles. This is why I want to use Arduino. But is C going to be too hard for young kids to play with?
What do you recommend? If this works, I would like to expand it and start a company around it. For kids that young, Scratch, Logo, or BASIC would probably be good options. They tend to focus on simple syntax with an emphasis on seeing an outcome pretty quickly. echoing Scratch, it was what my class learned when we were 12 and had a good learning experience w/ it. I was talking to my neighbors 10 year old son one day and the subject of computers came up. He told me they were started using Scratch at school but he's since moved on to Python because he "felt he was more of a Python guy." He enjoyed Scratch because he could do something and get results quickly. Once he got the hang of it, be got tired of the user interface and the teacher introduced him to python. I'll have to see what he thinks these days. Thanks, we thought about Scratch but it may not work for robotics. Need to look into Logo and BASIC. If I remember correctly, Cozmo (https://ankicozmorobot.com) has, among other ways to program for it, a Scratch integration. Not sure that matches what you qualify as robotics though. Aside of IoT the #1 choice for learning programming is obviously Ruby. For several reasons: 1. Designed with dev-x as a primary goal. And that’s crucial for absolute beginners who don’t want to waste time understanding legacy decisions of python or shitty infra of c++ etc. 2. Both truly oop and packed with strong fp features - so you can learn almost any modern programming idea without hacks and workarounds. 3. Serious and modern enough for huge projects yet friendly and simple enough for absolute beginners. So you would not throw away your skills like if you’d learned BASIC or some other “nobody really cares in 2021” kind of language. Emacs Lisp or Racket. They won't have to out-grow it. It's interesting I just started learning Racket and I can already whole heartedly endorse it. The language is incredibly well documented and has a lot of image manipulation tools you can get started with right away.
This is great for kids because they really gravitate to the visual aspects of coding. I've was put off by s-exprs for years, but after 3 days I'm almost in the camp of them being "the better syntax". They're just so darn simple, and I think a kid can get the jist of a lisp very quickly because they haven't been exposed/gotten used to a non-lisp yet. I think a simplified approach to walking a kid through the first few chapters of How To Design Programs is totally feasible. DrRacket's step through feature would really help a kid see visually what is happening in their program. Ive hears good things about Realm of Racket as well. Also then you could transisiton them over to https://fennel-lang.org/, a lisp that compiles to Lua, and start doing some love2d programming or some microcontroller coding on Lua supported boards. Another alternative to the fennel path is going the clojure route and introducing him to the wonderful JVM world. The JVM has a ridiculous amount of libraries that they can integrate with and you could start peppering in a bit of Java learning. http://htdp.org/2020-8-1/Book/part_prologue.html Lisp is shockingly easy for such a powerful system. I really wish I started with lisp, the unity of the whole language teaches you that you’re not just telling a computer what to do, you’re making abstractions on top of the base language. There are a lot of options out there already. From low level audrino stuff to high level commercial stuff. Most of them aren't widespread, because the kids aren't that interested in the nuts and bolts aspect. That said, the classes for this aren't too hard to find. Some schools and college summer camps do offer this kind of class. Schools can even get grants for the equipment. That is true, I can imagine that kids getting bored too quickly especially when writing code. Game dev might be too boring for many kids. If using general purpose language, then we will have to provide most of the code. That's why we are thinking hands on building robots might be more interesting. I did a Lego mindstorm camp and a game design camp at a college when I was a kid. The game design used a gui but I don't remember the name. > But is C going to be too hard for young kids to play with? Speaking from personal experience, I “learned C” alongside actually learning BASIC when I was 10-12. When I say “learned C” I actually mean I “learned basic imperative programming with C-style syntax”: simple single-file programs inside of a main block. Arrays (probably all statically allocated), but few (if any) pointers of scalar quantities, no structs, and I doubt I ever even used headers or macros. By contrast, I understood the BASIC runtime and overall language much better than I did C. But I was able to be reasonably effective for a kid: writing simple ASCII games, interfacing with some educational robotics toy with a C library, physics simulations, and so on. So I don’t think C is too difficult for kids, or even necessarily more difficult than any other language. The complete specification for C is obviously too complicated for most kids, as are the details of safe and performant native code, but you can quite effectively create small programs with a minimal subset of C. That said, it is probably harder to find reference material for kids learning C in 2021. And the nice thing about Python is that kids can much more easily do more complex tasks, plus it has a bespoke interpreter for learning the basics. Kids are also more able to create their own complete applications in Python than C. Of course learning basic imperative programming with C is a very enriching experience for a child. But doing the same with Python-style syntax seems like a perfectly fine replacment. In my view C is ok for kids - it might even be the best choice if you’re focusing on hardware - and that the important thing is getting started with something. But I would caution against using C unless the specific code you have in mind is relatively simple. Complex memory management considerations or data manipulation that’s very close to the metal is probably inappropriate for first-time young learners. Thanks, I learned programming on my own by writing macros in Excel/Access as a kid. It seems Python would be a better choice. Gdscript is like Python and seems like Python can be used in Robotics. Let me do more research here. I used to teach intro programming at a summer camp for high school students and now teach full-time at an undergraduate college. Two tips: 1. Don't worry about "impressive" projects. Even the simplest interactive programs will be impressive to new programmers. I have jaded college students that go crazy showing off their third-week rock-paper-scissors programs to their roommates and parents. 2. Think about the environment. If you want to do programming (as opposed to Lego kits or Arduino) you should look into a cloud-based IDE like repl.it so that everyone has the same interface and no one needs to install software. Choose a simple editor that allows them to run programs in one step. Scratch is good for doing animations, stories, and simple games. The block-based interface becomes clunky and confusing when you try to write larger programs, but it's a good place to start with younger kids who enjoy the creative aspects. Python is a good choice for writing text-based games. Don't underestimate the power of this approach for teaching new students: They can clearly see the link between what they write and what the program does and then make the leap to coding up their own ideas. It's harder to do that with a self-contained project that relies on external packages and pre-written code. Twine is an interesting option. It isn't "programming" in the same way that Python is, but it's easy to use and writing interactive stories gets students thinking about sequential logic, conditions, and using variables to manage state. You'll know you're doing it right when the kids are running with your examples, making up their own projects, and bouncing ideas off of each other. I have a huge soft spot for Karel the Robot, which was very successful when I used it with my high school students. Look into it if you want a simple, creative predecessor to Python that isn't Scratch. I don't know if there is a high-quality free web-based version currently available. Python. It's designed to be easy to learn and has hundreds of thousands of libraries, from Web backends to ML to Data Science to NLP to virtually anything you could want to do with a computer. There's even a Python library Numba for compiling Python to the GPU. Many APIs such as GPT-3 only provide Python libraries and no other libraries. Want a progress bar? tqdm instantly adds a progress bar to a Python for loop. Want to measure earthquakes? There's a library for that. Want to parse Java? There's a library for that. https://pypi.org/project/javalang/ I recommend learning starting with Thonny and then going to PyCharm. I tried teaching my 10 year old nephew bash and python about a year ago. What I learned is that you have to make it fun for the kid. For example, I taught my nephew the "say" command and he went berserk over it for about an hour. Do you actually want to introduce young kids to programming or programming robotics? The two things are different. Scratch has proven to be a wonderful programming introduction for young kids. You can even control physical robots with it: https://en.scratch-wiki.info/wiki/Hardware_that_can_Connect_... There are also numerous Scratch tutorials online where you program a virtual robot on the screen (eg. moveLeft(1),moveDown(2), and so on. The "game-ish" projects you list sound great, but are generally beyond introductory programming for kids level. It's still early days for this project but take a look at https://www.codelearncreate.org (Build section) awesome-python-in-education > "Python suitability for education" lists a few justifications for Python:
https://github.com/quobit/awesome-python-in-education#python... There is a Scratch Jr for Android and iOS. You can view Scratch code as JS. JS does run in a browser, until it needs WASI. awesome-robotics-libraries:
https://github.com/jslee02/awesome-robotics-libraries FWIU, ROS (Robot Operating System) is now installable with Conda/Mamba. There's a jupyter-ros and a jupyterlab-ros extension: https://github.com/RoboStack/jupyter-ros I just found this:
https://coderdojotc.readthedocs.io/projects/python-minecraft... > This documentation supports the CoderDojo Twin Cities’ Build worlds in Minecraft with Python code group. This group intends to teach you how to use Python, a general purpose programming language, to mod the popular game called Minecraft. It is targeted at students aged 10 to 17 who have some programming experience in another language. For example, in Scratch. K12CS Framework has your high-level CS curriculum: https://k12cs.org/ [PDF]: https://k12cs.org/wp-content/uploads/2016/09/K%E2%80%9312-Co... Educational technology > See also links to e.g. "Evidence-based education" and "Instructional theory"
https://en.wikipedia.org/wiki/Educational_technology
https://en.wikipedia.org/wiki/Educational_technology Thank you for these resources, reviewing them now. Yw. Np. So I just searched for "site: readthedocs.io kids python" https://www.google.com/search?q=site%3Areadthedocs.io+kids+p...
and found a few new and old things: SensorCraft (pyglet (Python + OpenGL)) from US AFRL Sensors Directorate has e.g. Gravity, Rocket Launch, and AI tutorials: > Most people are familiar with Minecraft [...] for this project we are using a Minecraft type environment created in the Python programming language. The Air Force Research Laboratory (AFRL) Sensors Directorate located in Dayton, Ohio created this guide to inspire kids of all ages to learn to program and at the same time get an idea of what it is like to be a Scientist or Engineer for the Air Force. We created this YouTube video about SensorCraft https://sensorcraft.readthedocs.io/en/latest/intro.html `conda install -c conda-forge -y pyglet` should probably work. Miniforge on Win/Mac/Lin is an easy way to get Python installed on anything including ARM64 for a RPi or similar; `conda create -n scraft; conda install -c conda-forge -y python=3.8 jupyterlab jupytext jupyter-book pyglet` . If you're in a conda env, `pip install` should install things within that conda env. Here's the meta.yaml in the conda-forge pyglet-feedstock:
https://github.com/conda-forge/pyglet-feedstock/blob/master/... "BBC micro:bit MicroPython documentation" https://microbit-micropython.readthedocs.io/en/latest/ $25 for a single board-computer with a battery pack and a case (and curricula) is very reasonable:
https://en.wikipedia.org/wiki/Micro_Bit > The [micro:bit] is described as half the size of a credit card[10] and has an ARM Cortex-M0 processor, accelerometer and magnetometer sensors, Bluetooth and USB connectivity, a display consisting of 25 LEDs, two programmable buttons, and can be powered by either USB or an external battery pack.[2] The device inputs and outputs are through five ring connectors that form part of a larger 25-pin edge connector. (V2 adds a Mic and a Speaker) "C is too hard" isn't your worry at this stage. Get some kids doing stuff and worry about what language and platform to use when they complain. MicroPython might be easier; indeed... doesn't matter if none of the kids are interested in bending wires. My small sample of "minecraft kids" were very willing to spend effort in minecraft and eager to learn for self directed goals. But none of that translated into the real world at all. Making real things was something they expect others to do, I think. Best of luck; perhaps that wont be a problem for you. Interesting, would love to know more about your experience. Was it school? or Kids joined it on their own? Daughter and friends while school wasn't in session, last year. Nothing formal; they appreciate "better redstone" tips and were delighted to show off the work they were doing but "real" was like a cognitive gap for them... ~12yo might've been too young, or too old; and my failures to communicate don't reflect on them. Still. It was disconcerting; I was tearing up TVs and stuff at that age and they fear to use a tool. Processing (https://processing.org) would be a good place to start, especially if you want to illustrate and play with math concepts visually. You can even make games with it. I've been looking at Minecraft pi on raspberry pi but am unsure id use the pi for much else I'm instead looking at Minecraft on the laptop or the other option is code.org I wanted to teach Python to my 10 years old but I know he can't deal with indentation. My next choice is BASIC> COBOL, don’t go easy on them