Hacker News new | ask | show | jobs
by jasonkester 2345 days ago
I've personally never been a fan of drag/drop puzzle-piece coding things like Scratch for teaching programming to kids. It just seems like it's sending them down this dead end path.

It took me a long time to find something better, and I've finally settled on Pico-8. It's the perfect combination of a simplified language that you have to actually type out in a stripped down editor, but with built in sprite and sound-effect tools and game loop methods that you can use to quickly get up and running with an actual 2d game.

It gets right to the heart of the great learning machines from the 80s (Apple ][, C64, TRS-80, Atari 400), but somehow fills in all the bits we've nostalgically romanticized over that would have made those machines a bad choice for kids today. Definitely check it out if you're thinking of getting your kids into programming:

https://www.lexaloffle.com/pico-8.php

4 comments

It's not a dead end path, it's not far from how Unity works (of course you may consider Unity a dead end path).

I think your stance is needlessly puritan. At some point, the program has to actually do something and put it on the screen. Whether that is printing lines of text or moving a colorful sprite in some way is really not that different, except one is a lot more appealing to a young learner.

Perhaps we're talking past each other. Scratch literally has little graphical puzzle pieces that you drag around and dock together to create programs.

Beyond that it's pretty similar to the thing I (and you) recommend.

The purpose of the puzzle pieces is to prevent syntax errors, right? Do kids (or anyone, now that I consider the question) really need to deal with syntax errors?
The puzzle pieces:

1. Prevent syntax errors.

2. Remove the need to type on a keyboard.

3. Remove the need to memorize basic commands.

The kids will eventually need to learn #2, but I think it's great that they can do programming in the interim.

#3 will start to come naturally once you've dragged enough if-else blocks in Scratch. Scratch is an on-ramp.

I will point out btw that Scratch is turing-complete.

Yes, just like they do when talking.

The problem is not syntax, the problem is that they're bad at typing on a keyboard.

I suspect it's mostly because the keyboard is too big and stiff...

Scratch is designed to encourage children, not discourage them. Syntax errors are the bane of learning to program for the first time.

As sibling comment indicates, it's also good to be able to code on a tablet, but I didn't think that would be as convincing to parent who seems opposed to graphical interfaces in general.

> Scratch literally has little graphical puzzle pieces that you drag around and dock together

You could build a "little graphical puzzle pieces" tool for any AST. You could even enable it to be driven with any combination of keypress input and mouse- or touch-based drag and drop. (Or even expose a text-based dump, for "free-form" editing by advanced users.)

I wonder if Unity and other game engines/IDEs are missing out by not making kid's versions.
QBasic's loss should be deeply mourned. Say what you will about it, it was almost the perfect beginner's environment. Simple, english-like syntax, good built-in documentation, support for graphics and sound right out of the box, and an IDE with a debugger.
Got QBasic in the 90's from a parent and bounced right off. Klick'n Play however consumed many hours. Or even batch files, if it meant I could get those Origin Systems games to run.
I got started with QBasic IDE. FreeBASIC was a nice replacement on the language/compiler side of things. I don't know if there's comparable IDE's. I found but haven't tried FBIDE.

https://www.freebasic.net/

http://www.fbide.freebasic.net/

> good built-in documentation

As someone who was a beginner in QBasic, the docs left a _lot_ to be desired, especially the graphics ones. As a teenager, I had a hard time make heads or tails of them.

Granted, that isn't to say I wouldn't be able to navigate them pretty well today, but I distinctly remember struggling to understand large parts of QBasic back in the day

I do agree about Scratch. I have starting using the web based Pyret with my 9 year old. We mirror the math and geometry problems and solve them in the browser environment. The simplicity to code, run, eval is key.

https://www.pyret.org

Can you say something about your child's experience using Pico-8?
Not the OP, but I've had some good luck with teaching it to teenagers at the library.

By the time someone is a teenager, they likely have some experience doing algebra, which (I think) makes the idea of a "function" a lot easier to comprehend; variable substitutions and whatnot are kind of confusing to someone who isn't even used to seeing letters in math.

Really positive thus far. We'd done a bit of javascript before in the browser so he had some fundamentals already but it was always a bit distracting to have to deal with the additional HTML and CSS bits, as well as having to introduce the file system and an external editor.

But yeah, the 8 year old had a game up and running the first day, and the 5 year old picked up enough just watching to suggest code changes.

I set up an old laptop to boot straight into fullscreen pico8 so they can just open the machine and get moving. Just like my overly romanticized memories of myself at the same age.

I tried introducing a few "under-10s" to the joys of Pico-8

But it actually requires tons of patience if you really drill down into it

I made the fatal mistake of firing up a GameBoy emulator to show them examples of what they may create and naturally they became obsessed with classic pokemeon crystal instead ;)