Tuesday, December 11, 2012

Programming With Blocks

Syntax is a royal pain in the neck for beginning programmers. It’s hard to teach both a new (programming) language and a new way of thinking and problem solving at the same time. This tends to be a big stumbling block for teaching a lot of basic computing concepts. For years there have been tools developed that remove syntax from the equation. Alice and Scratch are probably the most well-known and popular of these tools. But there are other options and I find that many people don’t know about them all. I’m not sure I know them all but I do know something about a bunch of them. I thought it might be useful to list the ones I know about to help others find what might work for them. Feel free to tell me about any I am missing BTW. I’m always looking for new things to try.
What I find is that tastes are different. For every student/teacher I find who loves Alice I find one who much prefers Scratch. And the other way around of course. Others like the additional blocks of Snap! or the Android programming features of App Inventor. Others want something for the very young and look to Kodu. Some of these tools have useful ways to help students migrate from the block programming language to a more traditional language. Alice 3.0 to Java for example. Blockly from the block language to JavaScript, Dart and Python for another.
All of these tools have some great features and either university or private research behind the development. Curriculum for them can be found through their web sites or Internet searching. Textbooks exist for some of them as well. They’re listed in no particular order so check out something new to you.
  • alice3_logoAlice Alice is a 3-d environment from Carnegie Mellon. It is probably the most popular and best known of all of these tools as CMU has been promoting it for some years. It can be a bit resource intensive but the ability to create 3D worlds is a big plus. The latest version, Alice 3.0, allows users to export to Java programs. This makes Alice very popular with APCS teachers.
  • imageKodu is a coding environment originally developed by Microsoft Research for the Xbox 360 but now also available for Windows PCs. It is highly graphical with a simple When/Do model of programming. Designed for younger students (8 is the target age) it is very usable by precocious younger students and powerful enough for older students.
  • Scratch_logScratch Scratch was developed at MIT at the Lifelong Kindergarten Research Group. This 2D platform is less resource intensive than Alice and Kodu. The Scratch web site with its sharing and social abilities really adds to the value of the Scratch platform.
  • Scratch Jr is a version of Scratch for even younger children.
  • Blockly_logoBlockly is a language being developed at Google as a research project. Blockly is fairly new but borrows a lot of the ideas from Scratch. If you know Scratch you will find this pretty easy to understand. You can export a Blockly program into JavaScript, Dart (an object oriented language from Google), Python or XML.
  • snap_Logo5Snap! (formerly BYOB – Build Your Own Blocks)  Snap! nee BYOB is an expansion of Scratch that has been developed at the University of California at Berkeley. It adds new blocks and OOP features. It’s being used by a number of AP CS Principles pilots. Snap 4.0 is currently in early beta but the cool thing about it for many schools is that it is completely web browser based so no software installation.
  • MIT_app_inventor_explore_logo_big_0_0App Inventor for Android Think about App Inventor as being Scratch for developing Android phone apps and you get the basic idea. While not strictly Scratch is was developed by people from both Google and MIT. It resides at MIT these days and is being developed there using ideas from Scratch, Blockly and other sources as a teaching language. For students (and their teachers) who want to get into phone apps it is about the easiest tool there is. It is mostly web based as well.
  • etoyslogoSqueak eToys is the grand daddy of all these tools. Designed by Alan Kay as an implementation of SmallTalk it has influenced all the block languages that have followed. It is still being developed and is quite current. While not as well known, in my experience, as some of the others it is well worth looking at seriously. [Note: I left this out of the first version of this post for which I apologize. I really meant to include it.]
  • daisy Daisy the Dinosaur is a free iPad app for introducing some very simple programming to young people. It is very basis and very limited right now. I don’t know much about it but if you have an iPad and younger children it is worth a try. It may lead to something more like Kodu or Scratch or Alice as time goes on and they want more. Not many of the other tools work on the iPad other than in the browser so this may be a fun app for many. Thanks to Doug Peterson for the link (Exercise Makes You Grow)
  • logo-large Hopscotch is another iPad app from the same people who created Daisy the Dinosaur. It’s a lot like a very basic Scratch and pretty limited as of this review (Hopscotch–Visual Programming for iPads). But it does run on an iPad and that makes it accessible to a lot of people.
  • stencyl logo-small Stencyl borrows heavily from Scratch but is focused on creating games. Games may be created and published for iOS, Android, HTML5, Windows and Mac according to the web site.
  • imageMove the Turtle (available for iPhone/iPad, $2.99): From what I read this is a lot like Daisy the Dinosaur. The object of  Move the Turtle is to use commands to move the turtle though a series of puzzles.
  •  Spherly is a web-based programming environment that allows programs to be written using a block language to control a Sphero robot. Project URL: http://outreach.cs.ua.edu/spherly/
  • Pixly provides a block language for exploring topics in media computation; particularly, the manipulation of pixels within an image to support red-eye removal, chroma key, etc.  Project URL: http://outreach.cs.ua.edu/pixly/
    • PocketCode  allows you to create your own games, animations, interactive music videos, and many kind of other apps, directly on your Android phone or tablet. 
  • RoboMind  RoboMind is software specifically developed to support technology education. By programming a robot, students learn about logic, computer science and robotics.
  • Waterbear Waterbear is a toolkit for making programming more accessible and fun. Having a visual language means you don't have to focus on learning a syntax to start programming.

24 comments:

John Haugeland said...

I have never met a student who cut their teeth in any of these languages and did not come away profoundly damaged and unable to cope.

You would do well to read some Dijkstra.

John Haugeland said...

I mean this reads to me very similarly to teaching someone to be a carpenter by starting them off with plastic toy tools and telling them to go sculpt sand on the beach.

Not one thing they learn will bear any piece of resemblance to real work. All you're doing is teaching them misimpressions of what the job is, and tricking them out of having meaningful formative experiences.

This is 101 never-do-this material to anyone with actual training as a teacher.

Ted Bones said...

I take it that John Haugeland is of the 'everybody can learn to be a computer programmer and therefore everyone should learn how to write code' school?
These are not proper programming languages, anyone with half a brain knows that, but why deny those who can't or don't want to 'code' the opportunity of being creative with these tools and learning some logic skills along the way. Not everyone wants to be a computer programmer but a lot of kids like to create their own game or 'app' for fun.

Allan Fowler said...

Alfred,
These are all great tools. I have used Scratch, Alice, and Kodu in primary, secondary schools, and colleges with a lot of success.
@John – can you confirm the scope of the research you cite or this just anecdotal evidence? Because most of the literature I have read indicates a very positive trend.
BTW I have no idea what this means “This is 101 never-do-this material to anyone with actual training as a teacher.” Can anyone understand what John is trying to say here?

Garth said...

John, ouch. I am not quite sure what you mean by real work. A 5th grader is not going to do much commercial programming but they sure could have some fun learning to problem solve with these languages. Give the average 5th grader Java or C++ and see what their opinion of programming is after a week. My sophomore Programming I kids that may take only one programming course in their life can learn some problem solving, procedural thinking, the basics of coding language (If, Repeat, etc) and have a little fun writing stupid little games. They usually get an idea of what programming can do if they learn a big kid language. A good carpenter that is an artist with wood probably started with plastic toys on the beach when they were kids. It is possible to have some serious fun with all these languages and stimulate a kid’s curiosity to go further. All of these languages need to be on a beginning programming teacher’s must learn list.

Anonymous said...

I use most of these regularly alongside some simple typed scripting options like javascript in Unity. I think the block ideas remove the syntax issues that can distract kids but the ease of use should not mask a lack of focus on good planning - thinking I about variables and sensible ways of abstracting various parts of the problem. Personally I think we will see an evolution of both hardcore coding and some form of scripting that will see more novel graphical interfaces so that designers can script basic interactions and develop ideas without worrying about indents and curly braces. The CS principles and objectives are the key focus anyway - or should be. Also found my son really got into 'little man computer' which really helps show how a computer works to move and maoipulate info at the very lowest level. Kids just need barriers taken away... Not forced on them just because 'we had to learn the hard way'

Anonymous said...

My son is 12 and he's been doing Small Basic for years now and we will start with a higher typed language like C in language soon and he has had NO problem with syntax at all or progression to a C based language. He started with a visual based interface like the tools used in FIRST Lego League Robotics and moved forward to more advanced languages as his knowledge grew mathematically and logically. The key is for the foundation and the interest to be laid first with these types of tools that are TARGETED for the right age group. Who would foolishly think a 5 year old with NO Algebra, Calculus, Discrete Math (etc) experience would start right the gate writing Lambda functions with C++. Utter foolishness to think that we start them out with an higher end language without the background needed for mastery. ...was the comment posted as a joke?

Emmanuel Schanzer said...

These tools are all great, if you see syntax as a major obstacle to programming and/or computer science.

However, I don't think semicolons and curly braces are what's holding us back.

John Iglar said...

I completely agree with Alfred and completely disagree with John.

I am a trained and experienced teacher and have found that using these tools is an excellent introduction to programming. Using them, young children can focus on important concepts and problem-solving and less on finding syntax errors.

There have in fact been studies done on these programs' efficacy, and they are positive. This is one such study I have found.

Sure, there are young children (such as Anonymous' son) who can take to pure coding languages easily. And there is certainly reason to argue for using proper coding languages with older (High School) students. However, with elementary or middle school students it is perfectly reasonable to use simpler tools.

(An analogy: young children learn to play tennis with softer balls, lower nets and smaller courts. Their games have simpler rules with faster scoring. Does this prevent them from becoming good tennis players when older?)

Take the frustrations away and allow the students to experience the joy of creation. When they're ready to move on, they can take the concepts of loops, threads, conditionals, variables, etc. and start learning where to put the curly braces and semicolons.

John Iglar said...

For those who prefer the purity of code but still want an easier interface for the students to grasp, check out Greenfoot.

Greenfoot is a simple introduction to Java. It's not blocks, but there's a simple GUI that lets you manage some of the aspects of the program.

It's also worth pointing out that the new version (3) of Alice aims at being a good transition to Java, including a NetBeans plugin.

Anonymous said...

You forgot the parent of these which is around since the late 90s and still more versatile than any of its descendants: Squeak Etoys. This year the new 5.0 version was released.

Alfred Thompson said...

Squeek eToys! Yes I knew I was forgetting something important but for some reason that slipped my mind. I will update the post. Thanks!

Alfred Thompson said...

Emmanuel you are right that these are only the "solution" if you identify syntax as the major problem. There are other suggestions and I know you teach one of them with great success. Want to do a guest post on that?

hutch said...

Alfred, I teach using App Inventor in a Grade 10 course (intro) and using Python in a Grade 11 course (intro). Some of my students in Grade 11 have taken my Grade 10 course and I can state that they are not "damaged goods". I feel that they have a distinct advantage in experience multiple programming paradigms. The students that follow on to the second course are now able to appreciate the power of Java and O-O design also.

Keep up the great discussions.

Anonymous said...

Personally, I have no problem with people learning these tools, but I would *really* like to hear more from Mr. Schanzer, and applaud Mr. Thompson's suggestion that he write a guest post here on the topic.

Jim said...

Some of us in physics use VPython, which is the Python language with the Visual extension. http://www.vpython.org/ It's a great way to use programming as an extension and learning tool in physics as students have to create and modify the representations of physics in the 3d world they create.

A Teacher Speaks Out said...

As a classroom teacher who taught novice high school freshman to sort lists and do recursive math, I would disagree loudly with John. I had students take the concept of recursion and graphic flood fill and apply it into java to solve a problem that while it was easier to solve in other ways, was a perfect solution. I know that I have students who learned with both BYOB and/or Alice who are making Dean's honor roll in CS programs in several major Texas universities.

I kind of think John has not seen the power especially of BYOB/Snap where recursion, searches, sorts, etc are possible while letting the kids focus on the algorithm. Once a kid understands how recursion flood filled a square graphic, converting the algorithm to language is much simpler.

Sorry John but not every kid can focus on the algorithm when a semicolon error frustrates them way too much before the first successful code execution. I challenge any master teacher to take novice freshman female programmers, force them to learn any text based language, have them writing their own recursive sorts in under 4 six week class terms.

Did I mention the best 3 programmers in the room were two freshman female cheerleaders and a girl who was the mascot.

14 years old and writing and understanding recursion.

I am no expert - just a high school CS teacher with 19 years of battling syntax induced anxiety/failure with students.

Old and tired said...

Ah this is all very interesting. I know little about "Block languages", but I know a little of software engineering, about thirty years. In that time I have drawn more flowcharts, state transition diagrams, activity diagrams, ERDs etc than you can count and now have moved on to tools such as Rhapsody and Artisan that auto-generate code, almost, from UML diagrams. I now describe myself as a logic engineer (it could be a processor or an FPGA my stuff goes on), and I draw software. There is a place for allsorts of solutions. Teaching logic is no bad thing however it is done. Teach them to stop, think, plan, implement and test. If only some of the graduates I get were logical. Oh and by the way I have done assembler, C, Ada, HTML, java, java-script, Coral, Pascal, Fortran 4 and 77, Perl, PHP ...

Klaris Philipson said...

Hi
Move the turtle is a lot more complex that Daisy the dinosaur.
Daisy has a very simple set of control structure and preset moves.

The turtle has a set structure of activities that can build a skill set and understanding, you can create and save your own functions (sub routines) then use them again..
Its great for students Y3-Y6.
Then Id suggest a move to scratch..

Thanks for the other options in the list..
K

children's games said...

A lot of people are good in programming and they do good things for it. But with all these a lot of people do not like Programming and they just simply work on the things they can do best. Your post has different ideas that we can learn and apply at the time when we require these types of stuff for the learning purpose.

xota said...

I think Pocketcode from Catrobatqualifies as a nice addition to this list.
Developed by Wolfgang Slany and his team from Graz University of Technology it brings coding with block to mobile devices. There are special blocks to use the sensors of the device and he result is immediately playable on the device.
If you could only download one app it should be this one :-) All the other apps left as exercise!

Marie said...

Old and tired said..."Teaching logic is no bad thing however it is done. Teach them to stop, think, plan, implement and test." It's a tremendous change of attitude I see in 3rd grade class as the children work with Scratch and Wedo. They also learn to learn from each other instead of being dependent on the teacher for everything.

Pete Welter said...

The comment is only tangentially related the the topic of block languages - be forewarned:

Bret Victor, who is doing some of best work today on future programming systems, has a great quote when it comes to "the current ways are the best" mentality to programming:

"A common response to my [Victor's] work is 'experts don't need that'. Galileo didn't 'need' algebra either. Just 30 yrs to do something trivial today."

Just as many classrooms today are nearly the same as their counterparts from 50-100 years ago, programming today hasn't moved in a major way since before...well, Dijkstra. It would be hard to argue that we've found the optimum solution in either case. We see a similar argument in math class, we we say using tools like Wolfram Alpha to solve equations is not "real math" - that "real" mathematics is done with pencil and paper and maybe a TI calculator. Nonsense.

As a professional software developer for 30 years, it saddens me to see a mentality - that one needs to use text-based languages to be a "real" programmer - that is mainly about being exclusionary. Yes, text-based languages prevail now, but it's not because they are the be-all end-all solution to the problem of expressing computational thinking.

Arta Szathmary said...

I have been teaching computer science since 1969. At that time, assembler code was converted to machine code by 2 passes of the deck of cards through the card reader. Not very user friendly at all. ha ha. But that was what they were doing in business. -- COBOL was a compiled language-- and many folks did not trust it! ha ha

Now.. think of every step forward we have seen in the last 45 years.... many of them.

Think of the various generations of languages in business. Each one has taken us a little further away from the binary bits..closer to human visual language.

I am now retired from teaching at a community college and am focusing of helping the youth of america to become creators rather than consumers.

Blockly is great! not just for kids. It empowers everyone, every age to use the "universal machine" - a computer -- to solve their very own problems.!

Once I got Hal Abelson's kitty to meow, I was hooked! And the Google Intern got us to complete the program in less than 1/2 hour!

It is fun, engaging and the very intuitive.

We are beyond the point where CS can look down our noses at those who do not excell in Calculus.

Computer Science is the cortex of STEM. -- every scientist, technologist, engineer and mathmatician needs to use programming to solve their problems in the future.

Alfred, thank you for your wonderful posts that bring so many comments!

Arta Szathmary
:)Happy Computing!