I find the “everybody should learn to code” movement laudable. And yet it also leaves me wistful, even melancholy. Once upon a time, knowing how to use a computer was virtually synonymous with knowing how to program one. And the thing that made it possible was a programming language called BASIC.
Invented by John G. Kemeny and Thomas E. Kurtz of Dartmouth College in Hanover, New Hampshire, BASIC was first successfully used to run programs on the school’s General Electric computer system 50 years ago this week – at 4 a.m. on May 1, 1964, to be precise.
It’s the only programming language I was ever somewhat proficient in (when I was about six years old). I never moved beyond it, and now, I know nothing about programming. BASIC has played a huge role in the history of computing, and its birthday deserves to be a thing.
…was my first programming language, back in 1986.
My first significant programming experience was on a Commodore VIC 20 back in 1982/83 (can’t remember exactly, but I was in 6th grade). Good times. My brothers and I filled the 3.5k of BASIC memory up before our text adventure game was finished.
I remember the ZX81 being the first computer I programmed, soon followed by a Spectrum 48K. Although, I also learned Z80 assembler as BASIC was just too slow after a while!
As for modern day programming languages, I find VBA in Excel macros very similar to the original BASIC we all knew and loved.
These days I use mostly PHP and Javascript as I am a web developer, but still dabble in VBA macros from time to time.
I enjoyed writing assembly on the Timex-Sinclair computer as well as its BASIC, but I’d moved on to other BASICs by the time the Spectrum came along.
Sinclair BASIC was actually written in a TIL (threaded interpreted language – FORTH is one). Most BASICs were written in a variation of a TIL because that was the most efficient thing going at the time.
My very first BASIC was on the SOL-20 in about 1977. Really fun! Before that, it was Fortran, COBOL, assembler, machine language, etc. But BASIC was the first one that was actually fun.
Many BASICs followed, too many to list or remember. Takes me back. Too bad it can’t leave me there.
Remember when computer magazines came with complete code listings of games? Those where the days.
Or code published via vinyl records as add-ins for magazines? Or even broadcast? Yes, that was “state of the art” when I started programming microcomputers in BASIC in the 1980’s (started whilt in 3rd grade at school). The devices available at my school at this time were the KC87, the first I programmed on, with the terrible keyboard, later replaced with a KC 85/3. It was a time when the term “IT” wasn’t invented yet, and having access to a computer (even a small home computer) was a privilege.
Here you can see some pictures:
KC 87:
http://www.robotrontechnik.de/index.htm?/html/computer/kc_dresden.h…
KC 85/3:
http://www.robotrontechnik.de/index.htm?/html/computer/kc_muehlhaus…
BASICODE-based vinyl record:
http://www.robotrontechnik.de/index.htm?/html/komponenten/datentrae…
Even though BASIC today seems to be “ugly old stuff”, it was the thing that convinced me to learn more about computers, learn how to program them, and move to other languages in the end. It’s still kind of fascinating that it still lives on in “modern” products such as “Visual BASIC” and “VBA script” which are considered “enterprise-grade software”. It’ll look more funny when you emphasize that the “B” in “BASIC” stands for “beginner”, especially when being confronted with self-proclaimed “professional programming experts (certified!)” who actually don’t know shit about computers. ๐
50 years… makes me feel old… ๐
BBC Radio!
I do, many an hour, day or even week was spent typing them in, then checking for typos every time it did something unexpected!
This is what many kids called programming back then, but only a handful really understood what they were doing!
Oh yeah… I typo’d a DOS Batch file I found in one and wiped command.com from the computer ( along with most of DOS). My dad wasn’t the happiest with me.
The best program ever written in basic.
…and is still 100% functional in DOSBox on modern operating systems!
What would you consider to be a modern day equivalent of BASIC? Anything other than modern variations such as FreeBASIC?
I often considered Python as one, but it’s just so… complex. BASIC had a simple charm that made me feel like I was in control of the computer. With modern programming languages I feel like a tadpole swimming in the ocean.
What do you think?
10 The problem with BASIC’s simplicity is that it does not provide higher level abstractions like structs, functions, local variables and so on. Without such tools, programming something relatively complex is a nightmare. I think all the features found in C or Pascal should be the minimum common denominator that any imperative programming language should have.
20 The first programming language I learnt was ATARI BASIC, and though I enjoyed using it a lot, I do not imagine writing something useful on it nowadays.
30 GOTO 10
Edited 2014-04-30 20:07 UTC
BASIC’s original design was for use on low memory systems (hence the usage of byte codes for commands). In my opinion it never should have been taken seriously as a full development language. Microsoft, of course, would argue with me on that point. Then again, Visual BASIC was not at all like the early BASIC languages on personal computers.
VB was frankly perfection. it did ONE job and it did it VERY well, and that was building business programs, especially VB frontends to DBs. You’d be surprised how useful that is to SMBs even today and sadly I have yet to see any language that can whip off a frontend as light, quick, responsive, or as easy to go from mockup to useful program as VB. Damned shame they got rid of it for .NOT, just one more bonehead idea from ballmer I bet.
In my experience at the time it was very unfriendly to ANYTHING that was even remotely outside the box they built for you. We easily spent 80 percent of our time coding around VB’s limitations. Foxpro (and even Visual Foxpro) was a far superior development platform in those days.
If you don’t want a basic variant then, if you are looking to just do processing and no graphics I’d say scheme (r5rs). http://www.scheme.com/petitechezscheme.html
Nice to use to experiment with algorithms.
On Windows if you did want to use a basic variant there’s MS Small Basic (http://smallbasic.com/)
I agree with you on Scheme, though you can do a lot more with it than just processing. Chicken Scheme for example has a whole lot of extensions available http://wiki.call-cc.org/chicken-projects/egg-index-4.html including bindings to, for example, OpenGL, SDL, Qt etc.
If these aren’t enough it is trivial to interface with C with Chicken Scheme.
Racket might also be a good choice. It is very ‘batteries included’. Its IDE DrRacket is great if you miss the ‘turn the computer on and get coding’-vibe of old home computers with BASIC.
Edited 2014-04-30 20:45 UTC
I would consider Python as a good choice, mostly because it can be used directly in the interpreter as well as with source files (and a mix of both). This is very similar to “the old days” of BASIC.
Perhaps Blitz Basic is worth a look? It’s the modern evolution of Blitz Basic from the Amiga years ago (the language which games like Worms, Gloom and Skidmarks were written in), and it appears to carry on a similar philosophy. It uses primarily built-in BASIC commands you might be familiar with, but also supports the use things like structs, functions and custom datatypes to allow slightly more modern programming, and native OS calls. It also supports the addition of custom libraries for more specialised commands, or libraries you build yourself.
The “BlitzPlus” version is free to download and allows programming and creation of applications on Windows. http://www.blitzbasic.com/Products/_index_.php
+1 for Blitz Basic.
I would consider Scratch ( http://scratch.mit.edu ) a modern alternative to BASIC.
The only cons are (1) that is it meant for kids (2) It is really limited in regard to variables, math functions and such.
For grown-ups I’m not sure of the best one.
Okay, one that I would recommend is Tcl/Tk ( for example from http://www.activestate.com/activetcl ), as it is a lot more approachable than python… but it has its own quirks.
On the other hand, basic JavaScript is not that hard with the right book. One I love is “Eloquent JavaScript: A Modern Introduction to Programming” ( http://eloquentjavascript.net/ ).
Hope this points you in the right direction
Actually I would consider Scratch an alternative to Logo and as you say, I am not sure if a complex software system could be written on it.
Edited 2014-04-30 22:15 UTC
+1 for Eloquent JavaScript!
Python, complicated? No it isn’t. Everything’s a dictionary of some sort – a namespace, a module, a class, an object. Whether it’s object.value or object.__dict__[‘value’], it’s all just dictionaries.
Edited 2014-04-30 21:43 UTC
For kids around 6 – 10 years old, yes it is complicated.
This is the age many of us started coding back in the golden BASIC days.
Really?
How simple is it do simple things?
hello world
Basic
10 PRINT “HELLO WORLD”
Python
print “Hello World”
Console i/o
BASIC
10 PRINT “What is your name?”
20 READ $A
30 PRINT “HELLO $A”
Python
name = raw_input(“What is your name?\n”);
print “Hello ” + name
I don’t think python is more difficult for simple things.
When I was around nine, I had written a simple tune composer for the IBM PC speaker (my plan then was to become a famous composer), and a graphics program that would let you draw pictures in 16 colours on a CGA (using the not-really-graphics 160×100 mode). All this was really easy to do on BASIC. Python adds much more complexity, and would’ve put stuff like this out of my reach at that age.
That is a very simplistic example.
The problem is when you start touching files, graphics, a little bit of data structures and so on.
The original BASIC systems are still quite comprehensive for such tasks, while Python requires learning about packages, classes, exceptions and quite a few other concepts.
I don’t think file access is any more difficult in python.
Graphics? Well, maybe you’re right about that, it depends on the version of basic we’re talking about. The versions I used, graphics wasn’t so easy.
But Graphics requires some knowledge of basic geometry. If you understand enough geometry, then packages, classes, and exceptions really aren’t really that difficult to understand either. There are plenty of simple graphics libraries for python.
Read and display lines from a file
BASIC version
Python version
I have not written idiomatic Python on purpose, just as close as possible to what is the plain BASIC version.
In the BASIC version, beyond copy-paste code, because it seldom works fine the first time, the child needs to understand
– Mapping of handles to files
– A file has an end
– Conditions
– Jumping around the code
– If something bad happens s/he gets a plain “file read error”
To be able to understand the Python code, the child also needs to understand:
– There is something called objects
– We write dot something on them
– What loops are, instead of plain goto jumps
– If something goes wrong s/he will get a scary stack trace
From my short teaching experience, I think the second version is more cognitive challenging for a child in terms of required concepts.
Regarding graphics, any child attending primary school, the ones I am targeting here, knows about basic geometry.
Hard to beat that.
Then again, teachers are using Scratch in some schools and Raspberry PI main language as school target is Python, so I may be completely wrong here, in what children can grasp.
BASIC.
Seriously, it is very good at what it is intended to do: teach you the basics of programming.
In terms of teaching Pascal is still a nice step up from BASIC.
Beyond that? Well, there’s a buttload of languages so take your pick.
I’d ask a similar question. What programming language is good to teach kids as a first one these days?
The article states that “line numbers helped emphasize the sequential nature of computer programs”
The way I see it, line numbers were primarily used as the only viable way to have some sort of interactive editing capability on a line-oriented I/O. Imagine you are churning away your BASIC code at a Teletype-style console, no screen, just a keyboard and a roll of dead trees – line numbers enable you to change any line simply by typing another with the same number. Forgot what line it was? Exec LIST and enjoy the music.
Once the real glass terminals and home computers hit the scene it indeed became less essential to tag each and every line with a number but it still helped since even those machine often did not have proper full-screen buffered editors, so line numbers needed to be explicitly stated.
It was as much a “UI” thing as a program control fixture.
Edited 2014-04-30 20:49 UTC
I learned programming with Basic on a TI-99/4A many years ago … and i got my passion for programming at this time … it had been never ever again that easy to dive into computer technologies …
I think “the spirit of BASIC” was perhaps not the language itself but rather that direct relationship with the machine you were programming. No modern alternative comes close – not even a BASIC interpreter installed on a modern day PC. You simply cannot _know_ your machine in such detail as it was common back then.
But this spirit seems to be very much alive in the “maker community”. Especially cheap 8-bit micro-controller boards, with simple Atmel or PIC CPUs are very much reminiscent of the early home computers. And programming, albeit usually with C/C++ cross-compilers is a lot like programming those home computers. You soon learn all the low-level stuff intimately. And since you usually don’t have the luxury of ready-made libraries you soon need to get to know algorithms, optimizations. You get a feel for what it takes a (much simpler) computer to actually _do_ something.
on my first computer – the Apple II. I, of course, progressed to Apple Pascal, Apple Fortran, Forth, & ORCA/M.
I still use a BASIC language today for many of my simple pro audio apps – PowerBASIC. I tried Visual BASIC when it came out, but PowerBASIC is miles better.
I own a Commodore 64 since 1984 or so, but I was 4 so I never really used it, except for some games. I started programming in GWBASIC on a 286.
Then I moved to “true” programming (as in “hobby”) in Pascal, C, C++, and now I work (as in “job”) with Java, Objective-C, C#, and SQL (not exactly a programming language, but you know, you need it).
I also have to use JS and PHP, but every time I use them I feel dirty…
Why???
There are way worse things to program in, ever tried ASP scripting?
Weird OO features, dynamic typing, weird syntax… you know, this sort of stuff.
No.
Because PHP is the single worst programming language ever invented?
Granted JS isn’t nearly as bad but it’s still a bit awkward and that’s not even going into how sucky it is to work with the DOM.
Funny, I really like PHP. Could never really get into ASP which seemed to over-complicate everything for me, and the less said about perl the better… Personally I’ve always loved dynamic typing and arrays, and the loose sort of programming they allow. It’s probably from doing a lot of ARexx programming in the past – PHP is remarkably similar in some ways now that I think about it!
BASIC was my first programming language, but when I discovered C I left it for good. I think BASIC is more or less like MS-DOS, it did much more harm than good to the computer industry. It’s not a real programming language, very difficult to maintain, very unclear, very error prone and not really educative…
It may have had a sense in a world of PC with very little memory and very slow processor, but has no sense at all in modern world.
Not a single good and/or serious piece of code has been written in BASIC
Programmed in QBasic: http://www.blackannex.net/
QBasic != BASIC
QBasic รขหห BASIC
I liked the รขหห operator! ๐
But I meant the real BASIC, with line numbers and GOTO 1010
Stating C > BASIC and C > QBasic > BASIC then:
(QBasic – BASIC) > ((C – BASIC) / 4 * 3)
If you consider “real” BASIC to be BASIC with line numbers then of course you probably can’t name any code written in it – it went out of fashion decades ago. Even slightly more modern versions of the language have been used to produce some fairly serious code, and are capable of using OS calls and objects which means they can take advantage of the host machine fully which can mean memory-heavy tasks.
I mentioned it up above, but the first version of Worms was written entirely in BASIC, and it’s a game that wasn’t to be sniffed at code-wise. Obviously nothing compared to a modern game, but for its time it held its own with any other language out there and spawned a huge franchise in the process.
Also http://en.wikipedia.org/wiki/Computer_Bismarck
…and it’s just one I stumbled on recently and had in browsing history, I’m sure there were many more.
Guess why it’s called BASIC…
I have to disagree with you. BASIC was never even intended to be a full-blown, complex language meant for high-quality apps; it was meant to be simple, “my first programming language(TM)” – style thing that made it easy for total novices to grasp the basics of what programming is about, and I think it did that job marvelously.
I know at least a few dozen people who picked up programming by getting to know BASIC, including myself. Had I had to have started with something more complex I probably would never have learned programming in the first place.
I simply cannot see how introducing people — especially the young un’s — to programming harmed the industry.
May be you’re right. Beginning with BASIC teaches you how to be very careful to avoid errors. But it’s more difficult than beginning with a structured language like Java.
The real problem, in my opinion, is that, once you learn with BASIC, you may end up with BASIC mindset, that may help if you code in assembler but not much if you migrate to structured and OO languages
That is a risk, but that can just as easily be mitigated by teaching what sort of thinking to avoid or to keep in mind while also teaching BASIC. Then it’ll be easier to migrate to more complex languages later on.
Me, I started out with BASIC, but I migrated simultaneously to both C and assembly from it, often doing some functions that required speed in assembly, compiling it with NASM to object-file and then linking it with the main-program done in C and compiled with DJGPP. Fun times. But as I said, trying to go with C or something straight-up would have been too overwhelming, learning BASIC was totally needed for me to get going.
WereCatf,
I started with GWBasic, and later QBasic, but only because they came with MS Dos. For me basic was not an essential stepping stone into programming, it just happened to be bundled with dos, (and commadore, etc) and became the defacto language to learn, but it could have easily been something else.
I progressed to Turbo Pascal. DJGPP, along with RHIDE, were awesome, I only wish I had learned about them earlier.
I find that a lot of the difficulties newbies have isn’t the language, but the IDE. So for example, while microsoft C had a very difficult learning curve, Turbo Pascal/C were about on par with qbasic (while being far more powerful) owing to borland’s turbo-vision based IDE.
What makes C difficult as a language specifically is it’s lack of string types/operators, obviously. But as far as the language syntax goes I personally never found basic any more intuitive or easier than C. I would have been happy to jump into C directly provided I had a decent IDE.
Edited 2014-05-02 15:32 UTC
That might be preferable to ending up with a Java mindset….
http://en.wikipedia.org/wiki/Computer_Bismarck written in BASIC.
I programmed in BASIC on a PC, on a PDP-11, and on a big iron 360 mainframe.
I could move around the code from one to the next with very little issues – as long as the source was in ASCII.
Also, BASIC in various forms was pretty much de facto available on any systems from that era.
In some cases, like the IBM PC, it was available in ROM and did not need an underlying operating system. WOW – Try that with any programming languages today!