Monday, December 31, 2007

scratch-simpleresult Both Leon Bambrick and Jeff Atwood have posted about LOGO recently, which reminded me to talk about Scratch. It's a FREE program from MIT that's aimed at teaching kids (or anyone else, I suppose) the basics of programming. More specifically, it gets them thinking about things like logic, flow control, and handling variables. 

As a developer, I suppose it's natural to want to teach my daughters something about what I do for a living. (Note: I leave out the part about how moving into management mostly means sitting in meetings and spending more time in Outlook and Excel than in an IDE). But I do want them to grow up with strong problem-solving skills, so I've often gone out in search of good ways to teach programming concepts at a kids level. There are a number of initiatives out there, but Scratch is the one that has really taken hold for us. I've found it to be the best by far, even better than commercial products out there intended for the same purpose.

The free Scratch application is basically a workbench for creating programs using a drag-and-drop interface. You have a stage, which can be scripted to do things like clear itself, paint its background, and so on. On the stage, you drop sprites, which can be any sort of object. By default, your first object is a cartoon cat, but you can use any sort of photo, clip art, or pick from a library that is included.

For your stage and each of your objects, you have a script (or several) that can be run. This is where the genius comes in -- the script is built entirely by dragging and dropping blocks into place. No need to remember syntax or type in commands. You're essentially building a flow chart with these blocks and your "program" is executed from the first block (at the top) to the last (at the bottom). The blocks snap together as you drop them and there are good visual cues as you drag them around when and where they'll snap. If your program has multiple characters with their own script, all of those scripts run in parallel... and a single character can have multiple scripts (to support for example, moving around the stage while also waiting for some external input). The bottom screenshot gives a good example of parallel scripts.

The available blocks are grouped into categories, such as Motion, Control, Looks, Sound, Sensing, Numbers, and Pen. Each category has numerous blocks that let you control how your sprite moves, makes noise, interacts with other sprites, calculates, stores/retrieves variables, and uses its "pen". As with LOGO, the pen is the primary way of seeing what your sprite has done. You control the pen by putting it down, lifting it up, setting its color, size, and so on.

The "Control" group is where you can really do creating things as this is where flow control blocks are located. There are blocks to wait for input, "container" blocks that let you repeat other sets of blocks forever, a certain number of times, or until a condition is met. There are also If/If Else blocks and blocks to pause the script for a period of time.

scratch-simpleprogram The environment is very easy to work with and encourages experimentation. The left side is where the groups of blocks are stored, the middle is where you drag and drop your blocks, and the right side shows the sprites in your program and the stage where everything happens. It also has a "presentation mode" so the user can make their program run full-screen and show off to Mom and Dad.

I introduced my daughter to Scratch several weeks ago and it's now one of her favorite things to do on the computer. Given that she just received an OLPC, I'm glad to learn that there's an effort underway to build an OLPC compatible version of Scratch.

Initially, Scratch is great for use as an electronic Spirograph set. Kids can experiment by trying different things and take a "let's see what happens" approach to learning. The simple program to the right is what created the shape at the top of this post. Clicking on any of those numbers lets you change its value and it's easy to move the blocks around or add new blocks. You can see in this example that the orange flow-control blocks serve as containers for other blocks and that they can also be nested.

One of the first things kids learn, just as anyone else learning programming does, is that you have to be very explicit in your instructions. For example, without the "Clear" instruction in there, the stage would still have the previous shape and it'd be hard to see what your program is doing. Without telling the sprite where to start (0,0), the program would pick up wherever the sprite currently sites which is likely not what you want.

Click for larger view. Scratch also comes with many sample programs that show you just how flexible it is. Games are fairly easy to program because of Scratch's support for input handling (detecting keypresses or mouse activity) and its support for collision detection. A good example is a little racing game that features a ball you have to "drive" around a race course. The arrow keys control the ball's direction and it speeds up the longer you hold them down.

However, if your ball goes off the race course and ends up in the grass (the program has an If block to see if the sprite is touching the color green), then your speed begins to slow down significantly. The program for it (visible by clicking the screenshot to the left) is surprisingly simple and it's a fun one for kids to experiment with because they can control which keys get used, how quickly the ball moves, and what the consequences are for going off-course.

I've tried out a number of different environments for kids to create things in the computer and Scratch is easily the best of the lot. It's a commercial quality piece of software that installs quickly and works very well. The folks at MIT have also created an online community of sorts where users can share their Scratch creations. The web site also has lots of videos, reference materials, and a PDF Getting Started guide that's very kid-friendly.

(Note: I just noticed that they've released a version 1.2 maintenance update in the last couple of weeks. It looks like they've added some advanced blocks, fixed a few things, and created a more detailed PDF reference guide. I'll be upgrading shortly, but the screenshots above were created with 1.1).

If there's a kid in your life that enjoys tinkering on the computer, introduce them to Scratch. Heck, introduce yourself to Scratch... I apologize in advance for the hours you're about to lose.

Technorati Tags: , , , ,
posted on Monday, December 31, 2007 3:08 PM Mountain Standard Time  #    Comments [0]

olpc-logo As I mentioned last week, we gave our oldest daughter (8 yrs next month) an OLPC XO laptop for Christmas. I've been following this project for a while and it's been interesting to see the different reactions around the web since the boxes started shipping earlier this month. Even more interesting over the last few days has been to compare some of those reactions with the reaction of our daughter.

As expected, she's been ecstatic about getting her "own" computer. The fact that it doesn't look like Mom or Dad's laptop, from either a hardware or software perspective, has only increased it's cachet in her eyes. She thinks it's pretty cool that "somebody invented a computer just for kids." When she tells people she got her own laptop for Christmas, she likes to explain that "it's a kid's laptop, but it's still a REAL computer and it even has Google!" Pretty funny that the presence of a web browser with Google makes it a "real computer" for her.

Some of the responses to this machine around the web are really interesting. It runs the gamut from "Amazing!" to "What a piece of crap..." -- but the vast majority of impressions (good and bad) are skewed because they come from an adult perspective. As an example, the review on CNET mentions an application the laptop comes with and then says "(Actually, applications are called "activities" on the XO-1. Sometimes it seems like the developers are thinking too differently.)" If you're an adult techie, I could see that these differences feel "too different." On the other hand, which word better describes the "things you can do" on a computer to a kid who's never used on -- application or activity?

On the positive side, I've read lots of adults who will use it as an e-book reader, a rugged email-on-the-go alternative, or an inexpensive way to tinker with Linux. Some of the folks over at OLPC News are as hyped about it as any Mac/Windows/Xbox/PS3 fanboy you'd ever meet.

The criticisms tend to fall into a few categories:

It's not rugged enough -- This clearly comes from someone who's not actually held or used one. This machine is very well-built and solid. It may not be a military grade Toughbook, but it will stand up to my 7 year old lugging it around just fine.

It doesn't have [Software X] -- With this one, Software X is usually something like a full-feature Firefox browser, built-in web server for development use, or a more familiar OS. Of course, each of these comes from the perspective of an adult who wants it to be more like the machine they already use. Put it in the hands of a kid, though, and these complaints go away. I've found that the OS is very intuitive and, while I wouldn't personally use it as my main machine, my daughter has had no trouble at all learning her way around and surprising me with the things she's come up with. The main complaint I'd have here is that the open-source Flash alternative (Gnash) doesn't seem to be as widely compatible as a Flash player would be. There are instructions on the OLPC wiki, though, for installing a recent build of Flash.

The keyboard is too small -- Put a kid in front of it and you'll see how perfectly-sized the keyboard is. It may be too small for an adult to use regularly, but little hands fit it just fine.

The screen is too small (and it's not a touch screen) -- The screen is small. But it provides plenty of real estate for the activities that ship with the device and it's surprisingly sharp. Hardware keys let you adjust the brightness and at the lowest setting, the backlight turns off for use outdoors. I think a touch screen would be great, especially because the panel spins around and lays down like a convertible tablet -- on the other hand, the cost of the machine right now is right around $180 or so. Adding a touch screen to it would not only increase the cost, but it would also increase the complexity of software design (to make the activities tablet-ready) and hardware design (to ensure that the device remains rugged even as the screen is regularly beat on by kids).

Personally, I've run into only two drawbacks and neither of them is insurmountable.

  1. Out of the box, the device doesn't support WPA security on wireless networks (though it does support WEP). However, I did find instructions on the OLPC wiki for adding WPA support. I followed those and it connected to our access point great. It's a one-time thing, so the device has connected just fine ever since, but the instructions do require using a terminal prompt.
  2. I would like to see it include better Flash support in the built-in browser. I've not yet tried installing the latest Adobe Flash player, so hopefully that improves things. Given how many kids web sites use Flash for activities, games, and even their entire UI, getting solid Flash support in the browser should be a priority.

Neither of these are that big a deal... especially now during the honeymoon period when my daughter is mostly using it as an electronic journal and just experimenting with the different activities. I'll follow-up later with some info on the various activities that ship with it, including one that doesn't but probably should (hint: typing tutor).

Technorati Tags: , , ,
posted on Monday, December 31, 2007 12:25 PM Mountain Standard Time  #    Comments [0]
 Monday, December 24, 2007

The XO Laptop Lots of tech geeks have heard of the One Laptop Per Child (OLPC) project founded and run by Nicholas Negroponte (MIT)... but non-techies may not be familiar with it at all.

The project began in early 2005 with the original idea being to design and build a laptop that could be used as a learning tool by kids in underdeveloped parts of the world. It wouldn't be based on Windows or Mac (due to cost and complexity), needed to be rugged (for use by kids, often in remote areas), needed to provide a self-contained collaborative learning environment (remote villages have students - but not necessarily the internet), and needed to be kid-friendly (to keep their interest and enthusiasm). The hope was that a combination of design efficiencies and large orders from governments around the world would bring the cost down to $100 (US). When first announced it was often referred to as "the $100 laptop".

They've come close... the machine cost is now under $200 (US). And while the machine wasn't originally intended to be sold to consumers in the US, it's now possible to buy one. Well, actually you have to buy TWO. For $399, you can participate in the "Give 1, Get 1" program -- one machine comes to you and another machine is sent on your behalf to another part of the world. This program started in November and continues through the end of the year. Of the $399 you spend, $200 is tax deductible and T-Mobile is throwing in a year of free HotSpot access as well... that makes it really a pretty good deal.

I've followed this initiative since it was originally announced because, like most technology people, I think getting kids familiar with the tools of technology gives them a big step up in their learning. Rather than something to be intimidated by or to see as a learning curve to ascend, a computer should be seen by today's kids as a very powerful tool to accomplish their goals and reinforce the curriculum they're already studying. With it, they can write, research, collaborate, create, publish, entertain, and communicate.

I think a kids' natural curiosity provides the desire and motivation, but lots of kids (particularly outside the US) lack access. A laptop as a learning tool is no replacement for the essentials of food, clean water, and basic healthcare -- but it is worthwhile venture.

SUGAR User Interface So I placed my order on the first day of "Give 1, Get 1" and the machine arrived last week. I've spent some time playing around with it and I think my daughter (7 years) is going to love it. She'll open it tomorrow for Christmas. The "Sugar" interface is very intuitive and kid-friendly, plus there are lots of activities and things to do on the machine. She can write a journal, research via the encyclopedia, play educational games, learn LOGO (or Python if she wants to go really wild), browse the web (with some supervision and controls), read some RSS feeds, use a calculator, draw pictures, and more.

Hardware-wise, this machine is very well thought-out. There's no internal hard drive, so it can be handled in a rough and tumble way (supposedly... we'll try to discourage that). The screen is very bright and sharp, it's got a built-in handle for lugging it around, and the keyboard has a rubbery membrane over it to prevent dirt and fluids from getting inside. Opening the laptop involves flipping up two latches and then raising the lid. When up, the latches look like antennae (and, I believe, actually ARE the wireless antennae) and when they're down, they serve to protect the USB and accessory jacks.

Needless to say, I'm pretty excited about it. Our oldest often asks to use my laptop or my wife's and now she'll have her own -- but with a twist. In my opinion, this is a perfect machine for a curious 7 year old to tinker with. Sure, it's not going to be exactly like the machines she'll use later in her life - but I don't think it needs to be.

She'll have plenty of time to worry about Excel and PowerPoint.

Technorati Tags: , , , ,
posted on Monday, December 24, 2007 10:26 PM Mountain Standard Time  #    Comments [0]