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?"
And why doesnt BASIC still work? (Score:5, Insightful)
Good starter languages? (Score:3, Insightful)
Processing (Score:4, Insightful)
Re:JavaScript (Score:2, Insightful)
I would say python. As event driven is not something people get right away. But people can think in sequences.
What trips people up is 'button click', 'magic happens', 'your code is called'. That messes with people for some reason as the 'magic happens' means they do not control it. When you are starting out you want some feeling that you control it.
Re:what I did (Score:5, Insightful)
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.
Different expectations makes gratification harder (Score:3, Insightful)
When I was a kid, the computer i programmed for (trs-80), was one of the first computer I ever saw. There were not that many programs for it. So it was easy to get excited about almost nothing.
Now all the kids have been exposed to all sort of technologies. They'll never get excited by very simple things like I have been. The thing to remember is that it will never be has rewarding has it was at the time for such simple things and no language is going to change that.
Re:Good starter languages? (Score:2, Insightful)
Scheme?! You've got be kidding!
Pascal (history, not recommendation) (Score:4, Insightful)
Re:And why doesnt BASIC still work? (Score:4, Insightful)
I guess the point of the submitter is that, back in the day, the rudimentary input and output of BASIC programs was rather de rigueur at the time, while nowadays such interfaces seem archaic and obsolete. Therefore, writing a BASIC program may not fulfill the expectations of someone who has grown up using a GUI environment.
This is, of course, bullshit. Making a computer write "Hello World!" or your name across the screen repeatedly by your own device is as much fun, intoxicating and empowering today as it was 30 years ago.
Of course, those wishing to sit down and write a multi-player, 3-D rendered, high-performance game for the iPad after spending a week reading a "For Dummies" book; they will be thoroughly disappointed.
This is no different from how it was in the 1980s. Writing my name across the screen repeatedly was about the most interesting thing I could coax my C=64 to do after a perplexing read of the instruction manual.
Eventually, I had to learn some very complex concepts in order to advance further than that and really get control of the machine. Things such as interrupt vectors, bitmaps, movable object blocks, RAM/ROM addressing, data structures, flow control, memory maps, Boolean algebra, non-decimal number systems, etc. Sure, these may not be high-level abstractions, but they are nonetheless sophisticated, non-trivial concepts, and just as hard to master to the uninitiated.
Perhaps because of their decidedly low-level detail, they may be even harder to grasp than modern platforms, which are by their very nature, designed to match closer the way humans think and work.
Having the curiosity, interest, and aptitude to learn and master complex concepts is what distinguishes the amateur programmer from the casual user. These are traits inherent to the person, not the subject or the tools, and they are as present in today's generation as in past ones. Moreover, they transcend languages, cultures, and even platforms.
-dZ.
Re:what I did (Score:4, Insightful)
Oh god, this.
Years ago I got into a bit of a row with a co-worker. He liked two space tabs, and insisted on using emacs, which is fine ... except emacs replaced a series of tabs with a single tab (or something) that it interpreted as needing to be indented according to its own rules. But left the file unusable for everyone else because they weren't privy to these fancy rules, they were just text editors.
Basically, every commit he made looked like the entire fscking file had changed. It took days for him to understand that I don't care if he sees tabs as 2, 4, or 8 chars ... but if he couldn't make the resulting output something which I could still edit in vi or every other editor we used, I was going to lock him out of CVS. Because once the file had been edited in emacs, it was fucked up for anybody not using emacs. When the display preferences of your editor start to affect other things, it's bad -- you can't break it for the lowest common editor just so you can have syntax highlighting in emacs. He didn't seem to understand that I wasn't complaining about his visual preferences, I was complaining about what it was doing to the actual source files.
I'm not sure I agree with your arguments in favor of whitespace being syntactically meaningful (I personally think it's stupid) ... but, the amount that I code has dwindled over the years, and it is what it is. My exposure to Python a bunch of years ago left me with a very bad impression of it as a language as it seemed to rely on/advocate some really poor coding choices that when carried into a different language made for absolute shit code -- C does not benefit from that kind of layout, in fact, it becomes absolute crap.
(Actually, I vaguely remember letting someone else go who wouldn't adhere to our coding standards ... he didn't seem to understand that it wasn't his own personal code base, and that far more than just him was affected by his choices. He seemed to think that I was stifling his creativity, as opposed to protecting the integrity of a huge code base which had been around for some years and represented the product as built by people far smarter. No great loss, he was fairly useless anyway.)