Letters posted here are associated with the following article:
The letters thread is now closed.
perl -we 'print "Big Tits" until 1==0'
Perl seems to fit the bill, since it can be as simple as you want and doesn't even have the type issues Basic has. It's ready when you are to step up to object oriented programming but you don't have to start with it.
Object oriented perl is a wonderful way to learn objects. Wait don't scream. I said "learn". I'd been object oriented programming for years in Java and other languages. But I truly did not understand how all the pieces worked till I wrote perl objects. In perl it's like one of those "visible man" models. You learn how inheritance works. You learn how binding of an instance to a class works. You understand closures for the first time. You understand how the namespaces are kept separate and how instance memory is allocated. It's not just some voodoo that simply works, like in JAVA. Moreover all of the voodoo is not out of reach but right there for you to mess with. An instance can change it's own inheritance if you want it to. An instance can create a new method and write it into it's own namespace if it wants to. An instance can trap calls to it's own methods and redirect them or intercept calls to methods that don't exist and respond to them.
Those features are not unique to perl (for example pyhton implements objects identically to perl). The difference is that All of that object management occurs in perl itself and is not hidden behind syntactic sugar (like python and java). You quickly appreciate what dereferencing costs, etc...
The other thing that is nice about perl for learning is all of those prefixes like $ @, and so forth. They may make perl look like cursing but they force you to think about what a variable is. When I index out an array, I get what? an array? no I get a scalar, so $X[2] is how I index @X. You can look at someones perl program and if it's written well tell what every word is. You cannot look at a bare name in python or java and tell if it's a method, an array, a hash, a scalar or reference. Perl you can. (Oh and by the way let me explode a perl/pyhton myth. python has more special markup characters in use than perl, the main difference is that in python they are suffixes instead of prefixes and are overloaded with multiple meanings--try counting how many modifiers there are some time (e.g. () , [] ** and so on))
Now once you learn perl objects. Well it's time to put down the perl and back away slowly. Python, java are much better languages for writing re-usable, easily read, complex object oriented programs. Perl is still a much more powerful language than either. But it's powerful for efficiently creating compact or single use programs quickly. Not for well designed complex systems.
It's the perfect entry level language. And it's also something you'll use your whole life for quicky scripts.
In response to:
"education-computerizing reformers of the MIT Media Lab are failing, miserably"
Check out
http://dbn.media.mit.edu/dbn/
Yep, line by line programming run straight from the web, since 1999.
Maybe try:
repeat i 1 10
{
line 10 10 90 (i*10)
}
Or go nuts:
http://dbn.media.mit.edu/info/vocabulary.html
Best,
-Tom
tom@media.mit.edu
I guess one option is to find an emulator. I used to love my old Commodore 64 and got an emulatro for my pocket pc. Installed it and was greeted by the familiar command line.
Any number of computer languages he can start playing with.
PERL
PHP
Java
C
Hell start him on Javascript, let him play with SQL. Plenty of free resources out there.
Johnny can't code because dad's out of date. It's like Dad's upset that his son can't cut an album because he can't find an old reel to reel tape.
Why would you want to teach a fifth grader computer programming? Programming is a skill; it's a trade; it's a way to make a living. I went to college 25 years ago majoring in Comp Sci -- today, I don't even think that we should have such a major, at least not for a BS degree. You want to be a computer programmer? Study math, Physics, Chemistry, Biology, Art, music...and pick up a Comp Sci minor along the way. We have enough monkeys banging on the keyboard who know all sorts of fancy, new-fangled contraptions, yet they can't code or debug or reason their way out of a paper bag.
Over my 21 year career I've seen more than my share of bad computer programs. I don't know whether their authors learned computer programming by the way of BASIC, COBOL, Algol, Z80 assemblly or PERL, but the common feature that bound them all together was that they couldn't create an elegant logical construct to save their lives.
Microcoder
"It is practically impossible to teach good programming to students that have had a prior exposure to BASIC: as potential programmers they are mentally mutilated beyond hope of regeneration."
-Edsger Dijkstra, 1975
You can find an archive of his lectures and notes here:
http://www.cs.utexas.edu/users/EWD/
As for the person whose parent(s) wouldn't let him have an atari, I had an atari 1200 which was fully programmable. I coded in basic, I loaded and saved to tape and later to disk. The 8 bit atari systems were much different than the 2600.
I was struck by the fact that David may have missed the larger point that he mentions in the article - the fact that our children hack the technology that we create. David's father hacked the automobiles that his grandfather's generation created; David hacked the emerging computers that his father's generation created; and our children are now hacking the global web that WE have created.
A wrench and screwdriver were the tools that allowed David's father to gain the knowledge required to hack the products of his grandfather's creation.
BASIC was the tool that allowed David to gain the knowledge required to hack the products of his father's generation.
The desktop computer and all it's myriad appslications for creating web pages and leveraging email and chat and all the rest make up the basic toolset that will allow his children to hack the major technological contribution that David's generation has provided to humankind.
And our grandchildren? Perhaps they will be hacking the global artificial intelligence created by our web-hacking progeny.
Relax, and do not bemoan the loss of the past. We cannot know where our children will take us - we can only watch in awe as it happens.