Gas station without pumps

2010 August 7

Computer languages for kids

Filed under: Scratch — gasstationwithoutpumps @ 10:45
Tags: , , , ,

Because I have a Ph.D. in computer science, and because my son started computer programming early, I often get asked about how to teach programming to kids.  This usually takes the form of asking what programming language to start with.

There are a lot of programming languages out there aimed at beginners, and I have not seen all of them personally. Smartbean has posted a pretty good (though not complete) list with some information about the more popular teaching languages.

There is a long-standing disagreement among teachers of programming about the “best” language to start with.  Many CS faculty favor a block-structured language that supports object-oriented programming (typically Java).  Many computer engineering faculty favor starting with lower-level language like C, teaching programming simultaneously with computer architecture.  Others prefer simplified languages that have few features and are suitable only for introducing programming concepts.

If I were starting with a kid who had no programming experience, I’d start with Scratch, which is available free for Mac OS X, Windows, and Linux operating systems.  The system is particularly designed for animations and 2D computer games, though some other types of programming are possible. There are fairly good teaching materials available free on-line as well thousands of example programs to look at (here are some of mine) and kid-friendly discussion forums.  The drag-and-drop development environment invites tinkering and play, and it is fairly easy to get simple things working quickly, providing rapid positive feedback that keeps kids interested.  The choice of language features in Scratch is a little unusual, as they provide multi-threaded parallelism with message passing from the beginning, but don’t include procedures with parameters (hence, no recursion).

I’ve taught Scratch to kids from 4th to 10th grade and not had the youngsters think it too hard nor the older kids find it too constraining.  Mostly the teaching has consisted of a few minutes showing how a particular block can be used, or introducing a basic concept (like turtle graphics, animation by costume changing, or rotation centers), followed by the kids playing with the ideas in their own programs for a few hours.  I generally circulate around the room answering questions, which come up much more often if you are at the student’s shoulder than if you are on the other side of the room.

Scratch was not the first programming language my son learned (it was developed too recently for that honor).  I think he started with some of the robotics languages of the various Lego Mindstorms systems, but Logo was in there at an early age also (3rd or 4th grade).  He also picked up NQC for Lego robotics when he was 11 or 12.   He used Scratch for his 5th and 6th grade science fair projects, but C for his 7th and 8th grade projects (here are his reports for science fair projects). In 8th grade, he took a high school programming class that used Dr. Scheme (a LISP dialect and development environment), which got him a large dose of recursion, explicit state, and unit testing.  This summer he has been learning Python, as a transition to object-oriented programming.  He’s also has little bits of other languages (Alice, HTML, JavaScript, StarLogo, Adobe Flash ActionScript, some game development programs, ContextFreeArt, … ).

If I were starting from the beginning with a kid who had no previous programming experience, I’d start with Scratch, then segue to Python, and from there to C and C++.  If the kid wanted to take the AP Computer Science Exam or create web applets, a detour through Java would be useful.  If the kid wanted practical skills, HTML and JavaScript are worth adding, as there is still a large demand for web developers, even young ones.  Alice might be useful as a transition to Java, but it has too much focus on data structures to be a really friendly intro.  Neither the Logo nor the LISP dialects appeal to me much as programming languages or teaching languages: they seem more designed for theoretical elegance than for producing readable programs.

About these ads

33 Comments »

  1. Hi Kevin:

    “ts (here are his reports for science fair projects).” This links to your link list. Is that right? I was expecting actual reports of science fair projects.

    I followed you to the blog from TAGFAM, and am finding your info for sciency-kids interesting, especially for parents who are raising sciency kids and aren’t so themselves.

    Comment by bj — 2010 August 7 @ 12:00 | Reply

  2. Oops, I found them. Thanks. They’re nice to look at.

    Comment by bj — 2010 August 7 @ 12:03 | Reply

  3. [...] Computer languages for kids « Gas station without pumps [...]

    Pingback by Computer Science and Information Technology – The Two Emerging Branches of Engineering | Education 24h — 2010 August 7 @ 12:44 | Reply

  4. My kids and their friends like Scratch, as well as Alice, and a similar program called Stagecast Creator.

    Comment by Aimee Yermish — 2010 August 7 @ 19:01 | Reply

  5. In e-mail, I got the question “How about an article on how to motivate a child’s father to start this process? ;)”

    This disturbed me a little bit. Why should it be the father’s responsibility? Gender stereotyping, anyone?

    Downloading Scratch is within the capability of anyone who can navigate to a blog, and learning to use it is child’s play (literally—the program was designed so that kids could learn to use the program just by playing with it, though guidance can speed the learning and make it deeper). There is no need to get a trained computer scientist to use Scratch. Just go for it!

    Incidentally, seeing a parent playing with a kid’s toy is often a strong incentive for kids to want to play with it themselves. Perhaps the questioner should pick up Scratch and start playing with it herself.

    Comment by gasstationwithoutpumps — 2010 August 8 @ 11:09 | Reply

  6. My DS11 is currently playing with SolidWorks. We got him a student version of this CAD program for $100. (Normal price is ~$2K.) The student version is the whole package, but is only licensed for one year. There are lots of tutorials included and online. He’s intrigued by the idea of taking the “certified SolidWorks user” test, because there was a coupon for that in the software box. I haven’t researched yet to see how tough the test would be.

    He’s also using LabView for a hardware project he’s working on with his dad. (LabView is data acquisition software.) He plays a lot just for fun with Algadoo, which is the newer (paid) version of Phun.

    He’s done Scratch, GameMaker, and Mindstorms (LabView based, actually), and some other things. I think Python will be next after he’s done enough SolidWorks. Maybe I’ll learn it with him, since it could be useful to me. I saw where Art of Problem Solving is going to offer a Python course this fall, but there are enough good tutorials on the web that he probably doesn’t need a course during the school year.

    I read awhile back that the College Board is looking into modifying the AP Computer Science course, which is currently Java-based. Have you heard anything about that?

    The high school engineering program to which DS plans to apply teaches computer hardware, BASIC, C++, and probably MindStorms programming in a “Computer Science 1″ class in 10th grade and AP Computer Science plus robot control programming for FIRST robotics in 11th or 12th grade.

    Comment by Yves — 2010 August 8 @ 14:36 | Reply

    • According to Computer Science A:
      Course Description
      Effective Fall 2010, Students who study a language other than Java during an AP Computer Science A course will need to be prepared to use standard Java, as specified in the AP Java subset, on the AP Computer Science A Exam.

      So it looks to me like there is no move away from Java planned in the near future. The Computer Science AB test is gone, because high schools weren’t preparing kids for it and it had too few students taking it to justify the expense of creating it, so the Computer Science A test is all that College Board offers in computer science.

      I’d be a bit worried about a CS course that includes BASIC—that indicates to me a course design that has not been thought about for a LONG, LONG time.

      Comment by gasstationwithoutpumps — 2010 August 8 @ 15:33 | Reply

      • I don’t think BASIC is a big part of the class, and it’s probably at least Visual BASIC. The academy is ~8 years old, so the plan didn’t come from that long ago. It’s a 1/2 year 10th grade course (the other half is “Engineering 1″). The course description is:

        “The first portion of this course introduces students to the fundamental hardware components of a computer and how these components function at both the individual and system levels. It also includes an introduction to various software applications used in science and engineering fields to analyze and solve problems. Finally, students learn languages such as BASIC and C++ to begin writing programs as they are formally introduced to computer programming.

        In the second portion of this course, students build on their programming experience by applying their knowledge to tangible situations, programming a small robot to perform such tasks as navigating through a maze and locating an infrared beacon. The [academy] provides each student with their own robot to work with for the duration of the course. This course is one semester long, and is the companion course of Engineering 1. It is a college preparatory elective which meets the “g” requirement for the University of California.”

        I guess “languages such as BASIC and C++” might actually be interpreted as not specifically including BASIC…

        They do plan to expand the academy starting within a year, and will be looking at changes to the academics, I think partly because they want to serve kids who might become machinists and engineering technicians in addition to kids who are probably aiming for PhDs.

        Comment by Yves — 2010 August 9 @ 11:05 | Reply

  7. C++ is definitely too complex for a first programming language, and BASIC tends to introduce bad habits, so I can’t say I approve of a first programming course that suggests “languages such as BASIC and C++”. Although bad programs can be written in any language, good programming is easier to teach with a language that supports the teaching.

    If they are going to be doing Lego Robotics programming, then teaching C might be appropriate, as they can use NQC for the robot programming. If they are going to be using the Labview-based programming language that Lego provides, then they have more flexibility in what language they use for teaching programming. Scratch, followed by Python, would be a good choice.

    (For those who care, the course description is from Dos Pueblos Engineering Academy and is aimed at 10th graders. They also have AP Computer Science (the usual Java course, for 11th and 12th graders) and FIRST Robotics (for 12th graders).

    Sadly, my son’s high school has none of these. The closest they get to computer science are Web Design, Computer Animation and Graphics, and Microsoft Office 2000—all worthy subjects for the ROP program, but not much help for the future engineers and scientists.

    Comment by gasstationwithoutpumps — 2010 August 9 @ 12:47 | Reply

  8. I’m a firm beleiver that modern BASICs can be used quite well without teaching bad habits. Today’s BASICs are not the ones of 40 years ago. Visual Basic is quite the modern OOP language. Small Basic (http://smallbasic.com/) is a nice friendly, simple BASIC with a simple IDE that is very approachable by young people.
    For even younger people there is Kodu (http://fuse.microsoft.com/projects-kodu.html) which looks very interesting as a way to spark interest in being a creator/programmer at a very young age.

    Comment by Alfred Thompson — 2010 August 13 @ 09:49 | Reply

  9. Thanks for writing about this topic — it’s been on my mind.

    One path to mathematical modeling and programming could be with Microsoft Excel and its associated language, Visual Basic for Applications (VBA). In EPGY beginning algebra, my son was having some trouble with mixture problems (to make 6 gallons of 30% solution, how many gallons of 100% and 20% solution should be used?), so I helped him make a spreadsheet to see how solutions combine. Algebra and later courses often using graphing calculators, and Excel can also be used to visualize functions and illustrate concepts. “Advanced Excel” by de Levie looks interesting.

    Some algebra books, including the more recent editions of Dolciani’s books have computer exercises, often in BASIC, so one could study algebra and rudimentary programming together.

    Arguably the dominant programming language/environment for engineering is Matlab. It’s also widely used by finance “quants”. The full version is quite expensive, but there are less expensive student versions available. I’m wary of being locked in to using expensive commercial software, and GNU Octave is free and implements the Matlab language. I agree with Kevin’s recommendation of Python as a beginning programming language. It is free, and combined with SciPy, it is an alternative to Matlab/Octave. Python is widely used by finance quants at two companies I’ve worked at.

    Statistics students should look at the R programming language and environmment, also free.

    Mathematica is a very powerful programming language/environment for pure mathematics and mathematical modelling, and a home edition is now available for “only” $300. Some kids, armed with Mathematica and the 1500-page “Mathematica Book” by genius Stephen Wolfram, will teach themselves a great deal.

    I use Windows and like it, but students should be exposed to Unix, either through Mac OS X or Linux, and they should learn to use the command line and perhaps some bash (shell) scripting. Even Windows has a useful command line, which has expanded on the old MS-DOS functionality. Some scientific software, especially by academics, is only available on Unix operating systems.

    Comment by V.R. — 2010 August 15 @ 13:56 | Reply

    • Although I’ve been programming computers for over 40 years, I have never used a spreadsheet for programming. They seem to me a very awkward way to format a table, and really awful as a programming language, but I know people who love spreadsheets.

      I’ve been a UNIX user since BSD Unix first became available to me (around 1980) and Mac user since the first 128k Mac, so I agree that kids interested in programming should learn some command-line programming, though I prefer csh to bash. More important is to learn how to use gnumake, as that is a powerful “build” language that is useful not only for compiling large projects but for running complicated computational experiments.

      R is widely used in bioinformatics as well as statistics, but I find it a little awkward to work with, and its default graphics are terrible. I recommend it to grad students who need the power, but I’ve not yet recommended it to a high school student. When I need plotting, I usually choose gnuplot, which produces better default graphs than R and can do simple function fitting (though not the more complex regressions that R is capable of).

      Matlab is similarly a rather special-purpose language with awkward syntax. I’ve used it, but not recently. I would certainly chose SciPy over Matlab for new code.

      Mathematica has always been too expensive for me. I used to use Macsyma (the ancestor of Mathematica) when I needed symbolic computation, but nowadays I use Maple, because I have access to a free license to an old version. So far as I can see, both Maple and Mathematica are good products, but over-priced. I only end up using Maple about once every 3 or 4 years, so buying a new product has never been worth it to me.

      Comment by gasstationwithoutpumps — 2010 August 15 @ 16:34 | Reply

  10. [...] @ 20:09 Tags: BYOB, gifted children, programming, Scratch I’ve been fond of Scratch as a first programming language for children and teenagers (particularly gifted children who may be able to program better than they can type), but have [...]

    Pingback by Build-Your-Own-Blocks extension to Scratch « Gas station without pumps — 2010 September 18 @ 20:10 | Reply

  11. [...] that three of these pilots are using Scratch (or BYOB), which would be my first choice for a first-programming language. Another uses Python, which is not a bad choice for a first text-based programming language. [...]

    Pingback by New design for non-major programming class « Gas station without pumps — 2010 September 30 @ 00:11 | Reply

  12. [...] posted about Scratch before (Computer Languages for Kids) and the Build-Your-Own-Blocks extension to Scratch.  I don’t know whether BYOB has a Java [...]

    Pingback by Math game competition « Gas station without pumps — 2010 November 18 @ 00:24 | Reply

  13. [...] Computer languages for kids [...]

    Pingback by NaBloPoMo is over « Gas station without pumps — 2010 December 1 @ 00:18 | Reply

  14. [...] Computer languages for kids August 2010 16 comments, 768 views.  This post not only got an initial burst of interest from being announced on the tagfam mailing lists, but also got a continuing low-level of activity from searches and pointers from elsewhere on the web. [...]

    Pingback by 2010 in review « Gas station without pumps — 2011 January 2 @ 12:52 | Reply

  15. [...] love to have more programming taught in the middle schools and high schools (and have done some afterschool and summer volunteer teaching to give at least a few students some exposure to programming), it is far more important to have [...]

    Pingback by Shoehorning computer science into K–12 « Gas station without pumps — 2011 January 14 @ 08:11 | Reply

  16. You may find interesting the essay Introductory Computer Programming Education by Philip Guo (a CS grad student at Stanford) . He recommends Python on Unix, followed by Java, C, and then (optionally) Haskell or Scheme.

    Comment by V.R. — 2011 February 1 @ 13:50 | Reply

  17. [...] posted before on what computer languages I would use to teach children to program.  Basically, the answer was Scratch first, then Python, though that is not the order my son [...]

    Pingback by Ruby for kids « Gas station without pumps — 2011 March 1 @ 20:57 | Reply

  18. [...] have previously posted in Computer Languages for Kids and What should high-school computer education be? about my fondness for Python as an early [...]

    Pingback by Online Python Tutor « Gas station without pumps — 2011 March 5 @ 21:34 | Reply

  19. [...] Computer languages for kids [...]

    Pingback by Blogoversary « Gas station without pumps — 2011 June 5 @ 10:51 | Reply

  20. [...] still think that Scratch is a better way to teach complete novices (as I’ve said before in my post about teaching children to program and BYOB), but this HTML5 approach is not bad for providing a quick, minimal intro to the idea of [...]

    Pingback by Intro to programming, using a browser « Gas station without pumps — 2011 July 10 @ 14:01 | Reply

  21. [...] advice I gave in Computer languages for kids still holds: teach Scratch first, then switch to Python when you want to do more text processing or [...]

    Pingback by Free ebook for learning Python « Gas station without pumps — 2011 December 21 @ 20:09 | Reply

  22. [...] Computer languages for kids [...]

    Pingback by Blog year in review « Gas station without pumps — 2012 January 1 @ 14:16 | Reply

  23. [...] Computer languages for kids [...]

    Pingback by Second Blogoversary « Gas station without pumps — 2012 June 2 @ 18:15 | Reply

  24. [...] Computer languages for kids [...]

    Pingback by 2012 in review « Gas station without pumps — 2012 December 31 @ 11:17 | Reply

  25. I am not a programmer but I have this C language subject this session and have to prepare for it. What all topics should be covered in it?
    And has anyone studied from this course http://www.wiziq.com/course/2118-learn-how-to-program-in-c-language of C tutorial online?? or tell me any other guidance…
    would really appreciate help

    Comment by christi parks — 2013 January 21 @ 05:56 | Reply

    • There are still many places that take a bottom-up approach to programming and teach C before Java (UCSC computer engineering department, for example, though the CS department is a Java-first department). You should be able to find hundreds of C course descriptions on-line, to determine what is normally taught.

      Personally, I liked Kernighan and Ritchie’s book, though I learned C more directly from Kernighan before they’d written the first edition of the book. There are hundreds of other books about C that have come and gone, but this classic is still going strong. If you need a more tutorial introduction to programming, you may be better off starting with a different programming language (I’d recommend Scratch and then Python).

      I don’t know of any on-line materials that are anywhere near as good as the K&R book, but I have a prejudice in favor of books rather than videos as a learning tool.

      Comment by gasstationwithoutpumps — 2013 January 21 @ 11:07 | Reply

      • Lecture notes, videos, and tests for Harvard’s CS 50 course, which mostly uses C, are available online, as is the EdX version of the course, as is CS50x .

        Comment by Bostonian — 2013 January 21 @ 11:17 | Reply

  26. [...] to, I advocated for teaching Python after Scratch to kids (as I’ve done on this blog: Computer languages for kids), and one parent wanted to know why, and whether they should have used Python rather than Java in [...]

    Pingback by Why Python first? | Gas station without pumps — 2013 March 21 @ 11:21 | Reply

  27. [...] Computer languages for kids [...]

    Pingback by Post 1024 | Gas station without pumps — 2013 March 23 @ 19:59 | Reply

  28. […] Computer languages for kids […]

    Pingback by Blogoversary 3 | Gas station without pumps — 2013 June 1 @ 20:00 | Reply


RSS feed for comments on this post. TrackBack URI

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

The Rubric Theme Blog at WordPress.com.

Follow

Get every new post delivered to your Inbox.

Join 250 other followers

%d bloggers like this: