Greg Hewgill ([info]ghewgill) wrote,

on learning programming

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".

Tags: osw

  • Post a new comment

    Error

    Anonymous comments are disabled in this journal

    Your reply will be screened

    Your IP address will be recorded 

  • 7 comments

[info]nugget

September 16 2009, 20:15:32 UTC 2 years ago Edited:  September 16 2009, 20:15:43 UTC

Only if you get the plastic turtle on wheels.

Anonymous

September 16 2009, 21:25:16 UTC 2 years ago

My daughter is doing well with Scratch (scratch.mit.edu) and is moving towards Alice (alice.org).

[info]kvarko

September 17 2009, 00:09:02 UTC 2 years ago

At work, I've had to do some programming in C++, instead of my safe comfy world of Haskell. And, wow, it amazes me that people can stand having to program in this language day in and day out. I wanted to know how something in the STL worked, so I made the mistake of looking at the source code -- I commented to a coworker that it's stuff like that which gives programming a bad name. If that's all someone ever saw of programming, I wouldn't blame them for running screaming as far away as possible.

[info]kuoirad

September 17 2009, 00:25:56 UTC 2 years ago

LOGO was how I got my start. Then again, I hate programming, and can't do it well at all... ;)

[info]pne

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

10 PRINT "JAMES IS A STINKY POO"
20 GOTO 10

[info]ivo

September 17 2009, 16:48:02 UTC 2 years ago

Hah, I was just explaining to a coworker how to write a really quick'n'dirty Java class to interact with our software's Java API, trying to focus on functional stuff such as what inputs and outputs do our API methods take.

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...

[info]taral

September 18 2009, 23:30:35 UTC 2 years ago

"public static void main" covers at least 3 of my gripes with Java-like languages. :)

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!"
Create an Account
Forgot your login or password?
Facebook Twitter More login options
English • Español • Deutsch • Русский…