Comments on: Why Build Your Own Blocks? You don't understand something until you've taught a teenager to teach a computer to do it. Mon, 08 Apr 2013 04:47:39 +0000 hourly 1 By: Interesting Links Post 23 August 2010 Interesting Links Post 23 August 2010 Sat, 04 Sep 2010 15:32:26 +0000 [...] about Scratch BYOB which lets you create higher order functions in a drag and drop environment. Why Build Your Own Blocks? Worth a read. Stacey Armstrong asks and answers Can Scratch be used to teach AP Computer Science [...]

By: Hélène Martin Hélène Martin Wed, 25 Aug 2010 18:17:05 +0000 Another excellent point I hadn’t thought about. Visualizations can be powerful tools for grasping abstract concepts and I may be able to use the ones here with students who are struggling with some of the concepts you mention in Scheme.

Thanks to both you and Jens for the great comments (and system) — great food for thought and now I’m more excited about BYOB!

By: Jens Mönig Jens Mönig Wed, 25 Aug 2010 16:44:21 +0000 Oh, that’s nice that you’re offering BYOB to your students! I can’t wait to learn about your experiences in letting them experiment on their own.

I agree that not being able to share projects on the Scratch website is a big turn-off. We’re actually thinking about implementing a BYOB web-player, but I’m convinced that nothing compares to the “real thing”, i.e. the fantastic Scratch site and the wonderful Scratch online community.

In the meantime BYOB offers to save a stand-alone “compiled” version of projects, which can be – sort of – shared directly with others.

By: Hélène Martin Hélène Martin Wed, 25 Aug 2010 16:20:49 +0000 You’re right that the Scratch community adds a really great dimension to the learning process — students want to share their successes and have the opportunity to learn from others from all over. That does add an interesting argument for BYOB I hadn’t quite thought of. With “regular” Scratch, collaboration is painful at best and being able to share true building blocks will definitely add a nice dimension to the community. I’m not surprised that the lack of ability to share (beyond a local network) would be something kids would be frustrated about.

I agree that it has been a good move by the Scratch community to move slowly and I’ve found that really refreshing. Maybe that’s why I’m a little defensive! But I guess what’s important is that the new complexity not get in the way of what’s there already and I do think BYOB does a nice job of that.

Thanks for the clarifications regarding commands, reporters and predicates. I had been thinking of things like X POS as values but of course those values need to come from somewhere. What’s interesting is that though I had been using reporters and predicates without any hesitation, I was a little surprised to come across those options and had to think about it for a bit. Luckily, the matching shapes really help, which is part of Scratch’s brilliance, I think.

I was trying to pack as much interesting stuff into a screenshot as I could… I hope what I ended up with isn’t too misleading. I agree there was no great reason to create a custom block for the map other than I wanted to create a custom block. And I wanted to show the long menu because it’s really neat!

I’m really looking forward to reading about how things go at Gunn and the other schools. I think whatever happens there will be very insightful.

By: Hélène Martin Hélène Martin Wed, 25 Aug 2010 15:56:50 +0000 I think you actually give the best possible answer for me — “because it’s fun” is something I can get behind 100%, no research needed. I did really have fun poking around with it, and that’s enough for me to believe that students would get a kick out of it. And I agree that the new features are unobtrusive, so I’m excited to see them in the next Scratch release.

I’ve installed BYOB on my lab machines and though I don’t plan to teach it explicitly, I’ll have some of the students who are more comfortable with the basic Scratch features explore a bit. I’m very curious to see what they’ll be able to do without direct instruction. My guess is that they’ll at least need a brief tutorial, but maybe not; I’ll just have to report back when I get a chance to see.

I would have liked to just switch to BYOB since all the Scratch features are there plus more but the inability to share to the web is a real problem for me!

By: Brian Harvey Brian Harvey Wed, 25 Aug 2010 15:37:32 +0000 P.S. Something I forgot to say:

You say, “I feel that once one has a deep enough understanding to want things like anonymous functions and have a true need for them, a drag and drop interface gets in the way more than anything.”

I’m not so fond of drag-and-drop myself, but that’s only half of what Scratch offers. The other half is the visual display of data. For example, Scratch makes the idea of lists more concrete by displaying the entire contents of a list on the stage, where it is directly editable. This capability is, I think, hugely important in learning about procedures as data.

Consider: Scheme has no visible representation for a procedure. There are lambda expressions that, when evaluated, create procedures; but if you try to print the value returned by a lambda expression you see some implementation-dependent gibberish like (in the version of Scheme we use at Berkeley) #[closure arglist=(x) b784feb8].

By contrast, in BYOB, the result of wrapping a block in THE BLOCK or a script in THE SCRIPT is a picture of something that’s visibly a block or script, with a grey border around it. If you make a list of blocks, you see a Scratch list watcher whose elements are these encapsulated blocks. Any kid, even a fifth grader, looks at that representation and immediately understands what it represents. (Being able to use first class procedures effectively is of course harder.) I don’t yet have the experimental data to back this up, but I’m guessing that this visual display is going to make a huge difference in kids’ ability to understand higher order functions.

That’s why it’s worthwhile adding these ideas to Scratch instead of just moving kids on to Scheme.

By: Brian Harvey Brian Harvey Wed, 25 Aug 2010 15:23:26 +0000 Thank you for taking an interest in BYOB!

Yes, of course, if I myself want to write a serious program I do it in Scheme, or maybe Logo if it’s about words and sentences. And I edit in Emacs. (You’ll probably get more of an argument about this from Jens, who has provided with BYOB a drag-and-drop representation of the underlying Smalltalk code called Elements.) Kids who are serious about computer programming will certainly eventually expand their skills to include other languages, just as we all did. (My first language was Fortran, which I haven’t touched in decades.) Many kids already program simultaneously in Scratch and in browser-related languages such as Javascript. A few have learned Smalltalk in order to produce their own modifications of the Scratch source code.

But even kids with several “grownup” languages under their belts continue to program in Scratch, because of the tremendous appeal of displaying their work to the half-million kids who visit the Scratch web site! This is the only example of “social networking” technology that appeals to me. I’ve never seen the point of collecting 20,000 so-called friends on Facebook, but the Scratch web site is an intellectual community; it’s about something. Why should the members of that community be limited in the tools available to them?

What we really want is for all of those Scratch kids to have the ideas of BYOB available to them. BYOB is a proof-of-concept demonstration; we’re working hard at convincing the Scratch Team to include our design in their Scratch 2.0 development. The biggest complaint kids make about BYOB is that they can’t share their projects on the Scratch site.

Probably the Scratch Team were right to start slowly. Once long ago I worked in the corporate Research Department of Atari, where I heard a talk by a leading game designer who made the point that if the complexity of the (then-)current video games had suddenly become available in the early days of Pong and Spacewar, kids would have found them frighteningly complicated — but now, even young kids playing video games for the first time aren’t intimidated by the complexity, because the conventions on how to play such games are part of the common culture, and little kids can always find a big kid to teach them. (Since then, of course, games have become even more complicated than they were back in the 1980s, and what he said is still true.) I think it matters a lot that there’s a half-million-strong community of kids comfortable with Scratch.

Many kids are already bumping into Scratch’s ceiling without necessarily realizing it. Have you actually downloaded and read some of the amazingly complex and featureful projects that kids are writing? The projects are great, but the Scratch code is unreadable; there are scripts that go on for 300 lines, far more than fit on the screen at once. Kids write in this ugly style because Scratch provides no mechanism for modularity. Much of those long scripts consists of code fragments copied and pasted repeatedly with small modifications. Those chunks should be procedures — custom blocks, as we call them in BYOB.

I’m afraid that some of your specific complaints come from limited familiarity with Scratch itself. Most notably, reporters are not a new idea in BYOB. If you look at the Scratch palettes you’ll see that blocks come in three shapes: jigsaw-piece (commands), oval (reporters), and hexagonal (predicates). A few sample reporters are X POSITION, Y POSITION, the arithmetic operators +-*/, LOUDNESS, and LENGTH OF. Some sample predicates are TOUCHING?, MOUSE DOWN?, AND, OR, and NOT. You’re right that there’s no deep reason to distinguish procedures that report TRUE or FALSE from procedures that report other values, but the Scratch Team decided that as a pragmatic matter, predicates are used in very different contexts from other reporters — mainly in control blocks like IF or WAIT UNTIL. We followed their lead in this, allowing users to create custom blocks in the same categories that Scratch already provides. (We briefly considered inventing different shapes for, say, blocks that report lists, but quickly rejected that as being too dramatic a change from what Scratch users expect, with very little gain in expressive power. We have really tried very hard to change Scratch as little as possible!)

By the way, you didn’t have to invent your DOUBLE custom block to carry out the computation you wanted. You could just

MAP [(2) * ( )] OVER [LIST (2) (3) (5) (10)]

leaving an empty input slot in the multiplication block to show where the list elements should be inserted. That empty-slot notation is a bit of fallout from my early training as a math teacher. If you show an eight-year-old an equation such as “x+3=10″ and ask “what’s x?” you’re likely to get “huh?” as an answer. But if you replace the x with a big empty square and ask “what number goes in the square to make this true?” they all get it. The empty slot is like the box in the math curriculum. We’re hoping that

THE [(2) * ( )] BLOCK

will turn out to be a much more accessible notation than the

(lambda (num) (* 2 num))

that represents the same idea in Scheme with an explicit formal parameter. (For more complicated situations in which you need detailed control over which input goes where, BYOB does also allow explicit parameters in lambda expressions.)

But what strikes me as really unfair in your review is the way you jump the reader directly into the long-form input dialog. We know that that would scare off a beginner! That’s why we were careful to provide a short-form dialog in which you just type a name for the input and click OK (or hit the return key). We anticipate that kids might spend a month or two using only the short dialog before ever clicking the arrow to reveal the long dialog in which they can declare the input’s expected data type.

More generally, different kids will use BYOB’s features to different extents. I’ve taught BYOB to fourth and fifth graders, and many of them are quite comfortable building non-recursive blocks. So far I’ve only had one fifth grader who ended up truly comfortable with recursion, although several more have had more limited success with it. But high school kids can all handle recursion (not necessarily right away). Not all of them get higher order functions; maybe only college students will use those, although I think when I have a real curriculum in place, the high school kids will do better than they did in my very limited sink-or-swim trial last spring. (I’m a fanatic about higher order functions, the best idea since ice cream. I know that treating program as data requires a real intellectual leap for people of any age, but once you get it, so many formerly hard problems become trivial!)

When we introduced BYOB3 to the Scratch community last year, about 20 kids just got it instantly — object oriented programming via explicit dispatch procedures, higher order functions, everything! We find that heartening. This semester, students at four high schools will be trying out the new curriculum we’re developing at Berkeley in addition to our own undergraduates. Then we’ll have a much better idea about how learnable this all really is, for the kids who don’t get it instantly without any teaching.

By: Jens Mönig Jens Mönig Wed, 25 Aug 2010 14:24:43 +0000 Thanks for this thorough and thoughtful review! I appreciate that you’ve taken the time and effort to explore our toy down to the very bottom.

But I’m afraid I can’t offer an answer to your onthological question (“Why”), other than “Because it’s fun!”. For me “Build Your Own Blocks” is not so much about bigheaded buzzwords like abstraction, recursion, anonymous procedures and extensible data structures. Instead the fun lies in designing custom blocks. Kids often start out by making very simple blocks which they feel are missing in Scratch, the first ones often being SWITCH TO PREVIOUS COSTUME, JUMP n STEPS, or – a little more daring – MOVE n STEPS IN m SECS. I don’t think there is any fundamental debate whether “build your own blocks” is desirable in Scratch at all, it’s really just a matter of making it work and designing friendly GUI. We’ve been discussing this with the MIT Scratch Team and they have announced that the next version of Scratch will let you “build your own blocks”. But it’s not yet clear whether that will include parameter passing and custom reporters (functions), too.

Other more sophisticated concepts like recursion and first-classness (for HOFs) are allowed to “seep into” this play with custom blocks simply because they exist. We wanted to allow kids to put blocks and scripts into lists and to – say – execute them at random, because it’s fun! If that makes (some of) them realize that a blocks are simply another kind of data, much like numbers and text, then what’s wrong with that? That doesn’t mean that kids cannot play with BYOB without being exposed to scary hard stuff. In fact, we’ve bend over backwards to make these features as unobtrusive as possible. But we also want college students to have fun with Scratch, and support a full semester of introductory curriculum without having to switch programming languages midway.

One more thing: Your screenshot of Creating an input to a custom block is awesome! You do realize, of course, that this single picture captures just about the maximum of sophistication you can possibly encounter in BYOB. Most custom blocks will be much easier.

By: Hélène Martin Hélène Martin Tue, 24 Aug 2010 02:23:30 +0000 You can add comments in Scratch by right clicking in the scripts area and clicking on “Add comment.” I agree that commenting is really helpful and I do ask my students to think a fair bit about it when they do Scratch projects.

By: Garth Garth Mon, 23 Aug 2010 16:01:34 +0000 I like Scratch. The kids like to play with Scratch. I do not teach using Scratch for the simple reason there is no way to comment a program. I do assign some simple projects where they can use Scratch but as soon as things get complex I need the comments to figure out what is going on or what they are trying to do. I am more of a Small Basic fan for that reason. SB has some issues but for a beginning CS course I think it is a nice, simple way to go. Kids can still have some fun drawing and making simple games but it has many more traditional aspects of a “professional” language. Of course, if working with third graders, I am going to use Scratch. I am usually smart enough to figure out what they are doing.