8
$\begingroup$

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.

$\endgroup$
4
  • 2
    $\begingroup$ 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: wiki.python.org/moin/IntegratedDevelopmentEnvironments 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. $\endgroup$ Commented Jun 9, 2014 at 20:39
  • $\begingroup$ Chiefly, I'd like the error messages to be clear and sufficiently descriptive that a novice programmer can understand them: for example: "AttributeError: 'module' object has no attribute 'BufferedIOBase'" is not descriptive - which object was the problem, and where did it need the desired attribute? $\endgroup$ Commented Jun 10, 2014 at 2:08
  • 1
    $\begingroup$ 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. $\endgroup$
    – Raphael
    Commented Jun 12, 2014 at 6:22
  • 1
    $\begingroup$ I fail to see how Python is "not debuggable," just use it's command line interpreter. And I'm not alone in that "debugging" is a bad way of developing programs. Yes, I do reach out for a debugger on ocasion too, but I find that I do better without almost all the time. $\endgroup$
    – vonbrand
    Commented Jun 12, 2014 at 20:33

7 Answers 7

4
$\begingroup$

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.
$\endgroup$
3
  • $\begingroup$ Khan academy seems to have a nice wrapper for Javascript that does most of what I need. $\endgroup$ Commented Jul 8, 2014 at 4:26
  • 4
    $\begingroup$ You forgot the link to destroyallsoftware.com/talks/wat $\endgroup$ Commented Aug 31, 2014 at 20:47
  • $\begingroup$ +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.) $\endgroup$ Commented Sep 1, 2014 at 15:57
8
$\begingroup$

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: http://racket-lang.org/. 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 (http://www.htdp.org) is a great teaching reference for this language which has a few nice examples using some of the libraries I mentioned above.

$\endgroup$
4
  • 5
    $\begingroup$ 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). $\endgroup$ Commented Jun 9, 2014 at 16:19
  • 2
    $\begingroup$ @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. $\endgroup$
    – Raphael
    Commented Jun 12, 2014 at 6:20
  • 5
    $\begingroup$ @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. $\endgroup$
    – vonbrand
    Commented Jun 12, 2014 at 20:29
  • 1
    $\begingroup$ The Racket people have developed educational material for middle school children and have used it with success: bootstrapworld.org $\endgroup$ Commented May 10, 2015 at 6:58
3
$\begingroup$

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.

$\endgroup$
2
$\begingroup$

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.

$\endgroup$
1
  • $\begingroup$ 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. $\endgroup$ Commented Sep 1, 2014 at 16:45
1
$\begingroup$

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.

$\endgroup$
4
  • 1
    $\begingroup$ Thanks ... scratch lacks functional programming. It might be good for elementary school kids, but older kids quickly outgrow it (in my opinion). $\endgroup$ Commented Jun 12, 2014 at 18:42
  • $\begingroup$ 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 $\endgroup$
    – vzn
    Commented Jun 12, 2014 at 19:04
  • $\begingroup$ 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. $\endgroup$ Commented Jun 12, 2014 at 21:06
  • $\begingroup$ 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... $\endgroup$
    – vzn
    Commented Jun 12, 2014 at 21:10
1
$\begingroup$

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.

$\endgroup$
0
$\begingroup$

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.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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