When I was little, back in post-Soviet Russia (circa early 1990's), the prevailing progression of a developer was "learn BASIC, learn Pascal, then learn C". And, if you were extra badass, you'd learn assembly. BASIC was the first step, simple and easily accessible on most computers of the day (ZX Spectrum, MSX, Atari, GWBasic/QBasic on MS-DOS).
Best of all, being an interpreted language meant that you often had the source available to tinker with--"open source" of sorts. I remember tweaking GORILLA.BAS when I was 12, altering colors, inserting extra screens and text and silly stuff like that.
I think there's a whole generation that grew up on BASIC. I wonder what today's generation growing up on?
So much of this! I remember the older kids talking about Pascal (they were using TurboPascal at the time) and to me it was some mystical, highly-advanced form of magic, a sort of "more complex" BASIC. However, I never actually learned Pascal or used it, because I jumped directly from BASIC to C (actually ended up doing both for a while). The reason I even found out about C, was because I asked my computer teacher in junior high how people made games, and she told me that it was a language called C. So that summer I got myself an ANSI C book and started teaching myself C.
It was very difficult at first but I slowly got the hang of it. By junior year of high school we were doing C++, and having done C it was really easy for me to switch to C++.
In my experience this is the common question amongst everybody (myself included) that started programming young. Some adult somewhere (how sad that I don't remember) took me seriously enough and gave me some books so I started writing in C, BASIC, and assembly and I was too stupid to realise that it was supposed to be too hard for a 9 year old.
Today (as in literally this moment in time) I am still writing C for games.
i taught myself c by prototyping programs in qbasic and then translating them as straightforwardly as possible. qbasic also had an absolutely brilliant integrated help system; that's one of the things i've always admired microsoft for.
I started in the mid-late 80s at 4-5 years old, first BASIC and then straight to assembly. I think my first full game in assembly (which was pretty simple) I made it at around 9 years of age. 6502 assembly is very easy, you just really needed a good book, or a patient parent, and you were sent. The machine was grokkable.
To be fair this approach has many merits with the computers of the time. My main machines were a Commodore 64 (8-bit) and then the Amiga (16 bit models that were very popular by 1988~1991, although the later Amigas are 32-bit). Lots of people followed this progression.
At the time many of us saw programming as a more advanced, "cooler" activity than just playing. It was admired in the nerdy circles that you came up with some clever routine in assembly that did something seemingly impossible for the machine.
I think the form of BASIC that came with the Commodore 128 is ideal for kids to learn. It even came with an asm monitor runnable directly from the BASIC prompt.
If I have kids I think I will teach them this way, it's so effective.
When I worked with high schoolers I liked to introduce them to python. The documentation, IMO, is clearly written and easily understood by programming novices. It's got OO, imperative and (limited) functional paradigms available. Graphics are fairly straightforward, for example the built in turtle graphics library. With IDLE it has a good, free, crossplatform IDE that's simple enough to not overwhelm new programmers, but provides every feature you really need. The REPL lets new programmers quickly explore different parts of the language and their programs. And for sticking with primarily imperative code (here I mean that the programmer isn't designing new objects, though they may be making use of existing ones), the syntax is ludicrously straightforward once they get past the mandatory whitespace and spaces versus tabs.
I am 21, and when I was 12 I started coding with TI-BASIC, which is a (terrible, terrible) flavor of BASIC that comes on most TI graphing calculators. Most kids still have these calculators, so I imagine there are several learning on it.
OTOH, thanks to those graphical calculators a number of those kids will jump straight to Z80 assembly to unlock the true power of their hardware. I still think this is one of the best programming tutorials I've ever read, since it managed to make assembly look easy:
I had no trouble understanding pointers when I had a go at learning C++ later (although I'm sure the experience has left a number of other bad coding habits).
Do you think a graphing calculator is worth bothering with at all? I'm too old to have used one in school. The cynical side of me thinks that they only exist because they have a captive audience of school kids who are required to buy them.
I have found that the TI-83 series handles numbers remarkably better than many programming languages and even software packages. The built-in functions are diverse, composable, and very powerful, yet simultaneously simple to use. When I want to answer e.g., a statistics question, it's a huge time saver to plug it into the graphing calculator rather than anything else. I often prefer it even to WolframAlpha. In that respect it's well worth the $100 or so it cost.
Immediately HTML+Javascript comes to mind, as a language interpreter that every kid's computer comes with.
I would guess that is the top "first language" for kids today, with things like C#, Python, Ruby, PHP and Java somewhere in 2nd place (as popular server side and classoom languages).
Which means, by extension, many of today's JavaScript frameworks are the VisualBASIC of this generation: frameworks that let you use a "child's" language for grown-up work. The reactions to using JavaScript for real applications exactly parallels what people thought about VB when it came out.
Javascript is so basic (pun intended), it's not even considered a real language. Someone who tweaks Wordpress templates wouldn't consider himself a programmer.
What hooked me on BASIC was the graphic capabilities. It was relatively easy to create dumb little graphic programs: circles that changed colors and grew, etc.
Unless you ended up using a Commodore 64 or one of its ancestors which was completely sprite-oriented and thus not much good for canvas-type programming. I've often thought my life might have been different if I had asked my parents to get me a Sinclair spectrum instead of relying on the fact that our school had Commodore computers to push them towards a Vic-20.
Sprites? Luxury! We went to bed hungry dreaming of a linear framebuffer while seven angry pixels fought viciously over a single colour bit, keeping us awake. On an Apple ][, that is.
>> I wonder what today's generation growing up on?
My kids are growing up on the same old 8-bit machines that I grew up on. After all: those old 8-bit machines still work just fine for the task of learning to write code.
Any reason not to still use old 8-bit machines to learn programming? I can't think of a single one.
There was even a BASIC tailored for the Herculese graphics card (720x348 1 bit per pixel) which I used for simple fractals and other graphics noodling.
>> "I think there's a whole generation that grew up on BASIC. I wonder what today's generation growing up on?"
About 6 years ago when I was in high school we were using...Pascal! During that time I actually did some work experience with Borland (creators of Turbo Pascal) and they found it hilarious we were still using it.
VB6 and Pascal chiming in here, too. I think I dropped that course after a while - I was doing it via distance education because my school didn't offer any programming classes. This was some time around 2008-9.
It was BASIC and assembly initially, on the zx spectrum (at a friend's). A gentleman introduced me to BASIC and showed me a loop with an "I = I + 1" which made me argue with him about how that cannot be true :) .... and then I suffered the permanent imperative head damage before waking up many years later.
Though the beginnig was with a blow to the head, I did enjoy the immediacy of BASIC.
I too started with Basic. First steps on the Acorn Electron, then got an MSX and finally switched to a PC and used Q(uick)Basic. My ambitions ran ahead of my capabilities. Being fascinated by operating systems (I vividly remember tinkering with OS/2, Windows 95 Beta, DesqView/X, Linux 1.1.18) I wanted to write one on my own. The main aim was to have that magical thing called multitasking. I wrote a "kernel" in QBasic. Upon starting a new "process" it would:
- read in the text file of the new process, which was a specially programmed QBasic program that included predefined hooks to facilitate preemptive multitasking and that was capable of saving and loading its state (i.e. values of all variables).
- merge this text file with the text files of all other running processes, including the "kernel", and saving the new "system image" to disk.
- call the "save state" of all running processes
- exit from QBasic by running a batch file that would restart QBasic with the new system image, which would initiate by calling the "load state" of all processes.
It kind of worked :-) Such a pity I lost that code...
Same, though lots of us wanted to skip Pascal and C. :-)
It's a strange language to celebrate in retrospect in that it lacks the street cred of both academics and hard core engineers. To your point, in a sense it's like remembering your first bike.
Of course the first mechanic of that first bike made his way to the Dartmouth presidency.
Yeah, similar experience here, but when every web browser (to some approximation) includes Javascript, you can hardly say that programming is inaccessible.
In most every possible way (except possibly writing files), Javascript simply wipes the floor with Basic.
It's highly available but not accessible, ie immediately graspable by a new user. For example, most tutorials take the view that before you can write any JS you first have to know (or learn about) creating a basic web page. Of course, this is quite often what people want to do, but on the other hand they might be better off using node.js or some other hosted interpreter like http://math.chapman.edu/~jipsen/js/
I think there's a lot of value in letting people approach programming through doing very simple stuff such as automating calculations. Of course a potential downside to that, which was a big problem for Basic, is that this can get in the way of learning about program structure early on and encourages spaghetti code.
Except the cost, no replacements for those cheap 8-bits such as the ZX-81, Vic 20, or Atari 400. Computer programming is less accessible than in the late 70's and early 80's.
Codeacademy seems to be the way most of my friends are getting into programming. Since you code in a sort of virtual browser, there is almost zero barrier to entry. I have seen only one person go from this to real professional programming (out of ~20), so I do not know if it really is more accessible in the ways that count, but it has been an interesting trend anyway.
Android tablets? They are cheaper than the 8-bit micros of the 70s and 80s, outselling everything, and come with Javascript. The only problem is they don't usually come with much of a proper keyboard + text editor for editing code. So, a kid still has to take some initiative to get a bit of software before being able to actually code something. (Kind of lame, I hope that changes - it was nice being a kid when computers were programmable out of the box without requiring anything extra. Then again, we didn't have the internet back then, so getting new stuff into the computer wasn't as simple.)
You know what's also cheaper than an 8-bit in the 80s? Full computers today. The cheapest Windows machines, desktop or laptop, are about $300–400, from Dell, for example. In 1984, a Commodore 64 was about $200, or $450 if you include one disk drive. But with inflation, that's $451 and $1016 respectively in today's dollars.
But you could get a ZX81 for only $25, which is $56 in today's dollars. But that's about the price of a Raspberry Pi.
I don't buy the inflation argument because low income parent aren't going to spend the $400 where $100 was doable. Plus, we've spent decades telling everyone computers get cheaper every year which is bull.
I could get a ZX81 and Atari 400 in retail stores, the average non-tech parent has no hope of ordering a Raspberry Pi.
"we've spent decades telling everyone computers get cheaper every year which is bull."
What? The above post just discredited that. Remember, you have to factor in inflation and equivalent purchasing power.
The fact about ordering a Raspberry Pi is more about distribution than price.
If you want to look at ZX81 equivalents, you have extremely cheap Android-powered devices. In my country (3rd world) you can get an awful Android tablet for U$ 50 (your ZX81 equivalent). Not to mention EVERY school-age child in my country owns a computer (because we bought into OLPC).
I agree that it's harder to learn programming on a tablet than on a ZX81 (which cheated by not including a display).
If you count a computer with no displa as an equivalent, you can buy a refurbished tower with no monitor for U$ 50 (and they are sold in stores here).
"Remember, you have to factor in inflation and equivalent purchasing power."
When people talk about computers getting cheaper, particularly the car comparison that Bill Gates made, they don't factor in either. Low income families in 80s could come up with $100 easier than they can come up with $600 now. Non-techincal parent don't buy their kids refurbished and have no hope of getting a Raspberry Pi in a condition that their kids can learn to program on. OLPC is a government partnership program that has not been generally available in the US except as a 2 for 1.
I starting learning how to write code in '91 (I was 10). My first language was LOGO, but after that I started learning BASIC. I remember trying to find any sort of books I could from the library, that talked about BASIC. It was tough going. I didn't have access to the internet (much less knew what it was). So I had to make do with these books that were often for different dialects of BASIC.
In those days I was enamored with graphics and the idea of creating games, and it was dead simple to do simple graphics in BASIC.
Although I haven't written any code in BASIC in over 10-12 years, it still holds a special place in my heart since it was the language that I used to realize my passion for programming and computers in general. I most definitely wouldn't be where I am today, if it wasn't for BASIC (and QBASIC).
I'll never forget standing in a K/Wal Mart when I was about 12 years old, standing in front of a Commodore 64. My older brother showed me a simple program that he typed in:
There were a number of epic one-liners similar to the above. If anyone is interested in the phenomenon, you can read our book 10 PRINT CHR$(205.5+RND(1));:GOTO 10 which we give away free at [1] and has LOTS and LOTS of details about the history of BASIC.
Thinking back on BASIC, what stands out most to me are the line numbers. At the time, I never understood the point; I mean, sure, you needed them for GOTO and GOSUB. But it just seemed like so much labor. And, of course, why not labels, names for subroutines? Other languages had them.
But when you think back on how assembly looked and worked at the time, you realize that the line numbers are sort of analogous to addresses in memory. If you were on a 6502, you might JMP to a point in memory. You'd do the same in BASIC, except instead of a point in memory, it was an arbitrary number you used for the line.
So, weirdly, my thoughts on BASIC today is not that it was really BASIC. Not even that it was necessarily a great beginner language, though some people treated it that way. It was an easier shorthand for assembly.
> Thinking back on BASIC, what stands out most to me are the line numbers.
Because in most computers at the time, you didn't have an editor that could edit an entire source file. I remember writing BASIC on a TRS-80 and an Apple IIe. Those just had line editors.
Line numbers let you identify which line in the program you want to edit. Typing in:
20 PRINT "HI"
meant, "replace line 20 with that".
You spaced out your numbers (usually multiples of ten) so that you had some available numbers if you need to insert some code between two lines. If that got crowded, typing in "RENUM" would renumber all of your lines and neatly space them out again.
At a child, I remember thinking RENUM was the most magically complex algorithm I could imagine.
I both agree and disagree with you. The sticky point is "at the time." BASIC came out in 1964, and other programming languages, like Fortran, COBOL, Lisp, and Algol, didn't need line numbers for each line.
I suspect it had something to do with the display technology. Fortran and COBOL were designed with punch cards in mind. Lisp and Algol were designed for research computer scientists; I don't know what they used for I/O or hardware, but I suspect it was significantly more advanced than the line printers that Dartmouth students used.
I think this helped make BASIC a good match as the first micro language a decade later where, as you say, most of those computers couldn't handle functionality beyond a line editor.
I remember putting off RENUM as long as possible, because it forced me to re-learn where all of the useful GOTO/GOSUB targets were located.
My first approach to programming was Sinclair BASIC of a ZX Spectrum +3 . I learn soem stuff with a books of "BASIC for childrens", and the ZX spectrum +3 manual.
I remember doing a program to study multiplication tables, printing it, and then asking me for the values... Good old times.
Funny how people perceive programming as way more advanced than multiplication, but you could write this program before you memorized the multiplication tables.
I think the sequence of topics in math education is really wrong. Another example: in the USA, "discrete math" is a college class at the same level as calculus (or higher!), even though it mostly builds off elementary algebra.
I learned symbolic differentiation by reading a book about Prolog that used some of the rules as an example and translating it into Pascal (I didn't have a Prolog interpreter) and then adding additional rules from my maths textbook. I then figured out operator precedence parsing because I got annoyed at having to manually translate the math to something the rules engine could handle.
To this day, my preferred way of understanding maths is by looking at implementations of the algorithms - I find mathematical notation and every maths textbook I've seen to be extremely tedious and overcomplicated compared to code (of course with the caveat that at least some of this is because I've spent far more time learning to understand programming, though I still found that route easier when I was in school)
Mine was on the 48k Spectrum, a lovely machine, even though the BASIC was a little non-standard, and I had to work out how to change listings in magazines to work on it!
My progression went: Spectrum BASIC, Z80 assembler, x86 assembler, C, Java .. more.
I'm currently reading "The Dream Machine"[1] and coincidentally at the point where BASIC is being invented. What I found interesting is how closely linked LISP and BASIC are in motivation and the spirit of the era. Not to mention the direct connection of Dartmouth, McCarthy, and time sharing.
My first programming experience was with BASIC running on a GE time-sharing system in 1971. We worked on teletype machines and used paper tape to store and load programs. I remember that the user manual was fairly small and reasonably helpful. Performance wasn't too bad late at night when the folks who used the GE machine had gone home.
I think John Kemeny, co-inventor of BASIC, was a pretty interesting guy. He worked with computers under Feynman during the Manhattan Project. He argued for widespread computer literacy in the mid-1960's. He's worth reading about, for sure.
I happened into a copy of Kemeny's book "Man and the Computer" (http://www.amazon.com/Man-Computer-John-Kemeny/dp/0684130432) sometime around 90-91, and it fascinated me. I've gone back and read it since and, while many of Kemeney's predictions didn't hold up, the tone of the book is definitely inspiring.
Started coding at the age of 10 with ZX Spectrum BASIC, followed by a little of Z80 then again GW-Basic, Turbo Basic, and then lost count how many programming languages I have learned and used ever since.
BASIC has been rather remarkable for it adaptability. Microsoft's Visual Basic, for instance, has managed to become a rather modern object-oriented typed language. As much flack as it gets from "real" programmers, probably more code is still written in VB than most other languages combined (although that is certainly starting to change now with the rise of open source scripting languages as well as the rise of Javascript.)
Read a statistic once that the language with the most lines of code written in it was probably Excel's version(s) of BASIC. Not sure when that was or how reliable.
There's a PDF there of Programming The PET/CBM, by Raeto West. I loved that book - read it from cover to cover, drained it of all its knowledge. I can still tell you random things about the CBM-8032's memory map and ROM code, twenty five years after the last time I touched one.
I looked up Ray West recently, wondering if he's still alive. Turned out he was until recently, but he'd turned into a mad, racist, tinfoil-hat-wearing crackpot, paranoid about Jewish conspiracies and government hoaxes. Fluoride, fake moon landings, the whole nine yards. So sad. That guy was my hero, and he just went off the rails and, as far as I could ever find, completely disappeared.
ETA: nope, he's still around, and still antisemitic. Ah well.
I spent countless wonderful evenings typing in code from Creative Computing, inCider, and Nibble. It seemed perfectly reasonable to spend a week typing and debugging to be able to play an little text adventure game.
Learned BASIC in 1973, first computer class at my high school. Pascal, FORTRAN, and COBOL in college. Started working at IBM in 1978. "High level languages are for wimps". Assembly all the way baby!
Best of all, being an interpreted language meant that you often had the source available to tinker with--"open source" of sorts. I remember tweaking GORILLA.BAS when I was 12, altering colors, inserting extra screens and text and silly stuff like that.
I think there's a whole generation that grew up on BASIC. I wonder what today's generation growing up on?