Slashdot Mirror


The Value of BASIC As a First Programming Language

Mirk writes "Computer-science legend Edsger W. Dijkstra famously wrote: '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.' The Reinvigorated Programmer argues that the world is full of excellent programmers who cut their teeth on BASIC, and suggests it could even be because they started out with BASIC."

49 of 548 comments (clear)

  1. Good programmers aren't easily ruined by syousef · · Score: 5, Insightful

    A good programmer has experienced many languages and done things in many ways. A good programmer has compared all these various experiences and understands the advantages and disadvantages of each language and programming technique. A good programmer doesn't get bogged down in line numbers and GOTO statements and never move beyond that. If someone does get bogged down they never had the attitude to be a good programmer.

    --
    These posts express my own personal views, not those of my employer
    1. Re:Good programmers aren't easily ruined by Interoperable · · Score: 4, Interesting

      I learned in Fortran (I should qualify this by pointing out that I'm not a particularly good programmer) but it seems to me that writing logical code that uses GOTO statements would be a good introduction to computer logic. A complex program may become unreadable, but as a learning tool I could see that it might have merit. Good coding is about understanding logical procedure (and comments).

      --
      So if this is the future...where's my jet pack?
    2. Re:Good programmers aren't easily ruined by jpmorgan · · Score: 4, Informative

      Indeed. Dijkstra was frequently wrong, especially when he made grand sweeping statements.

      GOTO is a good example, 'GOTO considered harmful' is practically biblical law amongst many programmers, but it's worth remembering that he made that statement in the context of an argument with Donald Knuth. Knuth won: (http://pplab.snu.ac.kr/courses/adv_pl05/papers/p261-knuth.pdf)

    3. Re:Good programmers aren't easily ruined by Dahamma · · Score: 3, Insightful

      Absolutely. It was drummed into me (and apparently most coworkers), and I can't believe how liberating it is once you realize, yes, in appropriate contexts "goto" can result in code (especially in error handling cases) that is both more readable and more efficient. Dogma is rarely the answer.

    4. Re:Good programmers aren't easily ruined by syousef · · Score: 4, Insightful

      The irony is that under the covers, it's all done with jump instructions anyway.

      --
      These posts express my own personal views, not those of my employer
    5. Re:Good programmers aren't easily ruined by erroneus · · Score: 3, Interesting

      I too started out with a range of BASIC varieties. I coded on Commodore PET and 64, AppleII and Color Computer and all sorts of thing like those. I then moved on to Assembly language for Motorola processors. Those two language experiences have the lacking of something in common -- functions; creating them, linking to libraries and all that. This meant I learned to do it ALL myself, whatever it was, and my code wasn't all that portable except for copy, rename and modify to suit. Everything was GOTO, GOSUB, JMP and JSR.

      I also worked/played with Basic09, which was BASIC for Microware's OS-9. It was a bit more modern where it presented me with data types, functions and no line numbers. From there I grew into C.

      As far as beginning programming is concerned, I think there is value in learning to make the machine do things very explicitly at first. Old style BASIC and even Assembler provide that experience. People tend to have a black-box mentality with everything they do and care little about what is actually going on within the black box. Having worked with languages without libraries and needed to do everything myself gave me some appreciation and insight into the black boxes we use in other languages. I tend to think these are pretty important insights especially when the black boxes don't do exactly what we need them to do.

      And one other thing -- memory management. That simply isn't a topic on anyone's mind in programming these days. It was when I started. Request memory, release memory. Many of the machines I started on were limited to 64K! It was a primary concern. These days, people waste memory as if it were unlimited. Memory leaks are signs of either bad/sloppy coding or bad/sloppy black boxes. Either way, the further people distance themselves from how the machine actually works, the worse programming becomes in some respects.

      This leads me to object oriented coding. Jeez what a mess that is. I grew up procedural and it is hard for me to think any other way. But then again, that's how computers actually work in the first place. Object oriented programming merely distances people from the machines and prevents newbies from appreciating how the machines really work. And the idea of mixing "data" and "executable code"??? Really? Damn. Sounds like injectable code execution exploits to me. When I started, we knew to keep those two things separate from the very beginning. Object orientation mixes them up and probably does more to lead to exploitable code than anything else.

      I guess as I grew up coding, being aware of boundaries and limits, input validation and all manner of things like that (which were a lot more necessary in old BASIC and Assembler due to their lacking of advanced data typing) became first nature in programming. These days, people pay little if any attention to these details. And so every time I rant about sloppy or bad programming habits leading to very exploitable code, I am coming from a history of growing up under the notion of being aware of where and how memory is being used, testing and limiting the input and output, ensuring that infinite loops don't happen and all manner of things like this. Then people respond with "...you just don't understand! no one has time or energy to waste on that stuff!"

      For me, it's unimaginable to write code without checking itself at every turn... this was probably the most important thing I took away from my earliest programming experiences.

    6. Re:Good programmers aren't easily ruined by pedestrian+crossing · · Score: 4, Insightful

      I also started in Fortran and by the time I got through my second semester, I had an epiphany - highly structured code is very important if you are going to maintainably do anything of significant complexity. I don't think the language matters so much, once you get to a certain point you realize that you have to modularize your code if you are going to create anything beyond a simple classroom assignment. Languages like BASIC and PERL are great introductions for beginners because they are interpreted and present a low barrier to entry. The focus can be on basic programming concepts and they provide instant gratification. That said, if one is to go further and "become a programmer", you have to understand the need for structure, typing, scope etc. and take things to the next level. If you have the aptitude to be a good programmer, this will become clear to you as you take on more complex tasks. If you don't have the aptitude, well, you are going to be a shitty programmer no matter what language you started with. GOTO in a high-level language is bad in that it is a crutch that is tempting for the beginner to reach for, and overuse makes code difficult to maintain. Making a rule of avoiding it forces you to think through your flow/structure/logic.

      --
      A house divided against itself cannot stand.
    7. Re:Good programmers aren't easily ruined by AVee · · Score: 4, Informative

      If, and only if, you're programming in a language which doesn't provide any constructs to do error handling. Dijkstra was right, goto's are a bad idea and should not exist in a language. Knuth was right, in the absence of something replacing goto you're better of using it then not using (if done properly).

      All of that discussion is passed us now, most of us have been writing software without using goto for the last two decades, goto has been replaced with try/catch constructs, labeled breaks, switch statements etc. None of the examples Knuth provides in that paper are still relevant in any modern language. By that measure, Dijkstra won.

      It's not surprising either, Dijkstra was always in utopia, talking about how things would be if he build the world himself (which doesn't mean he's wrong). Knuth has always been about how to deal with the current reality (including the state of programming languages), and not so much about changing that reality.

    8. Re:Good programmers aren't easily ruined by bluescreenbert · · Score: 3, Insightful

      And the idea of mixing "data" and "executable code"??? Really? Damn. Sounds like injectable code execution exploits to me. When I started, we knew to keep those two things separate from the very beginning. Object orientation mixes them up and probably does more to lead to exploitable code than anything else.

      Your post pretty much proves Dijkstra's point. You did not manage to lay off your old thinking habits. You do not bother to think how an object oriented compiler works and to me it sounds that you are stuck in 80's style programming. For your information, object orientation does not mix up data and code. It merely gives the programmer a paradigm to access data. Code is related to classes, data is related to objects.

    9. Re:Good programmers aren't easily ruined by RDW · · Score: 4, Funny

      "Your post pretty much proves Dijkstra's point. You did not manage to lay off your old thinking habits. You do not bother to think how an object oriented compiler works and to me it sounds that you are stuck in 80's style programming."

      'Object-oriented programming is an exceptionally bad idea which could only have originated in California.' - Dijkstra

    10. Re:Good programmers aren't easily ruined by wileypob · · Score: 3, Insightful

      First you complain about people not understanding how machines actually work, then you make it perfectly clear you've no idea how object oriented languages are implemented. In C++, code still goes in .text sections, and data is still on the heap (or possibly .data or .rodata), so the mixing of code and data is an abstraction.

      "Object orientation mixes them up and probably does more to lead to exploitable code than anything else."
      Wow, what BS.

      BTW, I also grew up in the 80's on microcomputer ROM BASICs, and while I had unlearn bad habits when I went to real languages, I did learn a lot about how to solve problems.

    11. Re:Good programmers aren't easily ruined by AVee · · Score: 3, Insightful

      receive(id, val)
      previousId = id
      previousVal = val
      beforeEOF = true
      while (beforeEOF)
          beforeEOF = receive(id, val)
          if(not beforeEOF || id <> previousID)
              output previousId, previousVal
          else
              previousId = id
              previousVal = val
          end if
      end while

  2. Fuck him. by OrangeCatholic · · Score: 4, Informative

    I was on Basic from 1986 to 1993, and it was the most meaningful years of my life.

  3. Simplicity by azgard · · Score: 4, Informative

    There's something to it. I recently downloaded a ZX Spectrum+ manual from worldofspectrum.org (the colorful one), and was amazed by how simple the language is. The complete reference takes like 10 pages? And it can draw lines and circles..

    Now compare it with any modern language, such as Java or Python. The language description itself takes 10x more than that, and the libraries available are vast. I am not arguing it's a bad thing; I am just arguing that simplicity may be a key here.

  4. Re:Second story from this blog this week... by gibbled · · Score: 5, Funny

    Clearly there's something fishy going on there...

  5. Funny argument by phantomfive · · Score: 4, Insightful

    His argument is kind of funny. He says people who've learned in BASIC have learned what NOT to do when programming. I have to admit he has a point....I learned exactly why spaghetti code was a bad idea after doing it for a couple years. Some people think they know what spaghetti code is, but unless they've written code with line numbers, they probably don't.

    --
    Qxe4
    1. Re:Funny argument by phantomfive · · Score: 3, Interesting

      That is totally true, I remember the first time I saw structured programming, it was something simple, just an easy way to print a list of items on the screen, and it was literally a feeling of the joy of discovery. I got addicted and started thinking up my own ways to structure code.

      Compare that to the guy I met when I was tutoring CS, who said, "functions, why do I have to use functions to write this program? I know how to use functions, it's such a waste of time." The idiot could have finished the program in the time he spent complaining about it, but he certainly did not feel the joy of discovery.

      --
      Qxe4
  6. BASIC is great for kids by VirtualUK · · Score: 4, Insightful

    I disagree with the premise that BASIC teaches bad habits. I stick with the old adage a bad workman blames his tools. BASIC teaches kids (like I was over 30 years ago) from the ages of 5-6 how to put together simple logic, and gives them the very basics of languages constructs like variables, loops, sub routines, etc. without them having to grasp structures, classes, polymorphism, OO, etc. that a lot of grown ups that have been involved with writing code for quite some time can have issues with.

    1. Re:BASIC is great for kids by phantomfive · · Score: 3, Informative

      If you had read the article, you would know that you had just written a fairly decent summary of the author's main point.

      --
      Qxe4
    2. Re:BASIC is great for kids by Anonymous Coward · · Score: 3, Insightful

      I maintain that Python can do this much more easily due to the fact that there are simply fewer ridiculous syntax requirements in a simpler to read format. The things you learn in BASIC can be taught at a much more significant level in Python (inline AND block comments, order of instructions, basic control structures, variables and their use) without jumping through the hoops that you will in BASIC. Python's use of whitespace and extensibility allow beginners with an aptitude to expand on their knowledge easily by making simple inferences about how some control structures work (Python has an excellent for loop implementation) .

      Python does not require classes, can be used as an imperative language, and can provide subroutines in the form of other functions easily simply be defining it in the environment (which is not a difficult concept to grasp, "the computer needs to be told that it can use it" will suffice for beginners which is true enough).

      Basically, Python can provide all the same benefits as BASIC without the stupid unnecessary crap (Explicit Line numbers? Really? Are we still using punch cards?) that always annoyed me.

      I will give BASIC one thing - it's basic geometric drawing library was really easy to use. Problem is, we NEVER USED IT except as a "hey, so this is how you use it, now we're never going to talk about it again." Might as well have learned LOGO (which I had taken as well, turtles were awesome and provided a good intro to iteration even if it was never described as such in class.)

  7. Re:BASIC is irrelevant by black3d · · Score: 5, Insightful

    Not recognising the relevance of BASIC as described in the article, it's possible you're around a decade or two younger than the individuals the article is referring to.

    --
    "The true measure of a person is how they act when they know they won't get caught." - DSRilk
  8. Appreciate the difference by Katatsumuri · · Score: 5, Insightful

    As a programmer who started with old-school BASIC (numbered lines, etc), I was overjoyed with better elements of structured programming in Turbo Basic, and totally excited with C when I learned it. It felt like having my hands untied. So I would state the contrary: you cannot fully appreciate the structured programming unless you went through the GOTO hell.

    I hear a lot of similar FUD from some people, like "you can't grok OOP if you started with C", or "anyone who touched .NET or Java is lost for C++..." It boils down to "people are idiots, they can't possibly learn anything new, they are either indoctrinated at birth in My True Way, or lost and hopeless." Who in their right mind would take that seriously?

    1. Re:Appreciate the difference by dkf · · Score: 3, Interesting

      It boils down to "people are idiots, they can't possibly learn anything new, they are either indoctrinated at birth in My True Way, or lost and hopeless." Who in their right mind would take that seriously?

      That quote reminds me of a number of religions who have exactly that attitude. Makes me suspect that it must be a recurrent (though no less foolish) theme to human thought...

      --
      "Little does he know, but there is no 'I' in 'Idiot'!"
  9. Variety by RenHoek · · Score: 4, Interesting

    I've gone from MSX Basic to Turbo Basic to Turbo C. Now I can code in all kinds of languages, assembly, PHP, Ruby, Javascript, etc..

    I do think that BASIC has value as a first language because it gives back results immediately. Sure, nowadays there are other script languages, so you don't have to go through compiling and all the other complexity. BASIC is valuable because it's just that: basic. You don't have to worry as a first-timer about libraries, include files, functions and everything else. You get down to the very basics like variables and program flow.

    And after a lot of years of BASIC programming I knew the limitations of the language (which largely depends on the interpreter). That's when I switched over to Turbo C. And to be honest it didn't took me long at all to learn C because I was a pretty reasonable BASIC programmer.

    What I _do_ object against is stuff like Visual Basic. That's taking a limited language which is simple and jamming it into a place where it shouldn't belong. To let Visual Basic work, they stuffed all kinds of non-original basic stuff in there which make it more complex then something like Visual C. Their idea was "lets make making real application easy with Basic, because Basic is easy right?". It doesn't work like that.

    I also think that Java is not a language that people should start programming in to be honest. Object oriented programming is NOT something people should learn before they had a taste of procedural programming. Fun fact. I went back to my old school to see about taking some night classes to get my CS degree. (I dropped out at the time and I've learned a LOT more on the job then what they were teaching.) At their open house classes I asked about procedural programming and if they still taught it. They scoffed and said nobody uses that anymore. This when I've been a Linux kernel developer for 10+ years now which is 100% procedural ANSI C. It's all Java they teach nowadays.

    In closing. I think a good programmer is somebody who explores. If I have a Windows application that does something cool, I take it through a disassembler to see what makes it tick. I look up DOT NET C# code snippets to see what it's all about. I look through COBOL and ALGOL source code to see what constructs people used in the past. I patch ARM assembly code to fix bugs. I do all those things and not rigidly stick to a single programming environment. A good programmer is a state of mind, not the language he works in.

  10. Re:BASIC is irrelevant by ipquickly · · Score: 3, Interesting

    just great, more sushi, I should block images from that site

    I started with Apple BASIC, and I was playing around with peek and poke before the other students even knew how to properly misuse goto.

    But that was when I was 13. The first year of college should not teach BASIC.

    But why are we not introducing BASIC or the very beginner friendly 'Ruby' to students when they're 13 anymore?

  11. I started with BASIC by OpenSourced · · Score: 3, Interesting

    Years before I took any formal course, I was looking at the manual of a BASIC computer and making circles on the screen by programming a dot that kept to the same distance to another and rotated. I still remember the emotion of seeing a real circle emerge on screen. I don't know if BASIC helped me much to program, but the immediacy of the thing certainly did much to keep my interest alive.

    --
    Rome taught me patience and assiduous application to detail. Virtues which temper the boldness of great, general views.
    1. Re:I started with BASIC by KillzoneNET · · Score: 3, Interesting

      I too started with BASIC. In my case this was freshmen year in High School back in 1999 on QBASIC. I had dabbled a little with HTML but that was nothing like an actual language that had logic. It was there that I learned the basic blocks that made me the programmer I am today. I went from simple logic to loops to graphics and sound.

      By the end of the year I had a full animation of a house with Christmas lights and music. I even had a very primitive text based RPG working with the ending taken straight out of Monty Python's Holy Grail.

      It was from there that I learned C++, JavaScript, and many other languages. The logic from BASIC carried me over very easily to other topics.

      The problem with students is not the language they learn, but the fun they can find out of it. You have to find what interests them and drive them in that direction.

  12. It's not the language, it's the teacher by willoughby · · Score: 3, Interesting

    Most folks who have learned C++ learned it in a classroom with a real teacher. Most folks who learned BASIC learned by banging away on a computer keyboard at home.

    Most people aren't very good at teaching themselves. I've seen this a lot with people trying to learn Morse code and giving up in frustration.

    You can pick up a lot of bad habits without someone to guide you.

  13. Re:Time heals by multi+io · · Score: 3, Funny

    It's Dijkstra we're talking about. And Dijkstra does have quite a few genuinely useful and lasting achievements speaking for him (semaphores and such), while Wirth was indeed, more or less, a quiche-eater.

  14. Bah by tsotha · · Score: 5, Insightful

    Computer-science legend Edsger W. Dijkstra famously wrote: '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'

    Like all eminently quotable people, Dijkstra tended to hyperbole and oversimplification.

  15. It wasn't all that great... by Kjella · · Score: 3, Interesting

    ...but it was BASIC. And the expectations were so low. "10 PRINT "Hello, World!", "20 GOTO 10" and it started doing something. The programming manual was well worn by the time I was 10, would that have happened with any other language? I doubt it. Things like lack of scoping makes the easy things easier and the hard things harder. The point isn't to learn everything from your first language, the point is to get started and interested at all. Moving to DOS was sorta ok, but moving to Windows killed my interest. C/C++ was just horribly complicated, I remember trying to get up a window in the Win32 API and it was like wtf, how hard can this be? MFC was even worse, Java (really early java, on hardware of the time) was slow and unresponsive as fuck, Javascript was a toy language for websites and never really like Pascal or VB much either. I didn't regain my interest in programming until I went with C++/Qt, or maybe more Qt than C++ really. QMainWindow *mw = new QMainWindow(), mw->show(). The hard stuff is still hard, but I very very rarely find I write "overhead" code that I shouldn't have to.

    --
    Live today, because you never know what tomorrow brings
  16. In praise of...BBC BASIC by mccalli · · Score: 3, Informative

    Yeah, there were no 'else' constructs. If you wanted an else, you had to do it yourself with a couple GOTOs. Also, the worst part about line numbers was when you decided to add something later, and there weren't enough lines. A program that had been refactored this way a few times could literally move randomly through the source code.

    I never owned a Beeb, though I had several friends that did. I used them at school a lot too, and their BASIC was extraordinarily advanced. The ELSE statement was there, as was the standar(ish) GOSUB, but you could also define true procedures which returned values etc. (DIM PROC), and there was a clean way of dropping down to the 'OS' proper (OSCLI statements).

    In addition, it also solved the line number problem you mentioned. It had a renumber command so that everything would become properly spaced out again. I remember the style of coding you're describing from my C64 efforts - the C64 was actually MS BASIC and it was dreadful, anyone wanting to do decent high-levle coding used to get the Simon's BASIC cartridge.

    As a whole though, the BBC simply had the best BASIC of any 8-bit I encountered. That's not too surprising given its background and use as a teaching tool, but they did it very well indeed.

    Cheers,
    Ian

  17. Easily gotten over by wrmrxxx · · Score: 5, Funny

    easy language first your get-over is

    FORTH started I at-all me affected not and

  18. Dijkstra ? Legend ? by vikingpower · · Score: 4, Informative

    Dijkstra, who taught at Eindhoven Technical University - which is how I superficially came to know him - was mostly a self-declared legend. He cultivated his own myth, even going as far as publishing a little book with his own quotes.

    --
    Religous speak to God. Insane are spoken to by God. When all shut up, one can finally hear Shostakovich in peace
  19. Seconded! by thijsh · · Score: 3, Interesting

    Commodore Basic taught me to love programming, have fun making little games and all important binary operations and encoding for sprites and font
    QBasic allowed me to take my learned lessons to the 8086 and add much much more visually appealing graphical interfaces (still mostly games, but also editors etc.)
    QuickBasic introduced me to libraries and compilation, i've built some great hardware monitoring interfaces with sensors and relay switches
    Visual Basic allowed me to explore the win32 API and libraries, i''ve built some of my greatest applications with it ranging from editors and filtering proxies to a graphical music collection interface I could control with a remote

    I loved basic, it taught me so much but most of all it taught me to love programming... The days of fun little programs in basic are over and I have no intention of ever going back... but there is definitely meaning there, and I would recommend anyone to try programming with basic... as a self-taught programmer I can say you will learn a lot from basic.

    1. Re:Seconded! by Just+Some+Guy · · Score: 3, Interesting

      Commodore Basic taught me to love programming, have fun making little games and all important binary operations and encoding for sprites and font

      Preach it. My first exposure to binary was working through the examples in the Commodore 64 Programmers Reference Guide (still the best manual I've ever read). Sprites were 8x8 images stored as a 8 bytes, each byte representing a row, and each bit representing a pixel. I probably went through that section 15 times before I truly understood and believed that binary math works, but the lesson paid off in spades. Back then, it was figuring out how to peek and poke a memory location to make a single pixel blink. Now it's loading and storing a memory location to toggle a serial control line on an embedded controller. That little machine gave me a good start.

      --
      Dewey, what part of this looks like authorities should be involved?
  20. Re:BASIC is irrelevant by someone1234 · · Score: 3, Interesting

    Depends on your age when you start learning. I was 12 when i first met "programming", it was a TI programmable calculator. It was fun to squeeze as much functionality as possible from less than 1K Basic. Then came C64, with its ~38K Basic. Its Basic was very weak, but i learned how to read disassembly when i read the code of various Basic extensions and read books that contained snippets on extending C64 basics. Eventually i made my own Basic extension, cracked games to create trainers, made an own turbo loader that had half of its code on the floppy drive. So, by the time i went to mid school, i programmed device drivers in machine code!
    I learned PL/I and other archaic languages in mid school, even punch cards! I learned C on my own and was taught in it only by the time i went to high school.

    --
    Patents Drive Free Software as Hurricanes Drive Construction Industry
  21. I'd guess there's a critical period & an attit by weston · · Score: 3, Insightful

    I think the author is mostly on. He's aware Dijkstra was exaggerating for effect, but also completely correct... if you started programming in the early home computing era, you probably started with a BASIC. I was lucky enough to get some varied exposure earlier to some other languages (LOGO and some shallow assembly), but until I was 15, it was pretty much Basic.

    And none of my programming habits now resemble anything close to the BASIC I wrote in when I was that age. Except, occasionally, for the rare cases where global state seems to make sense, and even then, I try to namespace things in one way or another. But by and large, I picked up structured programming, I picked up object-oriented programming, I picked up logic programming, and I'm learning to enjoy functional programming.

    I will say... there was a time when I was probably close to being "ruined." It was when I was learning C++, and I only really had Pascal, basic C, and Basic under my belt. And I had a pretty solidly structured-imperative mindset, and really hadn't seen any other way of doing things. C++ married data structures and methods in an interesting way, but it didn't seem like more than a stylistic practice to me. I was pretty sure most languages were alike, you just had syntax and typing differences.

    But there was one thing: I'd had to learn Prolog for a very specific job. We were teaching it to high school students in a CS summercamp I worked at for a few years. The first year, I just thought "Man, this is weird," more or less got through all the exercises, and left it behind, and did what most people do: dismiss it as an odd research toy. The second year, I thought "this is weird, but interesting." The third year, I thought "Wow. There are all kinds of intriguing ideas here."

    And there are, and I still think it could stand to see more usage in mainstream software, but more importantly, I think I'm pretty lucky I got repeated exposure to a language that forced me to think differently before I got very far into actually working in the software industry.

    Because I now think there's either a critical period (or possibly, at a minimum, a critical attitude of some kind) after which a lot of programmers tend to lose either the humility or the curiosity that drives people to think about different programming constructs and habits. I think if a programmer has been minimally exposed before they reach it, they'll keep just enough of one or both of those attributes that they'll be interested in what they don't already know, rather than arriving at the point where "they've already learned the last programming language they'll ever need."

    And if they don't get so exposed, they become Blub programmers, where generally $Blub is some industry-leading language that does enough you don't easily bump up against tasks that are near impossible in it.

    To tie this back in with a point I think the author missed, I suspect that some of the difficulties with Basic are actually part of the reason why it didn't end up ruining more programmers. Almost everybody who really came to grips with it as a tool probably realized that it couldn't possibly be the last programming language you'd ever need (if it weren't enough that any effort to look into working as a programmer revealed that Basic was clearly not the strongest payroll ticket).

  22. Better than nothing by kainosnous · · Score: 3, Interesting

    When I was first learning to "program" I had nothing more than an old computer with DOS. The internet was something I had heard about, but had never experienced myself, and I didn't know what Linux or even Unix was. The only way I had to learn was from some books I found at the library. At first, it was just .bat files. When I discovered BASIC (I thing it was GW BASIC), I was excited to have it. Later, I discovered QB.

    There are some advantages. First, I didn't have to set anything up or worry about what includes I needed. A simple PRINT "Hello word" was enough. What was better with QB was that with the press of F1 I could browse the list of commands. Also, it came with a Gorillas.bas and Nibbles.bas. I spent hours injecting lines of code into those games.

    Sure, if you have a full Linux environment with gcc, man pages, and web access then BASIC is just some lame toy, but if it's all you have It's a start.

    --
    There are 10 commandments: 01)Thou shalt love the Lord Thy God 10)Thou shalt love thy neighbour as thyself.Matt22:34-40
  23. BBC BASIC by tomalpha · · Score: 4, Interesting

    I cut my teeth on BBC BASIC back in the 80's. It was simple, powerful, let you do pretty much anything and best of all came with a built in assembler. Now that was really neat.And it just worked. It was easy to optimise individual subroutines in assembler. This was age 10. At my simple state school with a couple of BBC Model Bs in the corner, I wasn't the only one doing that either.

    I make a living writing C++ now and seem to do fairly well at it. The kids coming out of university that I interview these days haven't touched BASIC, or C++ for that matter. We want them to write good C++ when they come and work for us. The intelligent ones adapt easily to working with pointers etc. The less able ones that have somehow made it through the interview process struggle.

  24. Re:BASIC is irrelevant by Eraesr · · Score: 4, Insightful

    At college we started off in Pascal but quickly moved on to C and a bit of Java. I'd say that if anyone is considering BASIC as a first language, they should choose Pascal instead. But to be completely honest, these days OO programming has become so important that it's probably better to start off in Java or C# from the start.

  25. Re:BASIC is irrelevant by Z00L00K · · Score: 3, Interesting

    It's not necessarily a bad thing to have done things in BASIC, but bad habits can be formed by that language. However the other side of it is that if you first see the bad sides of BASIC then you can recognize the good sides of other languages.

    And BASIC of today is Python.

    --
    If builders built buildings the way programmers wrote programs, then the first woodpecker would destroy civilization.
  26. Re:BASIC is irrelevant by atisss · · Score: 3, Interesting

    Oh really? And university students should have no prior knowledge to programming? We have full universities of such students, they get degree and go working for some brainless company doing minor tasks.. Or they could continue study until they are 40, then they will probably be able to code.

    I started at 12, and BASIC gave me some idea of how computer is actually working. Probably it's time for new languages, but You just can't learn programming at college in few years. You have to grow up with that.

  27. Re:Second story from this blog this week... by geminidomino · · Score: 4, Funny

    Or, more on-topic:

    Haiku Overflow
    It was programmed in BASIC
    System halting now

  28. Re:BASIC is irrelevant by dakameleon · · Score: 3, Interesting

    When was anyone introducing languages to students at 13? There's bound to be a significant chunk of us out there who poked around our computers and went to find these things out ourselves. BASIC just kinda sold itself with the name - you knew it was a good starting point. Self-discovery and a curious mind is probably outdated in the corporatised world, in spite of the roots of many of us who learnt by screwing up an autoexec.bat file or two on Dad's computer. Nothing teaches you to pre-check your logic than having to explain to Dad why his computer doesn't work any more :)

    --
    Man who leaps off cliff jumps to conclusion.
  29. Re:BASIC is irrelevant by Nerdfest · · Score: 3, Insightful

    When programming in Java, I still resist breaking out of loops, or multiple returns, even in small methods. These things seem to be normal acceptable practice with most developers, and really are fine when used in the right places. Because of early exposure to BASIC (and badly written C) I avoid them more than most.

    I think the BASIC of today is Javascript. You see more badly written javascript than any other language..

  30. Point taken, but... by Moraelin · · Score: 5, Insightful

    Well it IS done with jump instructions, but as few as possible because the branch penalty is usually high (especially on an x86). If you don't use the goto statement then your program is more abstract, and structures like loops can be more easily optimised by the compiler to use as few branches as possible. Not to mention things architecture-specific like ARM's condition codes which can turn a loop with multiple if-else statements into a block of code with only one branch instruction.

    Point taken, but in my experience people who have even marginal idea of what happens under the covers, tend to write better code than those for whom the underlying machine is a complete mystery. I'm not talking premature optimization, but merely knowing in the back of your head what a pointer is, or _why_ this operation is O(log n) and better thus than O(n), can save one from a lot of awfully wrong guesses and writing awful code.

    My canonical example is a team whose architect (!) finally read somewhere that when passing an object to a Java method, only the pointer is passed on the string. So he actually decreed -- and none of the lemmings knew better -- that they should use parameters like the wrapper object Integer instead of the primitive int. (We're also talking Java 1.3 times, so no automatic boxing/unboxing either.) Because, I quote, "If you use Integer Java copies only a pointer to it, not the whole int."

    Maybe knowing how much space an int takes under the covers would have helped.

    Another time I hear my now ex-coleague Wally (not the real name, but pretty accurate;)) repeatedly going, "That can't be true!" and the like. Curiosity gets the better of me and I ask what's the problem.

    "Java has a bug!" he goes, "I put a new key/value with the same hash code in a HashMap and it just replaced my old value!"

    "Oh, yeah, we've had the same bug at the old company, " Wally 2 chimes in. "We had to manually set the capacity so it goes in another bucket."

    (I clench my teeth to avoid screaming at the notion that there's any way to the right capacity to avoid collisions for keys that are random strings.)

    I go and look at what he's doing, and sure enough he's got the debugger open and is looking at the bucket array of a HashMap. "Look! There! I had a different value and it replaced it!"

    "Aha, " I try to be diplomatic, "can you please expand that 'next' variable there?"

    "No, you don't understand! My value was there and now it replaced it!"

    "Yes, I get it. But I want to see what's in that 'next' variable."

    He clicks and goes, "Oh... there it is."

    The whole concept of a linked list was new to him, obviously.

    And if you think that's an isolated case, in the meantime I've run into two different teams whose "architect" actually made it mandatory to plaster his broken replacement for the hash-code method everywhere, because of that supposed "bug in Java." Supposedly they can hash a long-ish random String into a 32 bit int without ever having collisions. (Ok, 31 since Java doesn't use the sign.) Consulting can be depressing business, you know?

    I could go on with more such WTF examples, but basically let's just say I wish more people would know exactly what happens behind those high level constructs and libraries. Because otherwise I see them take their own guesses anyway, and guessing wrong. I wish they'd know what a pointer really means, and why a LinkedList does _not_ use less memory than an ArrayList, and, yes, what kind of things will cause jumps. Or what kind of things will be optimized into a tail recursion instead of a plain recursion, as a trivial example of where it pays to know the difference between a JUMP and a bunch of PUSHes and CALL generated by the compiler.

    --
    A polar bear is a cartesian bear after a coordinate transform.
  31. Re:BASIC is irrelevant by SharpFang · · Score: 3, Funny

    Perl as introduction to programming for kids?
    You will be lucky if they put you in prison for life, for child abuse.
    If they don't, you'll have the misfortune to spend the rest of your miserable and short life in the grim world you will have created, filled by monstrosities from worst nightmares.

    If BASIC was mutilating the young minds, Perl is in the line of Cthulhu summoning with minors.

    --
    45 5F E1 04 22 CA 29 C4 93 3F 95 05 2B 79 2A B2
  32. Re:no, Python is not the language to start with by Just+Some+Guy · · Score: 3, Interesting

    If you build your skills around Python, you'll hit serious trouble if you ever end up needing decent performance or unwrappered OS functionality. If you build your skills around C, whole new possibilities open up to you.

    That's the dumbest thing I will have read today. I built my skills around 6502 assembler, written inside a monitor because I didn't know that real assemblers existed. I did my senior thesis on interfacing hardware to an embedded controller. I'm content writing memory-managing, bit-twiddling software in C. At the end of the day, though, I'd much rather write complicated stuff in Python than in anything else. Furthermore, I don't have any problem getting great performance out of it. The fact that you do says a lot more about the way you tried to write software in Python than it does about the language itself.

    --
    Dewey, what part of this looks like authorities should be involved?