Sunday, October 01, 2006

10 PRINT "BASIC"

This has been knocking around the blogosphere for a while now, but I may as well engage with it. Apparently, David Brin thinks coming generations will miss out because computers don't come with BASIC any more. I'm not so sure. I was a ZX Spectrum kid, and I used to spend a lot of time fiddling with code on it without any clear aim. Later, I met Mallard BASIC on the Amstrad PCW, and did a few things slightly more useful with it - Mallard had a file handling thingy called Jetsam you could call from within a BASIC script, which helped.

But - what? I rejected computers for a while, and only really got back to it when I developed a serious forums habit at RHUL. In a similar way, I first heard of blogs and Blogger in Vienna in the autumn of 2001, but didn't cross the threshold - so I suppose Instapundit's fame is at least in part my fault. Now I regret not learning to program properly. Looking back, though, I wouldn't wish BASIC on a new generation of geeks. Certainly not on computers with networking, graphical user interfaces and other stuff. Because the gap between "Hello World" and "anything you might want to make a computer do, especially when you're 12" is very broad. Yes, you have to learn concepts like sequential execution, loops, arrays, subroutines, procedure calls and that they are to be preferred to subs, that GOTO is considered harmful and the like.

But the point of an introductory language is that you shouldn't notice that you're learning that stuff. If the aim is learning-by-doing, it's got to make things happen, and design should involve some thought about what the users might want to do (think mobile devices).

That said, which programming language would my readers recommend I learn? (Don't say Brainfuck! or anything like that, please.)

3 comments:

Anonymous said...

What about Ruby or Python?

Both are very modern. Both are quite easy for a beginner to learn, and yet both are very powerful with lots of features that make computer science types pleased. Existing code in those languages is very structured and easy to read (for the most part). They both have plenty of support in the form of libraries and tools and so forth, and they can even both be run as an interpreter for that instant feedback like you got when you typed PRINT "HELLO" on your old 8bit.

Anonymous said...

If you want to learn programming languages *now* first ask yourself what you actually want to do with the language - what sorts of problems do you want to solve, etc. Then investigate that particular subject area and pick the language that appears to be most common in that area. Because you want learn without doing - and simple strawman programs will bore you after a while, just be realistic.

Or do a survey of various tech blogs and pick a language recommended by a tech blogger who other techies seem to respect. These days most tech bloggers are into OO and Meta-Programming, and that means either Ruby or Python.

Anonymous said...

I'd pick Ruby over Python because of a yearning for elegance. Both get the job done well, but Ruby was designed to be elegant and to implement the best ideas from other languages such as Lisp and Smalltalk. As a mathematician manque, this appeals to me. I think it would provide the best starting place.

Calling either of these 'scripting languages' really sells them short - yes they are interpreted rather than compiled, but otherwise both are functionally equivalent to a full language.

Start here:
http://www.ruby-lang.org/en/documentation/

C or C++ is what Real Programmers use, but frankly they are more painful than necessary, at least until you need to get really close to the metal.

kostenloser Counter