I didn't get as much done on xearth today as I had planned to. Instead, I got involved in a long conversation at chchspace about programming languages, which migrated toward a discussion about a way to introduce programming to young people. For example:
class Hello {
public static void main(String[] args) {
System.out.println("Hello, world");
}
}
is a lot more crap to have to explain (just how long does it take to explain away "public static void main"?) than:
print "Hello, world"
But even then, "Hello, world" is a major let-down as far as a first program goes. My first ever program was a graphics program: It drew a diagonal line from the top left to the bottom right of an Apple ][+ high-res graphics screen. Printing text came later, on an as-needed basis (probably when I first needed to debug something). I think it's important to introduce programming using a medium that's more malleable than plain old ASCII text.
Text is symbolic. By itself, it rarely looks interesting, but it's a representation of something interesting (maybe). It requires a bunch of cognitive processing to go from the letters on the screen, to ideas that are meaningful. When you're learning a new method of expression such as programming, having to apply this extra cognitive load to everything you do (that is, having to read and understand the program output) detracts from the learning process. Young children learn to draw pictures before learning to write words; even Koko can draw pictures.
What's the right answer? Is it Logo? Maybe they were on to something in 1967. Is it Adobe Flex? Silverlight? Yahoo! Widgets? I believe it's likely to be something like that. It is definitely not "public static void main".
September 16 2009, 20:15:32 UTC 2 years ago Edited: September 16 2009, 20:15:43 UTC
Anonymous
September 16 2009, 21:25:16 UTC 2 years ago
September 17 2009, 00:09:02 UTC 2 years ago
September 17 2009, 00:25:56 UTC 2 years ago
September 17 2009, 08:20:03 UTC 2 years ago Edited: September 17 2009, 08:21:31 UTC
I wonder how many people's first programs were
September 17 2009, 16:48:02 UTC 2 years ago
Discussion got sucked into a "what's the difference between public and private", "why did you declare that variable as static" and the various options in Eclipse's New Class windows... Sigh!
Oh, and Yay Logo, that might have been my first official "language" I was taught in high school in '89 or so...
September 18 2009, 23:30:35 UTC 2 years ago
Some people will say "well, it's only a visible cost because the program is small". Well, better languages are better:
main = putStrLn "Hello, world!"