Learning Programming In a Post-BASIC World 510
ErichTheRed writes "This Computerworld piece actually got me thinking — it basically says that there are few good 'starter languages' to get students interested in programming. I remember hacking away at BASIC incessantly when I was a kid, and it taught me a lot about logic and computers in general. Has the level of abstraction in computer systems reached a point where beginners can't just code something quick without a huge amount of back-story? I find this to be the case now; scripting languages are good, but limited in what you can do... and GUI creation requires students to be familiar with a lot of concepts (event handling, etc.) that aren't intuitive for beginners. What would you show a beginner first — JavaScript? Python? How do you get the instant gratification we oldies got when sitting down in front of the early-80s home computers?"
I like Ruby (Score:5, Informative)
There's Alice (Score:4, Informative)
Re:And why doesnt BASIC still work? (Score:2, Informative)
And why doesnt BASIC still work?
Because Apple has banned it from the iPhones and iPads that most of the "cool kids" are using nowadays. In fact, Apple pulled a Commodore 64 game from the iOS App Store [google.com] solely because the player could reboot the emulated C64 into the REPL of ROM BASIC.
TI-BASIC (Score:4, Informative)
You can write an actually useful program in just a few lines. It's got a few simple data types (floats, strings, lists and matrices), has a few basic functions (Disp, Input), and all the common language constructs (If-Then-Else, For, While, Goto). There's a few oddities (assignment is reversed, instead of "a = 2" you have "2 -> a"), and there's no proper way to declare a function (you can either make another program and call it, or use goto), but you can do a surprising amount with it.
I programmed those for a year or so. Tried learning assembly to get around the limits of Basic (mostly the speed), couldn't do it. But I did get into C++, and later all the other "real" languages, and am now pretty much a real programmer.
Re:I like Ruby (Score:5, Informative)
If I recall correctly, Ruby also has Hackity, a programming environment specifically for kids.
Scratch got my 6 year old started (Score:4, Informative)
Re:And why doesnt BASIC still work? (Score:3, Informative)
Because Apple has banned it from the iPhones and iPads that most of the "cool kids" are using nowadays.
Bogus. All interpreters are banned, not just BASIC.
And they run javascript sites just fine, some [calormen.com] of [osaware.com] which [yohan.es] implement BASIC [quitebasic.com].
Scratch -- the latest from MIT for kids... (Score:4, Informative)
Re:what I did (Score:5, Informative)
As somebody who writes Python professionally, I'm a bit biased, but can say with some assurance that the whitespace thing is not a major problem in the Real World. It's certainly no more of a problem than any other technique for designating a code block.
Compare these:
' Basic
If a == b Then
do_something()
EndIf
/* C and relatives */
if (a==b) {
do_something()
}
; LISP and friends
(if (== a b)
(do_something))
# Python
if a==b:
do_something()
Are you seriously suggesting that the last one is more confusing than the others? If your blocks are large enough that they can't easily fit on a screenful, you have other problems not related to your language of choice.
There are things to go after Python for, but whitespace is definitely not one of them. My take on its strength as a teaching language is that it can do really simple beginner stuff and really advanced stuff with graphics and sound (with the right libraries installed).
Re:what I did (Score:4, Informative)
or more specifically, not identical to this:
# Python
if a==b:
do_something()
That is not permitted in Python. It is a syntax error. You must either list a statement on the same line, or begin an indented block. If you want an empty block, you use the 'pass' statement. See, it's almost as if there are features designed into the syntax to help prevent mistakes. How odd.