A book and a programming language by John Maeda (of MIT).
Maeda wants to "build a basic understanding of the process behind creating a computer program". The language and the book are aimed at the visual thinker - the book is very beautifully made, with large elegant graphics and readable text.

The language (from a purely CS point of view) is a rather spare design with severe limits. Its small size make it easy to embed a running program into a Web page via an interpreter in the shape of a Java applet.
The syntax is clean (although not as clean as LISP). The language reduces the amount of things you can do - for example, you cannot PRINT text, but you can draw lines and turn on pixels; the idea is that, faced with a very small language the learner will be able to concentrate on the logic of programming.
This is similar to the logic behind using LISP (and particularly Scheme) as a teaching language; it makes syntax so easy that we can get quite rapidly to the really cool parts, like recursion, data structures and interpreters.

The really big difference here is that LISP is a complete language, and that you can write large and complex systems with it (witness GNOME and EMACS); its minimalism is in the syntax, not in the features.
OTOH, Designing by Numbers (also known as DBN) is very minimalistic in its features.
Designing anything really complex (like a text editor) in DBN would probably be rather horrible.
But this is not the intent behind the language: DBN is meant as a great first language that will give you an idea of what this programming thing is all about, with as little fuss as possible.
Having gotten that concept, the learner will abandon DBN and either drop programming completely or take up another "bigger" language.

An example DBN program:

fast
// enter program
Command drawRect x1 y1 x2 y2 color
{
   Pen color
   repeat y y1 y2
   {
      line x1 y x2 y
   }
}

Command drawSquare x1 y1 size color
{
   drawRect x1 y1 (x1 + size) (y1 + size) color
}

Command fatPoint x1 y1 size color
{
   drawSquare (x1  - 2) (y1 - 2) size color
}


   paper 100 100 0
   set bulk 128
   set step 6
   size 128 128
   repeat x 0 (bulk/step)
   {
      repeat y 0 (bulk/step)
      {
         set truex (x * step)
         set truey (y * step)
         fatpoint truex truey (step/2) 50
      }
   }
Looks rather cute doesn't it? More technically... this language is whitespace sensitive, the statement terminator is a carriage return. Blocks are marked by brackets. The only data type is the integer number. There is a sort of facility for using an array, for having network connections and for doing some things with color.

recursion is allowed. scoping, as far as I can tell, is violently local: inside a function you can see only the formal parameters of the procedure itself plus anything you might have defined inside it. Harsh, but it does keep things tidy. NO GLOBALS!

More information at http://dbn.media.mit.edu/, where you will also find a Java interpreter that will allow you to run the example program.

Log in or registerto write something here or to contact authors.