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

kabalweg 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
kipbot 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
Rob 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.
Paul Boddie 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

The Insidiousness of The Slow Solution

In software development, slow solutions can be worse than no progress at all. I'll even say its usually worse and if you find yourself making slow progress on a problem, consider stopping while you're a head.

Its easy to see why fast progress is better: either you solve the problem or you prove a proposed solution wrong and find a better one. Even a total standstill in pushing forward on a task or a bug or a request can force you to seek out new information or a second opinion.

Slow solutions, on the other hand, is kind of sneaky. Its insidious. Slow solution is related the Sunk Cost Fallacy, but maybe worse. Slow solutions have you constantly dripping more of your time, energy, and hope into a path that's still unproven, constantly digging a hole. Slow solutions are deceptive, because they still do offer real progress. It is hard to justify abandoning it or trying another route, because it is "working", technically.

We tend to romanticize the late night hacking…

Finding "One Game A Month"

I was really excited about the One Game A Month challenge as soon as I heard about it.
For about two years I've struggled in fits and starts to make my way into game development. This hasn't been productive in any of the ways I hoped when I started. Its really difficult to be fairly experienced as a developer, which I believe I am in my day job as a web developer, while struggling really hard at an area in which your experience just doesn't exist.
Its like being a pilot who doesn't know how to drive.

But this challenge provided a new breath to this little hobby of mine. It gave me a scaffolding to experiment, to learn, to reflect on finished projects. I had spent far too much time on game projects that stretched on far past their exciting phases, bogged down by bad decisions and regret.
And it has worked.
I have a lot to learn. I have a lot of experience to gain through trial and error and mistake and discovery. I have a lot of fun to be had making more small games t…

On Pruning Your Passions

We live in a hobby-rich world. There is no shortage of pastimes to grow a passion for. There is a shortage of one thing: time to indulge those passions. If you're someone who pours your heart into that one thing that makes your life worthwhile, that's a great deal. But, what if you've got no shortage of interests that draw your attention and you realize you will never have the time for all of them?

If I look at all the things I'd love to do with my life as a rose bush I'm tending, I realize that careful pruning is essential for the best outcome. This is a hard lesson to learn, because it can mean cutting beautiful flowers and watching the petals fall to the ground to wither. It has to be done.

I have a full time job that takes a lot of my mental energy. I have a wife and a son and family time is very important in my house. I try to read more, and I want to keep up with new developments in my career, and I'm trying to make time for simple, intentional relaxing t…