Sunday, April 25, 2010

My First Programming Toy

I started using computers when I was nine, and I started programming the same year. You kind of had to know a little programming to get anything done on those computers anyway, and it was a smooth ramp from there to writing real programs.

Caitlyn started using computers when she was two, and both her parents program, so I suspect she'll get into it sooner or later. I'm actually confronted fairly often with how best to introduce someone, not just my own daughter, to the world of programming. Nowadays you can get by on computers just fine without any programming knowledge (though some of the things you can do with Google start to feel a little like code), and "real programming" is done with complicated, and sometimes expensive, tools.

I always point to JavaScript, because it's available in every browser, all you need is a text editor, and you can immediately make interesting, visual things happen. The thing is, how can we make it even easier and more fun?

One of the things that got me (and countless others of that era) started programming was the programming language Logo, and particularly its "turtle graphics" feature. Basically you used simple text directions, such as "move 10" or "rotate 45" to move a little "turtle" around the screen. The turtle had a pen it used to draw as it moved, and you could make all sorts of neat patterns by combining those simple commands into routines.

So, I propose to make an interactive graphics programming environment inspired by turtle graphics, but using JavaScript as the language. It would be a webpage with a large drawing area and a small text entry area. The turtle starts in the middle of the drawing area and moves around as you type directions, such as "move(10)", and press return. If you start a line with "function", you're allowed to write multiple lines, until the ending curly bracket.

In this way you can get started doing real programming, with a real programming language, with immediate visual feedback and lots of room to experiment. Of course I want it to work in both desktop browsers and the iPad Safari, and it needs to be something a five-year-old (assuming basic reading skills) can use.

Actually, this seems like something that should exist already, but I haven't been able to find it. If you know of one, please let me know... otherwise I'll just have to make it.

Related:

ContextFree.js & Algorithm Ink: Making Art with Javascript (Aza Raskin)

Kodu (FUSE Labs)

Programming without math (Ken Perlin)

Light-Bot (Armor Games)

Labels:


Comments

http://logo.twentygototen.org/
I love the idea!
One of the current best early programming environments is Scratch from MIT, a distant heir to Logo. Scratch is built on top of Alan Kay's Squeak (repackaged Smalltalk), and the Logoish immediate gratification of drawing with a turtle. To do more of course requires various programming constructions like loops and conditionals, which get hairy for a young child (well, anyone); Scratch simplifies this rather nicely by turning such constructs into drag and drop building blocks that snap together. See:
http://scratch.mit.edu/
Cool! We'll have to try these out.

I'm still interested in making a JavaScript version... maybe we can collaborate, Aseem, in all your spare time ;-)
Post a Comment

Subscribe to Post Comments [Atom]





<< Home