Computer Science Stack Exchange is a question and answer site for students, researchers and practitioners of computer science. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I'm interesting in teaching programming to middle school students. I'd like a programming language with the following criteria:

  1. Simple - pared down to the absolute minimum needed to support sophisticated programming without too much code. As such, for this language, I'm not interested in pointers and am weary of object-orientation (although functions are good).
  2. Powerful - I'd like to be able to program 21st-century elements, including graphics, networking, and distributed processing.
  3. Debuggable - I'd like an elegant Integrated Development Environment with a human-readable debugger (i.e. not some strange error message with a stack trace, but a clear explanation that an average middle school student can use to determine what is wrong with the code).

The standard programming languages (C,C++,C#,Java) fail the first criterion. Basic programming languages like Scratch fail the second (and possibly third) criterion. Scripting languages (perl, python, php) fail the last criterion.

I'd like to know if someone knows of such a beast, before I sit down to make it up myself.

share|cite|improve this question
I'm sorry, but when I read "middle school students" and "networking, distributed processing" I just burst out laughing. – mparnisari Jun 9 '14 at 4:33
@l19: With today's languages and libs (Ruby and Python come to mind), I don't think it is that ridiculous. – Dave Clarke Jun 9 '14 at 12:56
Do you have an example of the sort of human-readable debug output that you want? You've explicitly ruled out Python, but it's simple, powerful and does have IDE/debugger integration: Its stack trace is better than many, but not at the level of "You missed a closing bracket on line 42"... I don't know any examples of the latter. – andybuckley Jun 9 '14 at 20:39
I'm not sure this a) is ontopic here and b) has objective answers, but while we discuss this in Computer Science Chat you might want to check out this question that discusses useful criteria for selecting the first language to teach. That said, you might look into Scala. It's not an easy language if you want to learn it in depth, but the "first level" is quite simple, it scales and fulfills your criteria, I think. – Raphael Jun 12 '14 at 6:22
I am calling your bluff. Sit down and make it. – babou Jun 12 '14 at 16:18
up vote 3 down vote accepted

I recommend Javascipt.

  • Just about everyone reading this has access to a development environment by default in their browser.
  • It's forgiving for new programmers.
  • It supports a modern feature set.
  • There's a vast repository of sample code on the internet, quality notwithstanding
  • It's a real-world applicable language.
share|cite|improve this answer
Khan academy seems to have a nice wrapper for Javascript that does most of what I need. – Ari Trachtenberg Jul 8 '14 at 4:26
You forgot the link to – Andrej Bauer Aug 31 '14 at 20:47
+1, I'll add that if you want real classes (as opposed to object inheritance) and optional static types, Microsoft's Typescript is available in Visual Studio Express (with all the debugger bells and whistles.) (I don't think Typescript is different enough from Javascript to warrant its own answer.) – Wandering Logic Sep 1 '14 at 15:57

You should perhaps look into Racket (formally known as Scheme, a derivation of Lisp). It's the language taught to first year CS students at my University. Since it's a functional programming language, the syntax and concepts are quite simple compared to C/C++, there are several libraries that can do some basic drawing or networking related things, and Dr. Racket as several debugging features... including a Stepper (i.e it will show and perform one substitution at a time when you click the "next" button). I think that it may be worth looking into: It has several other features that you may like, such as teaching modules (beginner, intermediate, advanced, full student levels) and pretty good documentation and examples. The book: How To Design Program ( is a great teaching reference for this language which has a few nice examples using some of the libraries I mentioned above.

share|cite|improve this answer
I disagree. Functional programming is much more difficult to wrap your head around than imperative, even for college students. I would not want to teach middle school children about recursive data structures (an absolute must for Racket and co). – Patrick Collins Jun 9 '14 at 16:19
@PatrickCollins: I seem to remember studies that students (of any age) learned function programming faster than imperative programming if their minds had not previously been aligned to/polluted by the, arguably, rather unintuitive sequential-imperative paradigm (i.e. they were absolute novices). I can definitely confirm that for university: we teach function programming first and those without any programming experience have less trouble than others. – Raphael Jun 12 '14 at 6:20
@Raphael I remember my first year CS prof saying the same thing with regards to Racket. I believed he had mentioned a similar type of study. – user340082710 Jun 12 '14 at 20:26
@Raphael, I know quite a few people who are competent imperative/OOP programmers (even among people who weren't trained as such), and a scant handful that know their way around functional programming. Yes, recursion is natural if you are steeped in math thinking. Otherwise, it is just an extremely weird way of doing the "repeat ... until done" that comes really naturally. Come on, induction wasn't really understood until around Fermat's time, people have been defining/applying algorithms for a few hundred thousand years before that. – vonbrand Jun 12 '14 at 20:29
The Racket people have developed educational material for middle school children and have used it with success: – Dave Clarke May 10 '15 at 6:58

Python is a "almost pseudocode" language that is powerful enough to do "real" programming (most of the administrative tools in e.g. Fedora Linux are written in Python), it has simple to use extensions for graphics/graphical interfaces, it can handle large numerical problems (people use NumPy for this), much web programming is done in it, several programs use it as extension language. There is an extensive library, and many larger systems written in/for it. So it is not a toy language, learning it is useful later on.

Look at it's homepage, there are mature implementations available for almost any platform you might care for. It is free (not just zero cost). There is extensive documentation available, a Google search for "python tutorial" gives millions of hits. A hands-on web tutorial is Learn Python. For an introductory programming course using Python, consider Downey's Think Python.

share|cite|improve this answer
The OP specifically mentioned Python as not addressing the "easy to use debugger" criteria. This answer would be improved if you could point to some Python IDEs with easy-to-understand debugger support. – Wandering Logic Sep 1 '14 at 16:45

If you decide Python might work for you, I would take a look at the Jython Environment for Students (JES). There are some nifty debugging tools including a "watcher" that lets you choose variables to watch. You can control the steps or let it go quickly. I have used this IDE with middle-school-aged learners in a summer program successfully, but I also use this in an introductory course at the University level. The media computation libraries are fun, too. Students in my courses have enjoyed editing pictures and sounds. There is support for making animations too.

I have not used it for networking and distributed processing. There are examples in the Media Computation textbook by Guzdial and Ericson for topics like databases and functional programming, including higher-order procedures. You can do regular Python things in JES, but it has extra support for media things.

share|cite|improve this answer

You should probably use Visual Basic. It is simple, you can easily make the contacts list application along with some simple GUI games. You can also debug it. If your school is willing to dish out the dough you can get a dreamspark subscription. I think it will hold the students' attention.

share|cite|improve this answer

you exclude scratch developed by MIT which seems to roughly fulfill some of the criteria. anyway here are two newer languages that are worth some consideration.

  • Go by google. designed for fast compilation. here are the design goals

  • Swift by Apple for mobile development. designed to be a less complex alternative to Apple's Objective C.

  • node.js is newer & basically designed to expand the capabilities of Javascript to the server side & include networking capabilities.

share|cite|improve this answer
Thanks ... scratch lacks functional programming. It might be good for elementary school kids, but older kids quickly outgrow it (in my opinion). – Ari Trachtenberg Jun 12 '14 at 18:42
not an expert on scratch. however on quick skim it supports functions in custom blocks & even supports message passing via "broadcast" & some multithreading concepts. it also seems to support rudimentary robotics via a picoboard interface – vzn Jun 12 '14 at 19:04
Berkeley has an extension to scratch called Snap that has functions. It also has event handling, but it does not have networking and it's not easy to debug. – Ari Trachtenberg Jun 12 '14 at 21:06
right. figured debugger(s) would not be there & would fail on that item. but just stepping thru execution cmd-by-cmd (not very hard to support that) can be regarded as basic debugging. to me debugging is more a implementation aspect... ie one cannot rule out scratch debugger(s) materializing somewhere/at some pt in future... – vzn Jun 12 '14 at 21:10

Have you looked at Newspeak? Newspeak is a modern variant of Smalltalk. So yes, it's object oriented, but in the Alan Kay sense rather than the Simula 67 sense.

Having said that, if I were teaching programming to the middle school, I would ditch the debugger requirement and teach something more like Haskell.

share|cite|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.