Entry tags:
- basic,
- david brin,
- perl,
- programming,
- python,
- ruby,
- software
Programming Languages: Pining for BASIC?
Salon is running a story wherein author David Brin complains that the computer world's deprecation and collective purging of the BASIC programming language (which of course he grew up with) is somehow hurtful to the technological development of today's kids, including his own. He seems to think that BASIC is a low-level programming language that helps kids understand how the machine works. Of course, the only way BASIC is low-level is that it encourages use of goto, like machine language and unlike modern high-level languages. Otherwise it is designed to insulate the programmer from the machine.
It seems to me that Brin is stuck thinking that the way he learned things is the only way to learn them, and he doesn't seem interested in modern options. I grew up on BASIC too, but I got away from it as soon as practical, and I wouldn't recommend that as a way for anyone to learn programming today.
If Brin wants his kid to learn something close to the machine (his major professed goal), he should choose C. If he wants his kid to learn a language that lets him ignore the machine and do higher-level algorithm work (part of the original goal of BASIC), he should choose Python or Ruby. Responses at Salon also mentioned programming TI-82 calculators, Lego Mindstorms, and other options that modern kids have and were unavailable to past generations.
On top of all that, today's technically-interested kids can put Linux or BSD on their computers and not only choose from a wide selection of programming languages to use (rather than the BASIC interpreter built into the computer and whatever else their parents could afford, as the previous generation did), but also delve as deep as they want into how all the pieces of the software and operating system work.
In one sense, however, Brin has a point. He mentions that his son's math textbook includes BASIC programs to demonstrate the algorithms. Since the computer world has rejected BASIC (a message the textbook writers seem to have missed), there is no single universally-accepted replacement. But that's mostly because of Microsoft - unlike every other common operating system today, Windows doesn't come with any development tools since they deprecated QBasic starting with Windows 95. On the other hand, MacOS, Linux, and BSD usually have Perl, Python, and others either built in or readily available for download.
Perl may be the closest we have today to a universally-available programming language -- it's an easy download and install on Windows, is generally built-in everywhere else, and is quite mature and popular. Many complain about its syntax, though most of that weirdness is obsolete and easily avoided. Python would be second (and a better first language), but it too has its quirks (well, one major quirk plus an object-orientation annoyance). Maybe Ruby is the way to go these days.
It seems to me that Brin is stuck thinking that the way he learned things is the only way to learn them, and he doesn't seem interested in modern options. I grew up on BASIC too, but I got away from it as soon as practical, and I wouldn't recommend that as a way for anyone to learn programming today.
If Brin wants his kid to learn something close to the machine (his major professed goal), he should choose C. If he wants his kid to learn a language that lets him ignore the machine and do higher-level algorithm work (part of the original goal of BASIC), he should choose Python or Ruby. Responses at Salon also mentioned programming TI-82 calculators, Lego Mindstorms, and other options that modern kids have and were unavailable to past generations.
On top of all that, today's technically-interested kids can put Linux or BSD on their computers and not only choose from a wide selection of programming languages to use (rather than the BASIC interpreter built into the computer and whatever else their parents could afford, as the previous generation did), but also delve as deep as they want into how all the pieces of the software and operating system work.
In one sense, however, Brin has a point. He mentions that his son's math textbook includes BASIC programs to demonstrate the algorithms. Since the computer world has rejected BASIC (a message the textbook writers seem to have missed), there is no single universally-accepted replacement. But that's mostly because of Microsoft - unlike every other common operating system today, Windows doesn't come with any development tools since they deprecated QBasic starting with Windows 95. On the other hand, MacOS, Linux, and BSD usually have Perl, Python, and others either built in or readily available for download.
Perl may be the closest we have today to a universally-available programming language -- it's an easy download and install on Windows, is generally built-in everywhere else, and is quite mature and popular. Many complain about its syntax, though most of that weirdness is obsolete and easily avoided. Python would be second (and a better first language), but it too has its quirks (well, one major quirk plus an object-orientation annoyance). Maybe Ruby is the way to go these days.
no subject
Personally, I think that the way to teach kids programming and get them interested is to do it in real-world applications, not by making them do programming exercises that are 25 years out of date.
You might start with a web design class, teaching the basics of html. From there, go to a PHP and SQL class, teaching scripting for the web. Then, they have familiarity with a lot of the concepts, like variables, expressions, loops, and i/o. From there, move on to a programming language that can do standalone applications.
That way, every step along the way they can produce something they can get excited about ("Hey mom, I just made a web page!").
no subject
It definitely helps for kids (or anyone learning) to be able to produce interesting results quickly. I'm not sure about web programming as a stepping-stone though, especially with PHP. PHP is nasty and encourages bad habits, SQL requires some abstract set thinking, and there are so many different languages involved that it could get too confusing too fast.
On the other hand, I do think everyone should be learning HTML these days. As long as they don't think writing HTML is programming.
no subject
But, there may be personal bias here, too, because I had mandatory foreign language and computer classes all through elementary and middle school, and when I then went to a public school that didn't have that sort of program, I was leagues beyond the other students in these fields, and could consistently outperform them even when introduced to totally new languages or software.
no subject
How old
BTW, I started programming (in BASIC) in 4th grade, later picked up some assembly language, then learned Pascal in high school, and both Modula-2 (basically a fancier Pascal) and C in college. Based on my experience, I agree with
Re: How old
Re: How old
Re: How old
Re: How old
Re: How old
universally available
Microsoft has recently released their own version of Python. Python is on OSX and I think most linux versions have python as well. Perl's standing isn't quite as strong on OSX or Windows.
I find in perl I have to manage more extraneous code than python, so I tend to prefer python.
What do you feel is python's major quirk? I find python's OO very unobtrusive (unlike Java or C#).
Ruby does look to be a good language but it is on the same vector as python, so it is not interesing enough for me to mess with. (I don't gain than much more productivity or solve problems in different ways)
Languages like, Erlang and Haskell are on other vectors and look very interesting.
Re: universally available
Its major annoyance, however, is that its OO is incomplete. Constants don't seem to be objects. Various operations work in a functional way rather than an OO way, while other operations are OO. Therefore it can be difficult to intuitively figure out whether to do x.foo or foo(x) or ClassName.foo(x).
I was quite happy when I discovered that Ruby fixes all these problems, plus includes many of the conveniences of Perl.
Someday I might mess with Erlang or Haskell. The only functional languages I've done anything with are Lisp and Scheme, and I haven't done much with them.
Re: universally available
"in the face of ambiguity refuse the temptation to guess". Whether or not you prefer one probably depends on your personality. Since they are both very capable.
I think they are close enough the 2nd order effects become important in choosing (do you need a web framework=ruby, do you need heavy number crunching == python)
With regards to indendation, in most common programming languages you indent anyways. Effectively, it is as if you have the same code with the parens (or whatever) erased. In other words, the parens are superfluous line noise. I've programmed in other languages for years, and I have never found myself limited by python's indentation. Perhaps in theory there could be a problem just like in theory static compile time typing may give you more reliable code. However, in practice that does not seem to be the case. It is probably something you have to try to know.
Ruby has an ambiguity, though I could be wrong. In Python you have to have () if you want to do any type of call: foo() object.foo(),etc.
In Ruby, object.foo -- is it a method call or an attribute? You cannot tell w/out more context which means you have to look at more code.
Erland, btw, looks really cool. Just like bytecode from back in the 80's pascal days is finally coming into fruition, I see erlang's ideas about threading (I think they got like 20 million threads running on a typical sun box!) to be something other languages will look at.
I'm tired, I hope most of this is coherent . . . .
Ruby, Python, etc.
I disagree that block markers are superfluous. It's useful to see exactly where a structure ends, and it also helps some editors with their features. Also, doesn't Python treat a tab as a single indent rather than 8?
But anyway, I don't see the indentation thing as a big deal, just a quirk. The inconsistent OO is more bothersome to me.
As for the object.foo thing... it could be argued that it's a feature not a bug, as in "you shouldn't really need to know whether it's a method or an attribute."
I don't really know anything about Erlang....
Re: Ruby, Python, etc.
With regards to "you shouldn't really need to know whether it's a method or an attribute."
I think you do need to know. In ruby the mention of an object either means a reference or a call to the object. If you don't pay attention, you may accidentally call something when you didn't intend to. So, it is necessary to know.
Btw, I am not saying python is better than ruby. Python does have warts like with default arguments being bound only when the function is created and such. In practice, I just never found the things you mentioned to be warts.