David Brin’s Why Johnny Can’t Program (Salon article, so ads etc.) is an interesting op-ed on how the kids of today aren’t given an instantly accessible programming environment like he and many of the previous generation of geeks had. Sample:
…if you want to give young students a grounding in how computers actually work, there’s still nothing better than a little experience at line-by-line programming. Only, quietly and without fanfare, or even any comment or notice by software pundits, we have drifted into a situation where almost none of the millions of personal computers in America offers a line-programming language simple enough for kids to pick up fast. Not even the one that was a software lingua franca on nearly all machines, only a decade or so ago. And that is not only a problem for Ben and me; it is a problem for our nation and civilization.
Brin calls for the return of a line-interpreted BASIC or a BASIC-like environment to come pre-installed on all new PCs. His nostalgic call to arms has resulted in a bulging virtual mailbag at Salon, your typical heated Slashdot conversation, and plenty of blogchat about it.
I can see Brin’s point, and agree with it, partly. Programming is no longer one of the up-front applications supplied with a computer, when in the past it was so different. My first programming ever was tinkering around with
Locomotive BASIC – sorry I actually meant Mallard BASIC (my memory failed me when I first wrote this piece) – which came with my father’s Amstrad PCW 9512. I started out inputting programs from magazines, before starting to make my own. Soon after, at school I became the class whizz with BBC BASIC – but I don’t recall it being that fun. BASIC involved lines and lines of boring stuff, and some downright tedious parts ( Locomotive Mallard BASIC suffered from not having a clear screen function, so you had to learn all about control codes just in order to do that). Most other kids who used BASIC got bored quickly and ended up just end up doing this:
10 PRINT “POO”
20 GOTO 10
Instead, I remember having a lot more fun with Logo. Logo’s visuality meant you could simply and quickly render, like drawing pretty polygons and stars with the Turtle (the onscreen version anyway, the floor one never really worked in our school). There was even the hidden delight that if you mucked up your programming in some way, you sometimes produced weird and interesting patterns – that leads to the wonderful moment of realisation, when you work out that a computer language can do stuff you couldn’t imagine, and you have the potential to find out how to do it.*
So while I agree that more accessible languages need to be made available I don’t think a return to BASIC is the way forward. Python is mentioned as an alternative – I love Python, but it is perhaps a bit too high level for Brin’s tastes – he’s more interested in exposing the underlying mechanics of an algorithm, like searching a string or walking through an array – a glimpse at the nitty gritty, to gain an appreciation in how computers work under the hood.
But for all its illuminating simplicity, BASIC teaches you very bad programming habits, and it isn’t as fun or intuitive as Logo was, but Logo suffers in the modern day; while when I learnt to program
15 18 years ago, most of the computers I used were command-line interfaces with limited graphical capability, so what you made on the screen wasn’t too far off what you saw normally. That no longer applies – make anything in Logo these days and it’ll probably be a bit, well, crap compared to what you’re used to seeing.
So a better language for learning needs to appreciate and incorporate the improvements in computers’ graphical and UI capabilities; I don’t know enough about scripting languages for million-colour 3D environments to know if any out there that are suitably simple and intuitive enough. Additionally it needs to incorporate networkability – learning how to start out on a computer is no longer a solitary activity. Find some way of getting your code to be more social, provide an environment that allow kids’ code creations to interact (I dunno, some sort of collosseum for hackable virtual robots that fight each other to the death, fuelled by 3D fractals that you create with your code, or something) and you could have the basis for a viable social network; it would never get the millions MySpace does but even a few tens of thousands of enthusiasts would produce enough interest to get talented kids who may not have thought programming can be fun to change their minds.
* Alright, I’m sure I didn’t frame it in those words, nor did I fully actually appreciate it at the time. But looking back on it, it was probably one of the key moments that set me on the path to being a geek for the rest of my life.**
** Second nostalgic post in a short space of time. I should just rename this blog I *heart* the 80s and get it over and done with…