This is a companion discussion topic for the original blog entry at: http://www.codinghorror.com/blog/2007/12/modern-logo.html
I also like NodeBox for generating procedural graphics in Python (Mac only). Some of the example graphics produced are very impressive, and the generating code is surprisingly short.
There’s also a project for a cross-platform Ruby equivalent underway (Scribble?).
I don’t understand this fascination with Lisp. Why put all of your emphasis on “elegance” and lines of code. I prefer a easy to follow form that is verbose. Why be vague and cryptic?
(I know this post is about Logo, but upon reviewing the sample program, I can see the relation to Lisp; the same argument applies)
I never used logo. But I figure it was a favourite of many… cool
“that is verbose. Why be vague and cryptic?”
These are not opposites. Verbose code makes the initiation easy and the work hard.
Anyway I didn’t know lisp when I was exposed to logo, but I remember the lists, and the fact that the file I/O and file system seemed somewhat strange and nonintuitive, at least compared to the language proper.
(Ah, and ruby may have gotten its symbol notation from there.)
I can’t agree more with the last line from Processing you quote. I just wrote my thesis in Java. I didn’t have to hand in the program, only the results, and before starting to program, I couldn’t oversee which parts I would and wouldn’t explore.
Therefore, for every method I had to decide “will I spend a lot of time to make an elegant data structure and adapt easy later, or will I ‘hack’ this together because I will probably never adapt or use this code”?
In the end, I have made a mishmash program with quite a lot of really elegant methods, and some complete hackerish that was very specific to one test set. Actually, the core of my program is something “i am not proud of”, but in the sense of code hiding it was a nice black box having a comment “do only use this on the turtle layout” (where turtle is a mahjong term, not something to do with logo).
A friend of mine who did saw the code was repelled by it, however I think it has saved me a lot of time to NOT do every bit in extreme neat code style.
No…not logo…i’m begging you… I’d rather do a whole day of TURBO PASCAL 7.0 than one minute with Logo…
runs away screaming
(yes. I was forced to learn Logo in school. Yes I loathe it to this day, even more than Pascal)
Processing is nice, and some 2 years ago when Actionscript 2.0 ruled the Flash landscape I’d have agreed that processing would be your best bet for “learn as you go” visual programming.
I agree there is something uniquely rewarding to programming visual results and not just command-line apps, and I think it’s very compelling to a new/hobbyist programmer and as such can be a great teaching vessel.
While Actionscript itself may not be as fully matured a language as Java, I would staunchly argue the Actionscript3.0 API is a tightly integrated singular platform that offers far more potential and ease-of-use than the hodge-podge collection of importable libraries to be used with processing.
Furthermore, with MXMLC, Actionscript3.0 can be coded and compiled entirely with your own free text-editor…there is no need to actually own Flash, to create a .fla file, or to pay Adobe any money.
Flash apps are also easily shareable online, and play nicely with the browser as well as desktops via A.I.R, as well as providing their own ability to open Socket connections for fun synchronous multi-user applications. (like Games! a new/hobby programmer always wants to make games. ;o))
In summary: I think Actionscript wins for its environment and interoperability, even if it’s ECMAScript-based language is lacking “mature” features (like Enums) that can be found in Java 1.5+
Lots of Irritating Silly Parenthesis…
What I think is truly interesting here is the resurgence of Functional programming languages. One of the more interesting projects I’ve looked at is the Microsoft Research Language F#, which is a .NET language based on OCaml.
With the craze in object oriented languages, we sometimes forget that certain types of problems are more easily solved with different paradigms.
Logo is certainly based on Lisp. Logo’s FIRST and BUTFIRST operators are Lisp’s CAR and CDR. The syntax is, of course, very different, but that reflects the designer’s intention that the language be as easy to use as possible by the intended users, children. In discussing Logo, it is essential to not forget that the language was designed for pedagogy - to make it possible for children (not high school students) to enter a world where they could construct programs and reflect on the process of programming.
The same applies to turtle graphics. The purpose of turtle graphics was not to enable creation of photo-realistic rendering, or to do scientific visualization. The aim was pedagogy, to provide a compelling domain where one can think about programming. Turtle graphics provide some very important pedagogical features. First, because turtle motion is relative motion (forward/back, turn left/right) it allows a child to think of the drawing (or program) by using her own body, to “play turtle”. For children, the ability to think of a program concretely is essential, and nothing is more concrete to a child than her own body. Second, turtle graphics abstracts away coordinate systems, so a child can make drawings without having to first master matrix multiplication.
As a third, but lesser point: when properly done, turtle graphics encourages modularity and re-use. Why? Because turtle graphics (sub) programs can be composed, but only if the program has no side-effects (other than the drawing itself). That is, if the program, on exit, leaves the turtle’s heading and pen-state unchange, you can build larger drawings by combining smaller drawings. This idea, in miniature, is one of the core ideas we need to build re-usable, composable programs.
In sum: criticize the language according to its intended purpose (and the historical state of computing at the time.) Logo remains an excellent language for teaching. Logo is very easy for beginners to start with, yet allows one to grow into (most, if not all) the subjects of academic computer science.
Disclaimer: I worked on Logo at the Logo Laboratory at MIT in the mid 1970s, and was one of the developers who built Logo for the Apple II. I knew Papert and Solomon.
I only used logo to draw circles and stuff in elementary school… later on we used Logo Writer (basically the same, but the turtle had a turtle shape :D:D:D ). When they started to teach us programming we used qbasic… ah, the memories
They didn’t teach us programming in elementary school (or high school, for that matter). However, I think it’s funny for people to use execution speed as an excuse for writing something in Java, since that was the primary excuse against writing anything in Java for many years (and still is in some areas). In general, I still find the execution speed of almost anything written in Java appalling on a Windows desktop, and with the bickering between Sun and Microsoft over the proper way to write a JVM, I doubt it’s ever going to get significantly better.
Of course, once you get the JVM and the program loaded into memory and running, the program itself is usually responsive enough for many uses, but then so are most scripting languages.
Real programmers code in Logo !!!
(no pun here)
The same comments where made about Lisp and (Object) Pascal…
P.D. Karel it’s a good alternative, a mixture of Logo and Pascal…
I always preferred the use of Lost In Stupid Parenthesis.
As for why you should use it, after spending a bunch of months the only reason I could think of it was the only language that AutoCAD supported for building additional capabilities.
People who like Logo should check out Turtle Art on the OLPC (http://wiki.laptop.org/go/Turtle_Art). It’s like Logo but you build your program graphically, using pieces that fit together to show the flow of control. The thing I love about it is that the program and turtle art workspace are the same thing – it’s like building something on a lab bench instead of writing a computer program. It’s also one of the most polished XO activities, probably because it was written for a commercial robot product and then ported to the XO.
LOGO is so great I learned it when I was seven years old in the public library in Mexico.
I could say that I know 5 other sw developers that participated in the same program. Coincidence? I don’t think so.
LOGO is a joy to program and a joy to learn. And I don’t what language provides the WOW factor that drawing a star with a loop had back then…
A few details for people interested in Logo:
I describe the Lispy aspect of the language a little while ago here: http://blog.ianbicking.org/2007/10/19/logo/ – someone mentioned Ruby, and it wasn’t directly inspired by Logo, but Smalltalk was inspired by Lisp, and also Logo very specifically, and Smalltalk was a strong influence on Ruby.
Outside of Logo, for 3D worlds there’s Alice (http://www.alice.org/) and VPython (http://www.vpython.org/). I’ve heard good things about Panda3D (http://panda3d.etc.cmu.edu/), but it’s probably not as beginner-oriented as Alice and VPython. Pyglet (http://www.pyglet.org/) is shaping up to be pretty cool too. On the Ruby side there’s also the clever environment of Hackety (http://hackety.org/).
There’s lots of other things out there too, of course. I wouldn’t start with UCBLogo (too retro), and certainly not Java (where’s the interactive fun and experimentation?)