Learning Programming In a Post-BASIC World
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?"
And why doesnt BASIC still work? Any reason they can't still use BASIC?
It's lightweight, portable, and has a ton of interesting projects for learning. Start here at http://www.ruby-lang.org/en/ Check out the "Try Ruby in Your Browser link" on the right hand side.
Agile Artisans
God no. Visual basic is a very syntax sensitive language with huge libraries. It is like the anti-beginner language. Even microsoft's other major .NET offering(C#) is better.
My reccomendation is python, with a lean towards using graphics libraries like vpython. Being able to go mysphere=sphere() is glorioiusly simple and have it show up in 3d is grand.
Python has the following features that are great for learning:
interactive debugger- type your program line by and and see what each line does.
english-like syntax(except elif). As much as possible, python is designed to be written as it would be read out loud. eg: for item in array: print item
at the language level, absolutely no machine restrictions. Integers can get as big as your ram, no pointer math,
It's almost certainly the best choice.
MIT's Scratch ( http://scratch.mit.edu/ ) has gotten my kids started with programming. It's fun, and teaches all the fundamentals necessary for learning programming logic.
I too started with basic in middle school but it did not teach me much. In high school we did fortran, which taught me mad skills, then I taught myself C and C++. I still think C is important for people who want to do serious programming as it does not have the cruches of the other languages, is simple enough to be put in a two hundred page book, and will teach everything one needs to know about debugging and basic design.
In terms of instant gratification, I would suggest writing web apps in python. Most of the GUI stuff is taken care of by the browser, Python takes care of parameter passing to and from the user, and one can teach all the concepts, aside form parralel programming. A kid can write any number of games and if one has access to a web server, it can be run anywhere there is internet access. Such a thing can be great motivational tool.
"She's a scientist and a lesbian. She's not going to let it slide." Orphan Black
Python is not a good solution. Especailly if you are worried about syntax sensitivity as your parent poster was. Sure white space is a good thing to organize your code, but the actual execution of your program shouldn't be changed by the lack of whitespace. Python is a pretty good language overall, but forcing beginners to understand that whitespace makes a difference in how something executes is asking for trouble.
Anthropic principle: We see the universe the way it is because if it were different we would not be here to see it.
I'd recommend Brainfuck. It has no library at all to confuse beginners and only 8 commands.
What I find amusing is how completely Pascal has disappeared from both historical memory and current usage. Some of you may remember the 80s for Basic on a C64, but I remember a huge bandwagon for Pascal both as a teaching language and as a working language. (I am not advocating Pascal, just reminiscing.)
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).
I am officially gone from