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?"
GUI? (Score:1, Interesting)
Logo and ML (Score:4, Interesting)
I learned BASIC first. When I was shown LOGO, I wrote a few lines of code to draw a Sierpinski triangle, and thought to myself: there is no fucking way this can be this simple. It worked, though, and sure got me to appreciate the weird academic languages.
Simple stuff has been done (Score:5, Interesting)
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.
Re:what I did (Score:5, Interesting)
Start with what you find easiest and move to C (Score:4, Interesting)
Python, Perl, Lisp, Scheme, BASIC, Java, JavaScript, shell... it doesn't matter. Pick up whatever feels most comfortable, or whatever tool is most readily available. Learn the basics of flow control, data structures, and the most fundamental algorithms. Learn how to debug, document, log, build, install and maintain.
Once you've mastered these basics, move immediately to C (not C++). Programming in C will teach you what it is that you're actually doing in that high level language, and force you to manage everything that you want to do. You don't just instantiate a new class to get a thread or forget about that variable's storage when you're done with it. You have to think about the details and understand them, and even if your entire career is spent writing Python, you still need to understand these things. I'd recommend assembly, but there's a lot more well documented sample code in C to work from, and getting larger projects done in C is still practical, if somewhat painful.
Once C is something you're comfortable with, trying out C++ is an excellent next step, but that's probably best determined by what you want to / have to work on.
Re:I like Ruby (Score:5, Interesting)
Assembler (Score:4, Interesting)
How about starting with assembler?
http://altdevblogaday.org/2011/03/24/machine-code-is-for-kids/ [altdevblogaday.org]
How about an easy graphical language? (Score:4, Interesting)
Still, the ability to put a button on the screen, and then pull up the code in the button to find:
on mouseUp
ask "Please enter a number"
put it into theNumber
answer "You entered " theNumber
end mouseUp
That's the sort of thing you can build off of very easily.