Take the 2-minute tour ×
Programmers Stack Exchange is a question and answer site for professional programmers interested in conceptual questions about software development. It's 100% free, no registration required.

It is practically impossible to teach good programming to students that have had a prior exposure to BASIC: as potential programmers they are mentally mutilated beyond hope of regeneration

-- Edsger W. Dijkstra

I have deep respect to Dijkstra but I don't agree with everything he said/wrote. I disagree specially with this quote on linked paper wrote 35 years ago about the Dartmouth BASIC implementation.

Many of my coworkers or friends programmers started with BASIC, questions below have answers that indicate many programmers had their first experience on programming at BASIC. AFAIK many good programmers started at BASIC programming.

I'm not talking about Visual Basic or other "modern" dialects of BASIC running on machines full of resources. I'm talking about old times BASIC running on "toy" computer, that the programmer had to worry about saving small numbers that need not be calculated as a string to save a measly byte because the computer had only a few hundreds of them, or have to use computed goto for lack of a more powerful feature, and many other things which require the programmer to think much before doing something and forcing the programmer to be creative.

If you had experience with old time BASIC on a machine with limited resources (have in mind that a simple micro-controller today has much more resources than a computer in 1975, do you think that BASIC help your mind to find better solutions, to think like an engineer or BASIC drag you to dark side of programming and mutilated you mentally?

Is good to learn a programming language running on a computer full of resources where the novice programmer can do all wrong and the program runs without big problems? Or is it better to learn where the programmer can't go wrong?

What can you say about the BASIC have helped you to be a better/worse programmer?

Would you teach old BASIC running on a 2KB (virtual) machine to a coming programmer?

Sure, only exposure to BASIC is bad. Maybe you share my opinion that modern BASIC doesn't help too much because modern BASIC, as long other programming languages, gives facilities which allow the programmer doesn't think deeper.

Additional information: Why BASIC?

share|improve this question

closed as not constructive by ChrisF Jan 1 '12 at 21:39

As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance.If this question can be reworded to fit the rules in the help center, please edit the question.

6  
you realize that quote is something like 35 years old, right? –  MIA Sep 28 '10 at 4:04
2  
Yes. The link to Dijkstra has the publish date. –  bigown Sep 28 '10 at 4:12
3  
Maybe this question shouldn't be answered by younger people :-) –  bigown Sep 28 '10 at 14:00
7  
35 years old, and I'm pretty sure Eddie was trolling when he wrote it, too. I wouldn't read too much into it. –  Carson63000 Oct 5 '10 at 5:21
2  
This was just an attempt at academic humor (altough I like Tanenbaum's jokes a lot more). –  Jas Oct 22 '10 at 22:38

16 Answers 16

The Basics popular at the time of the quote were very different from what we had even 20 years ago. (Are you counting those among your "modern" dialects? ;)

Forget loops, subroutines, local variables, and everything that Structured Programming (of which Dijkstra and Knuth were big proponents) emphasized. You had GOTO, and you liked it.

In this context, programmers who only knew global variables, invented their own subroutines (using more global variables for parameters and return values!), and wrote spaghetti GOTOs really were mutilated.

If you're 30-something or younger today and Basic was your first language, it wasn't the same language Dijkstra was talking about. Even if you're older and your first Basic had some of these features, as Murph comments below, it still may not have been the same language Dijkstra was talking about.


You've updated the question with context I never knew before:

  • Dijkstra's quote is from 1975.

  • It wasn't until version 6 that you got separately compilable procedures — which, I believe, shows the beginning of the shift in focus away from GOTO.

  • "In 1976, Steve Garland added structured programming features to create Dartmouth SBASIC, a precompiler which produced version 6 output..." [Wikipedia] The context of the quote is clearly before what we now know as control structures, and many users of the time could've been more familiar with the second-to-latest version — i.e. two versions before Garland's, which is v5 and before separately compilable procedures.

  • GOSUB/RETURN still only handle "simple subroutines".

  • "Variable names were limited to A to Z, A0 to A9, B0 to B9, ..., Z0 to Z9, giving a maximum of 286 possible distinct variables." ...and they're all global.

share|improve this answer
2  
My first exposure was to BASIC (in 1979) - but paradoxically a dialect that had parameterised procedures and for which you could edit the code in an external text editor, though I did more stuff with less elegant version. When, in 1982, I was taught Structured Programming (and Pascal as an language to implement same) it was like the sun coming up in the morning... I last used a GOTO in a notionally "proper" language (DIBOL) in about 1990... –  Murph Sep 28 '10 at 6:29
1  
GOTO aka "massive random leap" - and I appreciate that the paper was not about the "what" but about the "how" which in turn is why he was wrong but it did make for a good headline grabbing generalisation. (If you look at, say, Fortran IV you didn't have much of a choice other than to use goto but, as my lecturers attempted to demonstrate - though foiled by introduction of Fortran 77 - you could write well structured code using gotos) –  Murph Sep 28 '10 at 11:44

A man can do nothing better than to eat and drink and find satisfaction in his work.

I learned BASIC before anything else (well, except for algebra I guess). If it didn't seriously warp my mind, then I'm not sure how to explain the 18 years that have followed...

That said, so what? Dijkstra might have a hard time teaching me anything because of my long-term exposure to BASIC, but he'd have a harder time teaching me anything because of his long-term exposure to a subterranean pine box. And even with those factors removed, I've still never been a serious CS student, a serious mathematics student, or a serious student in any other discipline. The abyss between someone like me and the sort of programmer Dijkstra would have liked to see is so great as to be nearly unfathomable...

And yet, we program. We who teethed on BASIC, toyed with FORTRAN, experimented with COBOL and all the rest, we also found a joy and a fascination with these little machines which, while perhaps entirely dissimilar from that which first drew Mr. Edsger into his field, is no less a calling, the foundation for a life-long labor of love.

...or maybe that's just what a mutilated mind would say...

share|improve this answer

It isn't BASIC which hurts you, it's the failure to expose yourself to other languages. Monoglot "programmers" aren't.

share|improve this answer
1  
absolutely correct –  RCProgramming Nov 16 '10 at 0:54

BASIC, from a structured point of view, was no worse than assembler or COBOL. Back then, there wasn't the plethora of Algol-descended languages we have now, Pascal being the first introduction most people had to reasonable control structures (and I'm not all that fond of Pascal control structures).

If BASIC was enough to permanently harm people, then other early languages were also, and so we wouldn't have had people unharmed enough to develop all the languages we use today.

It is possible that Dijkstra was then dealing with people who weren't good programmers and never would be, who learned to do some things in BASIC. That's the most charitable interpretation I can put on the statement.

share|improve this answer
1  
My understanding is Dijkstra singled out Basic here for a snappy quote and would have included other non-structured environments. –  Roger Pate Sep 28 '10 at 23:56
2  
Certainly Dijkstra may have been talking about BASIC to get a good sound bite. However, my point stands, which is that early computer languages were certainly no better, and that would imply that good programmers could not develop until about 1960, and anybody who started before was permanently damaged. –  David Thornley Sep 29 '10 at 13:56
3  
If you guys had taken the time to read the paper from which the quote was taken, you'd have discovered he also trashed other popular languages of that time besides BASIC. He also criticized the tendency to anthropomorphize computers, which I can understand; they hate that. –  Huperniketes Oct 15 '10 at 19:42
2  
@Huperniketes: Yes, but Dijkstra was unusually vituperative about BASIC and COBOL. He left the feeling that FORTRAN and PL/I weenies could be cured. –  David Thornley Oct 15 '10 at 20:32

I don´t agree with Dijkstra too. I thing that is more dificult to learn a second language because paradigms, not because is BASIC.

BASIC was my first language on a personal computer called TK (Sinclair like) in 1985. It was a very limited resource machine. In that time, I wrote a BASIC compiler from a book using a hexa-decimal editor for fun. I bought a Z80 book and learned 8bit machine language after that. BASIC helped me a lot with this.

After I learn C and Pascal and play with Assembly for 8080/6. MSX-BASIC, Quick Basic in MS-DOS times... VB, Delphi, some Java in Windows times...

Today a work with progress (4gl), .net (C#/VB), php and I don´t feel like a cyclops. :O)

share|improve this answer

I learned with BASIC on a TRS-80 and Apple II c/e, and consider myself a good programmer. The two traits that I personally think led to not being destroyed by learning BASIC first are

  1. I kept trying to learn better ways to accomplish what I wanted with less effort, which led to learning other languages and the features in those languages that make them powerful, and
  2. I ran into and recognized problems with BASIC as a language, most especially the lack of subroutines (although I didn't have the experience to concisely describe the problems that I do now).

I will admit that learning object-oriented programming after the pure procedural of BASIC was a struggle for a while, but I don't know if that was truly related to BASIC, as I'd learned a fair amount of C by then as well.

share|improve this answer

I started with basic on an apple clone when I was eight.

Even the later versions of basic that had some OOP ideas rolled in (qbasic, visual basic, etc) would not have made sense at Eight.

Starting programming that early is one of the reasons I can think through the problem in program flow and that is something way too many people cannot do well in this industry.

I think an early start is often beneficial and a VERY SIMPLE language is required when dealing with little ones.

Your mileage may vary...

share|improve this answer

BASIC's GOTO is a great way to teach the way of thinking in assembly language. It does not mutilate one's mind, it only brings one's mind further away from carbon-based synapses and closer to silicon-based transistors.

However, let's compare BASIC to LOGO. BASIC can turn young kids away from programming, because to write a simple fun program, all you could do is keep copy-typing a very, very long program printed on a magazine, whereas with LOGO a one-liner can draw very impressive graphics, which is essential in attracting kids.

share|improve this answer

I think the exposure to most BASIC examples in the world are what mutilate programmers' brains, not the language itself. It's like the C# programmer who browses MSDN and doesn't think exception handling is necessary or that IDisposable types don't really need to be disposed.

share|improve this answer

Anyone is going to have a problem if they can't identify the problems in their current language and not only be able to work around them, but find another one built to solve the problem.

And GOTO is only bad if you don't have line numbering ;)

share|improve this answer

Basic is good - it's fun and pretty simple It can do fun 2d graphics and what not ... I learned (or try to learn) that when i was around 10 or 12, it was a fun language that got me interested in learning more about computers ...

share|improve this answer

I am currently using BASIC to teach my son to write his own simple games. I never used it, I started my carrier with PowerBuilder and PowerScript and jumped over to C/C++ and then Delphi. Today, I use almost all languages available and I adapt very fast because the ground of all languages are the same, mathematical formulas with different signs, operators and symbols. That's also what I am teaching my son and because of that he can already read and explain C++ code. My son is 12 btw.

share|improve this answer

Some of the best programmers I know were exposed early on to programming in Basic. It's a bit more "concrete" and thus provides a better feel for how the low level machine might actually work than many newer languages (e.g. it's a closer HLL introduction to assembler).

Dijkstra's quote is from a time period when academics were trying to push a trend towards provably correct well structured programs designed from spec. But that's not the way the a large portion industry went. Instead, a lot of web 2.0 era programmers are trying to rapidly prototype something for which most of mathematically tight specification to prove code against does not exist, because things are evolving too rapidly for that spec to stay competitive.

Thus the hack-and-slash trial-and-error programming methods that programming in Basic sometimes encourages, when cleaned up a bit in methodology, is a useful primer to RAD thinking.

I will end by noting that there are at least 5 Basic interpreters available which run on the iPad, thus keeping the language available even on the newest devices.

share|improve this answer

I think, given that this quote is 35 years old, it has a lot to do with the lack of abstraction that was available in programming languages, and what was required for you to know to develop well, back when it was said.

Being given a language like BASIC teaches you little about how to program at a low level, something far more necessary in the past than now, and would give you the mistaken impression that programming was simpler than it really is.

I remember disctinctly trying to learn 'machine code' at the age of 15 after over 3 years of VZ200, C64 and Apple ][e BASIC, it was a rude wake up call.

These days, however, although I am a complete snob about these things, and you wil not find me working happily in any language with BASIC in the name (I tend to start yelling at the monitor phrases like 'stupid Fisher Price Language' as it, yet again, rejects my careless curly braces),I admit it is easier to do productive things with languages that abstract the mechanics of the CPU than it was 35 years back (or 25 years ago, in my own personal experience and example)

share|improve this answer

I started programming with GW-BASIC in the early 1990s. My mind didn't get mutilated. I moved on to better languages like Pascal, C, C++, Java, C#, and Python.

I wouldn't be able to write a BASIC program today; I've forgotten how to think in terms of line numbers. Not that that's a problem.

But my BASIC experience helped me a lot in my college Computer Architecture course where I had to learn assembly language (MIPS). Assembly language control flow is a lot like BASIC's: Jumps = GOTO, branches = IF...GOTO, jal (call)...jr (ret) = GOSUB...RETURN. That's all the control flow you need!

Is good to learn a programming language running on a computer full of resources where the novice programmer can do all wrong and the program runs without big problems? Or is it better to learn where the programmer can't go wrong?

I'd say that it's better to learn on a computer with limited resources. Not because "the programmer can't go wrong" but because the "coolness" threshold is a lot lower. A newbie programmer might not know how to make a great first person shooter for their PC. But they could write a great Pac Man game for their TI-89 and use the hardware to its full potential. And that's a feeling of power.

share|improve this answer

for those of us who were loading assembly code into Speer Micro-LINC computers one byte at a time via a set of 8 switches on the front panel and storing them on PDP tapes back in 1972 I will assert unequivocally that Dijkstra was a pompous twit. Everything he despised about Basic was true in spades about the assembler I was working with and yet myself and thousands of other people recovered from our exposure to assembler and later Basic and Fortran and Cobol and C etc.

share|improve this answer

Not the answer you're looking for? Browse other questions tagged or ask your own question.