Skip to main content

Why Johnny Can Code

This is in response to the article Why Johnny Can't Code , over at Salon Tech.

I have heard several people already agreeing with the arguments against this article, so I know I am not alone. Although I completely agree that it is a very good thing for kids to have a quick and easy way to program on their computers, should they have the curiosity, I do not believe the author made very compelling points on the use of BASIC, or anything resembling it. Particularly, I think the author has far too high a reverence for BASIC and fails completely to see the damage the language can do to an aspiring developer, which I won't go into in this article. Conversely he seems to find languages that could fill the gap he says, namely Python, as somehow wrong for a job, which is entirely an incorrect idea. This is pointing from multiple vantages as being written by an unenlightened developer.

Yes, a fundamental understanding of how software works can be a good starting point for a life of technology as a hobby, career, or even just what burns the weather forecast into your toast. Love it or use it, technology with a background is more meaningful. In the past, this was intrinsically bound with BASIC, but that doesn't and should not hold true today. We have moved on out of more than disdain for our old friend and enemy. We have learned better.

Very quickly does the author of the original article mention and pass over Python and Perl as alternatives that don't mean some non-mentioned requirements for the job that BASIC filled in the past. Mentioning of putting his son to C++ after finishing with BASIC make me think that he is not a fan of this class of languages. There is some missing opportunity here, obviously. If he had brought his son to Python, rather than buying an old Commodore 64 out of frustration for finding a good BASIC interpreter for a modern OS, his son could have moved directly to more complex programs in a "basic" language, instead of learning to write the same "basic" programs in a complex language. Python is a fantastic educational language, but shines equally well when scaled to professional usage, which eliminates the bridges needed to cross from one language to the next through the levels of one's programming education.

Some shred of truth found, however, is the problems with bringing a language to the forefront of education in the was BASIC once was. There are too many languages that would argue they are superior. I will not deny that I think none of them old a flame to Python, especially in this context. However, I know I will be debated on this point. The fact remains that BASIC was a bad language, which served a purpose well, but has seen its day and is obsolete for a good reason. We have better ways of doing things, and that doesn't have to mean more complex languages, simply better languages.

David Brin , thanks for wrapping up Foundation , but look into the gaps in your logic about educational programming please, for your son's sake.

Comments

Joel Badinas said…
Java or C++ can be a good programs for starters too...
Basic has its days already and it maybe obselete this days.


KaBalweg
Free Source Codes and Tutorials
Anonymous said…
Others have weighed in on the virtues of BASIC as a way to get people hooked on hacking: Neal Stephenson in In the Beginning was the Command Line and recently Linus Torvalds said he dug BASIC in the past. http://www.codinghorror.com/blog/archives/000648.html
Anonymous said…
Ah, BASIC. Life was simpler back then. I had long hair and listened to rock and roll. Now I have no hair and can't hear anything. (Ok, perhaps a slight exaggeration.)

Anyway, back in the day, BASIC was a fantastic program to learn to code with. Of course, "real" programs -- to me, back then, that meant games and business applications -- were usually programmed in something else. (On 6502 microcomputers, that usually meant assembly language.) Thus, BASIC might have taught you some things well (what a subroutine was) and some things badly (what GOTO meant.)

Now you need to know HTML, CSS, Javascript, JSON, XML, and browser incompatibilities to code a website. And that's just the client side. You probably also need a server side language (Java, Python, PHP, Perl, whatever), all of that baggage, and probably SQL. Maybe a little LDAP, maybe some HTTP, maybe some SOAP or XML-RPC. All fun stuff.

So Calvin is right. The BASIC era is over. It was fun while it lasted. But Python is the new Pascal in terms of a instructional programming language, but with one important difference: it's deep and wide. So you can play in the shallow end and only move out further when you're ready to swim underwater. Going further, it can be used for high-performance, enterprise-class software (Google, anyone?) and still look like pseudo-code. Going deeper, some parts are modelled on LISP, the grand-daddy of brainy languages. And all you need to do is download it from python.org and run it. It's interpreted, just like BASIC.

The only real downside is the indenting. But after you get used to it, it becomes its greatest feature. (Just be sure to always use either tab or spaces to indent, not both.)

(and by the way, it's BASIC, not Basic.)

-jamie
Anonymous said…
It is definitely true that Python is used for serious work, as a quick glance at the available standard and third-party modules will show. Python is used for everything from game programming (Pygame, PyOGRE, Panda3D, PyOpenGL) to scientific (SciPy, MayaVi, etc.). However, Google mostly uses Python internally and not for the actually web-facing stuff. Supposedly that's mostly C, Javascript, and Java. I would also like to emphasize that there IS more programming out there than just web stuff. Frankly, I would much rather use something like a wxPython GUI with asyncore/asynchat/Twisted than the "Web 2.0" stuff. It's still a portable solution, although not as ubiquitous as a browser. But then again, a *standards-compliant* browser isn't exactly ubiquitous anyway.

I used to love BASIC, but I'd never go back to it after using Python even if you paid me. The fact is that BASIC doesn't generate enthusiasm anymore for me, because I used to be proud about making a todo list program in DOS with BASIC. Back then, programming anything at all was sufficient geek-cred. Nowadays, I'm writing small client/server apps in Python in less than 100 lines of code complete with a GUI, and anything less isn't interesting. The bar is set higher than it was, and quite frankly BASIC is a waste of time for those who want to do anything worth getting excited about when writing their first programs. The small BASIC programs written that would prompt for the user's first name and then print it out backwards on a DOS prompt is no longer impressive. I believe the Salon.com author is shunning reality for nostalgia.
Anonymous said…
One sees this kind of enthusiasm for BASIC all the time in certain technology communities - usually the ones involving people with an overdeveloped sense of nostalgia and with little idea of more recent computing developments, although at least the author of the article is aware of Python and Perl. However, the author fails to realise that even half-decent BASIC implementations deprecated line-oriented development (and it should be noted that assembly language programs are typically label-oriented instead of being structured through archaic notions of explicit statement numbering) and many imported control-flow concepts from languages such as Pascal in order to do so.

Of course, the term "half-decent" is about as generous as one can be with BASIC. Sure, dynamic languages don't expose beginners to statically allocated arrays, pointers to special regions of memory, or inline assembly language. However, the lack of emphasis on established programming concepts and practices that a heavy introduction to programming via BASIC would entail is arguably more harmful than an initial lack of exposure to things like machine addresses, machine language and memory-mapped hardware.

The author would do his son a favour by introducing him to dynamic languages and functional programming, especially since the best computer science courses (assuming his son takes that path) will probably be using such tools to undo whatever bad habits that BASIC-plus-C++ education has encouraged.

Popular posts from this blog

CARDIAC: The Cardboard Computer

I am just so excited about this. CARDIAC. The Cardboard Computer. How cool is that? This piece of history is amazing and better than that: it is extremely accessible. This fantastic design was built in 1969 by David Hagelbarger at Bell Labs to explain what computers were to those who would otherwise have no exposure to them. Miraculously, the CARDIAC (CARDboard Interactive Aid to Computation) was able to actually function as a slow and rudimentary computer.  One of the most fascinating aspects of this gem is that at the time of its publication the scope it was able to demonstrate was actually useful in explaining what a computer was. Could you imagine trying to explain computers today with anything close to the CARDIAC? It had 100 memory locations and only ten instructions. The memory held signed 3-digit numbers (-999 through 999) and instructions could be encoded such that the first digit was the instruction and the second two digits were the address of memory to operate on

Statement Functions

At a small suggestion in #python, I wrote up a simple module that allows the use of many python statements in places requiring statements. This post serves as the announcement and documentation. You can find the release here . The pattern is the statement's keyword appended with a single underscore, so the first, of course, is print_. The example writes 'some+text' to an IOString for a URL query string. This mostly follows what it seems the print function will be in py3k. print_("some", "text", outfile=query_iostring, sep="+", end="") An obvious second choice was to wrap if statements. They take a condition value, and expect a truth value or callback an an optional else value or callback. Values and callbacks are named if_true, cb_true, if_false, and cb_false. if_(raw_input("Continue?")=="Y", cb_true=play_game, cb_false=quit) Of course, often your else might be an error case, so raising an exception could be useful

How To Teach Software Development

How To Teach Software Development Introduction Developers Quality Control Motivation Execution Businesses Students Schools Education is broken. Education about software development is even more broken. It is a sad observation of the industry from my eyes. I come to see good developers from what should be great educations as survivors, more than anything. Do they get a headstart from their education or do they overcome it? This is the first part in a series on software education. I want to open a discussion here. Please comment if you have thoughts. Blog about it, yourself. Write about how you disagree with me. Write more if you don't. We have a troubled industry. We care enough to do something about it. We hark on the bad developers the way people used to point at freak shows, but we only hurt ourselves but not improving the situation. We have to deal with their bad code. We are the twenty percent and we can't talk to the eighty percent, by definition, so we need to impro