Slashdot Mirror


Why Teach Programming With BASIC?

chromatic writes "To answer the perennial question 'How can we teach kids how to program?', we created a web-based programming environment. As we began to write lessons and examples, we surprised ourselves. Modern languages may be powerful and useful for writing real programs, but BASIC and Logo are great languages for demonstrating the joy of programming."

90 of 709 comments (clear)

  1. Can't get there from here by icebike · · Score: 3, Funny

    There is still the theory that once you teach someone basic it becomes impossible to teach them programming. /running and ducking...

    --
    Sig Battery depleted. Reverting to safe mode.
    1. Re:Can't get there from here by Anonymous Coward · · Score: 2, Insightful

      This theory is easy to prove false with a counter-example. Me.

    2. Re:Can't get there from here by Anonymous Coward · · Score: 2, Funny

      section .text
              global _start

      _start:

              mov edx,len
              mov ecx,msg
              mov ebx,1
              mov eax,4
              int 0x80

              mov eax,1
              int 0x80

      section .data

      msg db 'Teach them in assembly, you insensitive clod!',0xa
      len equ $ - msg

    3. Re:Can't get there from here by hcs_$reboot · · Score: 5, Insightful

      I started with the BASIC language as a child. And it was not easy.
      If Basic didn't have lines numbered, a goto, a limited set of instructions (no while for instance), and no mysterious crash (no pointer for instance), maybe I'd have given up. After a while, when Basic concepts were understood, I wanted to get over the language limitations: speed and abilities. The next step was the assembly language, at the time.
      Then learning C: coming from Assembly helped a lot to understand pointers and what happens under the hood.

      Basic was simple enough to give me interest in programming, and its limitations made me want to learn more elaborated languages afterwards.

      --
      Slashdot, fix the reply notifications... You won't get away with it...
    4. Re:Can't get there from here by DeadlyFoez · · Score: 2

      I partially agree. The part the I agree about is I used QBasic back in '95 and I have never learned another language since. I love basic programming and I have never stepped away from it because I have never had a need to. Trying to learn any C derivative while being an at home father is impossible. The part I disagree about, although I have no grounds to speak since I only know basic programming and I should just STFU, is that basic is a very good stepping stone. If I had more time or any money to goto school then I would already have a decent foot in the door with other languages because I understand how a program works and how logic is with computers. If I were to try and learn C (or any derivative from scratch) then I would be overwhelmed very easily. There is too much to learn with C (or it's derivatives) all at once. At least with basic I can learn and understand how subroutines work. I can understand program structure without having to worry about including libraries or .h files for what I desire to do. Basic is a very good stepping stone, but if you dont have motivation then someone may never get beyond it.

    5. Re:Can't get there from here by gstrickler · · Score: 3, Interesting

      My first language was BASIC, my second assembler. Since then, I've learned at least 6 more languages, but I still prefer a modern compiled BASIC for most projects. On the rare occasion that BASIC can't deliver sufficient performance, I'll link in some assembly or C routines. I've been quite successful doing that professionally for almost 26 years. That doesn't mean I always write in BASIC, I use the language that best fits the needs, the majority of the time, that has been BASIC.

      Mind you, I hate old interpretive BASIC languages that require line numbers, don't have DO/LOOP, WHILE/WEND, Sub/Proc/Function calls, variable scope controls, and other necessities. I'm talking about modern compiled BASIC languages with most of the modern structures we all know and love. It's not a perfect language, but it allows me do code, debug, and modify far faster than any other language, and for most purposes, performance is close to any modern language.

      --
      make imaginary.friends COUNT=100 VISIBLE=false
    6. Re:Can't get there from here by Proudrooster · · Score: 2

      That's called reductio ad absurdum or proof-by contradiction which is my favorite type of proof, since it's the only one I can actually do and understand :). Don't forget your QED the end of your proof :)

    7. Re:Can't get there from here by syousef · · Score: 2

      That's called reductio ad absurdum or proof-by contradiction which is my favorite type of proof, since it's the only one I can actually do and understand :). Don't forget your QED the end of your proof :)

      Well you have to be very careful about exactly what you've proved. The statement that "No programmer who has learnt BASIC can be taught a modern object oriented language" could certainly be proven by a single counter example. However the statement that "Programmers who've learnt BASIC tend to be harder to retrain in a modern object oriented language" requires statistical study.

      --
      These posts express my own personal views, not those of my employer
    8. Re:Can't get there from here by Lloyd_Bryant · · Score: 2

      Just about anything else. No sanely designed programming language will ever require you to label each line of code and throw and require the lines to be renumbered whenever you want to put new code in the middle.

      I take it you haven't used any BASIC variant in the last 20 years or so. Line numbers, as in GWBASIC, aren't required for any modern BASIC.

      --
      Don't tell me to get a life. I had one once. It sucked.
    9. Re:Can't get there from here by nomadic · · Score: 2

      They're frequently right. BASIC was fun to learn as a kid but probably derailed me from ever learning proper programming.

    10. Re:Can't get there from here by narcc · · Score: 2

      No sanely designed programming language will ever require you to label each line of code and throw and require the lines to be renumbered whenever you want to put new code in the middle.

      BASIC existed long before the full-screen editor -- hell, it existed before the full-screen! Line numbers made a lot of sense back in 1964 (and for some time thereafter). If you can't figure out why this is so, just ask.

      You should also note that most people designed their programs on paper *before* they entered it into the computer. They also had the good sense to leave gaps in the numbering (10 20 30 instead of 1 2 3) for possible later additions and used the hundreds or thousands place for marking off program sections.

      Only a totally incompetent idiot would constantly be using renum.

      Besides, line numbers haven't even been necessary since the advent of structured BASIC in the early 80's. In case you didn't notice, structured BASIC has dominated the language for the past 25 years. -- While it's true that you'll find any number of BASIC interpreters which support line numbers, you'll have a hard time finding one that requires their use.

      But don't let your total ignorance of the subject keep you from forming strong opinions.

    11. Re:Can't get there from here by aliquis · · Score: 2

      Basic on steroids (?): :D
      http://en.wikipedia.org/wiki/AMOS_(programming_language)
      http://en.wikipedia.org/wiki/Blitz_BASIC

      Written in Blitz Basic:
      http://www.youtube.com/watch?v=-lSihEAxvTs

      Seems like the first Worms (Total wormage) was written in AMOS.

      Best Amiga racing game:
      http://www.youtube.com/watch?v=wZiRQ0bzGds

    12. Re:Can't get there from here by c0lo · · Score: 4, Funny

      I still find multi-threading and C/C++ easier than Basic.
      ...
      Computer's just manipulate math, one problem at a time. Crazy easy.

      I wonder what did you understand from multi-threading?

      --
      Questions raise, answers kill. Raise questions to stay alive.
    13. Re:Can't get there from here by julesh · · Score: 2

      I take it you haven't used any BASIC variant in the last 20 years or so. Line numbers, as in GWBASIC, aren't required for any modern BASIC.

      The BASIC variant that TFA is about requires line numbers for all lines. The develoeprs suggest this is better, because it makes control flow explicit.

    14. Re:Can't get there from here by BeanThere · · Score: 2

      Or maybe, just maybe, you just weren't all that inherently interested in programming? I somehow find it very hard to believe that anyone truly interested in programming would 'give up' simply because they 'learned BASIC'.

      I started on BASIC(first ZX Spectrum, later QBASIC) - for years - later learned Pascal, then C and C++, and now have programmed full-time C++ for 10 years. And from day one, every step of the way, I've been hooked - loved it, loved learning new things, loved being able to create things.

      I could equally claim that I never got good at woodwork because we only had crappy tools at home (which was true). But the reality is I was just never that interested in it.

  2. Python vs. BASIC by Anonymous Coward · · Score: 4, Informative

    I learned to program pretty much with Applesoft BASIC and a Franklin Ace 1000 manual

    Now I'm teaching my mom (!) to program in Python using the Hello World book.

    Honestly, I wish Python were around when I was learning. Trying to squeeze a new instruction between line 11 and line 12 kinda sucked sometimes. (Then again, I wish a lot of things were around...)

    1. Re:Python vs. BASIC by Yaos · · Score: 2

      Python is a easy as BASIC, and you can teach good programming practices in it. Once they get to understand programming, they can move on to the harder things without leaving the language.

    2. Re:Python vs. BASIC by BagOBones · · Score: 2

      Why do I suddenly imagine Optimus Prime holding his cargo trailer over his head and running..

      --
      EA David Gardner -"... but the consumers have proven that actually what they want is fun."
    3. Re:Python vs. BASIC by fyngyrz · · Score: 3, Interesting

      A program shouldn't treat block structure or typos as run-time errors.

      Wrong. A language that actually uses whitespace should. Which is what Python does. The fact that you can't wrap your head around it isn't in any way a condemnation of Python. It just says you're inflexible, and frankly, in forty years of programming experience, I've never found lack of flexibility to be a useful trait.

      Whitespace utilization in Python uses the programmer's intuition to instantly perceive block structure. This beats the heck out of scanning lines for randomly embedded (speaking spatially, now) braces. Mind you, it is possible to write C (and I do), for instance, nominally a free form language WRT whitespace, with meaningful whitespace. Really helps, especially later on, when you haven't seen the code for years.

      The fact that Python *requires* whitespace is simply a means to bring your intuition to the table by force, and frankly, I think it's a good idea. That some folks can't, or won't, get it... that's unfortunate. For them. :)

      --
      I've fallen off your lawn, and I can't get up.
    4. Re:Python vs. BASIC by digitig · · Score: 2

      Languages shouldn't use whitespace. I thought we had established this in the 70's

      You want to get your religion from ancient books, go ahead. Those of us who are more scientifically minded will look to the evidence.

      --
      Quidnam Latine loqui modo coepi?
    5. Re:Python vs. BASIC by digitig · · Score: 2

      The fact that Python users don't have the problems with whitespace that FORTRAN users did. What was established in the 70s is that FORTRAN used whitespace badly, not that whitespace shouldn't be used.

      --
      Quidnam Latine loqui modo coepi?
    6. Re:Python vs. BASIC by dbrueck · · Score: 2

      One of the things I love about Python is that whitespace is significant, and for the very reason that the other poster mentioned - even in languages where you do have block delimiters, it's pretty much universally accepted that "good" style dictates that you use indentation as well - indentation expresses block structure in C, Java, etc., etc. It just makes code more readable. In any open source project or any professional setting it's the same - if you write code that isn't well-formatted (with your blocks properly indented), the code is considered bad, ugly, unprofessional.

      Given that this is the case - that indenting your code is expected and good form, what purpose do the curly braces in C actually serve? They may add to readability perhaps (though in terms of readability they are much less important than the indentation itself), but in reality they exist for the parser, for the tool, and not so much for the humans reading and writing the source code. To me, this is the first indication that something is less than ideal - you're required to do something all over the place in your source code but it's not primarily for your benefit, but for the benefit of the tool you're using. Maybe this doesn't bother you, but I hope you at least appreciate in principle why it would bother some people.

      The second and related problem here is that there exists the potential for errors: when a human scanning the code visually, the whitespace is a stronger indicator of the structure of the program than the curly braces are, but for the parser, it's irrelevant, only the braces matter. That's why you can get errors like:

      if (i < 5);
              i++;

      or

      if (i < 5)
              i++;
              j++;

      These are silly examples, and yet they are ones I've encountered in real code (both mine and other's). I don't know how common they are, but they sure have driven me crazy, and they demonstrate the point I'm trying to make. What I find even more telling is how some companies with coding standards deal with it: they mandate that /all/ blocks have the curlies. It's not bad per se, but again it's just mandating that things be done a certain way, not for the benefit of the folks doing the coding, but for the benefit of the tool.

      Anyway, that's why I like Python: there is never ever a disconnect between my intent and the actual block structure of the program - the human and the tool are /always/ on the same page.

      Two anecdotes you are free to ignore:

      - All the people I've ever encountered who have persisted in objecting to Python's use of whitespace have been people who haven't actually used Python very much. Similarly, all the people I've ever encountered who have used Python for any program of substantial size, including those who initially objected to it, pretty quickly stop considering it an issue, and nearly all of them eventually come to admit that they really like it. I'm not saying this is a universal experience - but it's been interesting to observe.

      - The theoretical problems that can arise (mixing editors, copying and pasting code) don't seem to happen very much in practice. I've used Python for well over a decade and off the top of my head can't think of *any* cases where it's happened to me. I'm assuming it has happened at some point, just because it's unlikely for it to never have occurred, and yet I honestly can't think of any time it actually /has/ occurred. Maybe I'm just extraordinarily lucky, or maybe it's just not something that occurs that often in practice.

      I do appreciate that some people object to the significant whitespace approach - some people have real concerns, others it just rubs them the wrong way. To them I'd say (1) don't knock it until you've really tried it and (2) at least recognize that the curly braces are you serving the tool, and not the tool serving you, since you undoubtedly also use indentation to express block structure of your program.

  3. Re:BASIC by plover · · Score: 5, Funny

    10 print "hello"
    20 goto 10

    This is why we can't have nice things.

    --
    John
  4. BASIC Programmers Never Die... by Blackwulf · · Score: 4, Funny

    ...They GOSUB and don't RETURN.

    1. Re:BASIC Programmers Never Die... by RoverDaddy · · Score: 3, Funny

      Hooray! My sig is finally on-topic.

      --
      RETURN without GOSUB in line 1050
  5. yeah but by hguorbray · · Score: 4, Insightful

    despite their limitations and age, procedural languages are a better way to teach kids (or anyone)how to think logically about the steps required to make a computer do something they want it to do.

    It worked for me in 1971 on a teletype at Cory School in SJ connected to a Stanford mainframe -which I had to feed my 'saved' paper tapes to

    and it will work just as well today on whatever BASIC emulators (or even VB.NET god forbid) that are available today on PCs, pads or whatever.

    Although Java is probably better for middle/high school, I do believe that Basic or Logo are better for those younger who have not yet learned how to deconstruct a desired outcome into a bunch of logical steps.

    -I'm just sayin'

    1. Re:yeah but by camperdave · · Score: 3, Funny

      You aren't allowed to use peanut butter as an example in schools anymore. Too many kids are allergic.

      --
      When our name is on the back of your car, we're behind you all the way!
  6. Web-based programming environment... by windcask · · Score: 5, Funny

    "Here, son, let's look at this Wordpress site that hasn't been updated in 18 months. Now, this is called 'SQL Injection' and 'Cross-site Scripting.'"

    Nothing better than learning by example...

  7. Slashvertizement by SoftwareArtist · · Score: 2, Insightful

    Wow, this "story" is a really blatant advertisement for a commercial website.

    No, BASIC is not a good language for much of any purpose, including education. Especially not the archaic type of BASIC they're using. Computer science really has progressed in the last four decades. Personally, I'd recommend Python as a starting language - it's easy to learn enough to do simple things, it's a well designed language that teaches good habits, and it's a "real" language that you won't outgrow as soon as you start writing anything beyond toy programs. But if you want a language designed specifically as a learning tool, there are lots of those that are a lot more modern and let you do a lot more than this company's offering: Processing, Alice, etc.

    --
    "I'm too busy to research this and form an educated opinion, but I do have time to tell everyone my uninformed opinion."
    1. Re:Slashvertizement by outsider007 · · Score: 4, Funny

      I came for infotainment but was disappointed to find an edutizement

      --
      If you mod me down the terrorists will have won
  8. Teach Python instead by talcon · · Score: 2

    I think Python is a better contemporary choice now (and I learned on structured BASIC - QuickBASIC)

  9. Programming should begin with OO - yes really! by robbak · · Score: 2

    There is noting inherently complex with OO, unless you already have a head full of linear or procedural programming that you need to get rid of.

    A nice, stripped-down OO language - I'd sugest parts of java if it was a free language - would be a good start. Even a graphical interface, although they are undeniable useless for real programming, would be useful for starting off.

    --
    Prediction for end of Universe #42: Fencepost error in Quantum_bogosort.cpp
    1. Re:Programming should begin with OO - yes really! by narcc · · Score: 4, Interesting

      Programming should NEVER begin with OO. If for no other reason than the cruft you need to add in OO languages before you can even begin to introducing basic concepts.

      Objects are great when used appropriately. However, knowing how and when to use objects takes experience. Beginners by definition don't have experience.

      "Pure" OO languages are even worse. When everything is an object, you don't have a choice about when to use them and, consequently, are much more likely to use them inappropriately. (Bad OO code makes you wish you were maintaining bad VB code!)

      Sure, a good programmer can write great OO code, but such programmers are extremely rare -- You're not likely to find an introductory class full of competent and experienced OO programmers.

      Having taught programming to many different age groups (from children to adults) I know from experience that OO is not the way to go. You can't just start off with structure -- it's totally inappropriate. They simply can't learn to structure their code until they're capable of writing some!

      Teaching someone programming is a bit like teaching someone to think. A good teaching language should let you introduce all the basic concepts like direct sequencing, bounded and conditional iteration, conditional branching, variables and types, i/o, etc. without a bunch of indecipherable code cluttering up the program and confusing the student ("magic" just-ignore-this code does not aid in the learning process).

      For that, the submitter is spot-on. Languages like BASIC and Logo are excellent introductory languages. All meat and no fat. I prefer Logo for children under 10, BASIC for everyone else. I've tried Java, JavaScript, C, Pascal, and even COBOL. Nothing stays out of your way like BASIC or gives you the instant satisfaction (crucial to younger children) like Logo.

    2. Re:Programming should begin with OO - yes really! by narcc · · Score: 2

      OO languages like Smalltalk (for class-based OO) or Self (for prototype-based OO) and those inspired by them (like Ruby and JavaScript) that haven't, somewhere along the line, tried to wed OO structure with an existing static procedural language, don't really feature much boilerplate cruft that needs to be included in simple programs before beginning to introduce basic concepts.

      So... how much cruft do think is acceptable? I think any amount is too much, for the reasons stated above.

  10. Microcomputers grew up with us. by ZorinLynx · · Score: 5, Insightful

    Those of us who were kids in the 80s and grew up playing on microcomputers with BASIC have a very distinct property:

    We grew up together with computers.

    When we were kids, computers were simple, single-tasking, small memories, and it was easy for a youngster to understand the entire system. As we got older, systems got more complicated, and so did our ability to understand them.

    Today's kids start with computers that are already large systems with complex operating systems, millions of times more memory than we have *disk* when we started, that are difficult to understand at a low level. I think this puts them at a loss. Every child should be able to play with and learn on an Apple II, C64, or similar small system. Of course realistically that won't happen. So emulated "systems" with simple programming languages may indeed be a good idea for today's kids.

    1. Re:Microcomputers grew up with us. by JoeMerchant · · Score: 2

      I "grew up" through the TRS-80 / Apple II era, and I think that the "magic" of BASIC is still accessible on today's machines - sure you can't (easily) program super slick applications in it, but then you never could, even in the old days.

      For me, BASIC was great because it was interpreted, very fast to try something and see what happens. It also had enough "power" in its relatively simple syntax (60 to 70 commands) to do a lot of things without resorting to insanely huge bloated libraries (stdlib/Boost/Qt - I'm thinking about you now...).

      I don't agree with Dijkstra's comment that programmers are "ruined" by BASIC, I think programmers are ruined by too much / too little pressure to deliver working systems in too short / too long a time frame. Teach someone basic and put them in the typical high pressure to deliver quickly scenario and yes, they will fix things quickly with GOTOs - more a result of the schedule than the language. Even worse than fixing things quickly under pressure using a GOTO or two is spending 8 years teaching someone theory, then giving them so much luxury of time to architect and plan and scaffold and framework that they construct elaborate extensible polymorphic frameworks that are universally reusable for practically nothing. I've seen a lot of very ambitious code over the years that can be effectively replaced by something 1/50th the size.

      Procedures are procedures, regardless of the language.

    2. Re:Microcomputers grew up with us. by MobileTatsu-NJG · · Score: 2

      Today's kids start with computers that are already large systems with complex operating systems, millions of times more memory than we have *disk* when we started, that are difficult to understand at a low level. I think this puts them at a loss...

      I don't agree. Today's kids are making flash games, putting up websites, making short movies, and a whole slew of stuff they wouldn't have been able to do (or share) when the C64 was king. Now the entry level for doing what it is you specifically want to do with computers which means it's a LOT more accessible to today's youth. That spark of interest is worth a lot more than an understanding of what a pointer is.

      --

      "I like to lick butts!" by MobileTatsu-NJG (#32700246) (Score:5, Informative)

    3. Re:Microcomputers grew up with us. by sourcerror · · Score: 2

      They can still program (RISC) microcontrollers in C/assembly. It's much nicer than x86. You can get one for $25 (AVR Butterfly).

    4. Re:Microcomputers grew up with us. by c0lo · · Score: 2

      Or, you know, there's actual emulators such as AppleWin for the ][ series and VICE for the C=64 and its brethren. Also RetroForth.

      Not as an IPhone app, though. And that's the tool I heard the new generation is using.

      --
      Questions raise, answers kill. Raise questions to stay alive.
    5. Re:Microcomputers grew up with us. by mister_dave · · Score: 2

      I rather like The Elements of Computing Systms as an educational tool, you build a computer in an emulator.

  11. Re:Why I Use Basic by Haffner · · Score: 2

    Dear FBI, please stop by sometime later this week. As you can see, I am at home at 7:12pm CST. Thanks!

    FTFY

    --
    "Going to war without the French is like going deer hunting without your accordion." ~General Norman Schwarzkopf
  12. "How can we teach kids how to program?" by underqualified · · Score: 5, Interesting

    the correct question would be...

    how do we get our kids interested in learning how to program?

    and the answer to that would be...

    tell them they're not allowed to do it.

  13. "computer programming" is not "logic" by rbrander · · Score: 5, Insightful

    You can teach people logic statements and procedures and about objects, even - with ENGLISH.

    In my grade 8 class, there were no computers except the ones at the University I was by then programming with punch cards using stolen student accounts. But the math teacher asked us to write out our procedure for tying our shoes - in precise, motion-by-motion detail so another student could do it exactly the same way as we did, without help. Most people required over a page, and it was a revelation how excruciating it was. Later, in CompSci 501, I learned about logic statements and predicates and the wonderful Lewis Carrol problems ( 1: All my turtles that are not green are old....) All English.

    "Computer Programming" on the other hand, is about making computers do things for you. By hook or by crook, by object or procedure, just get 'er done. I completely agree with the language snobs and detest BASIC. And I do most of my programming in it because you can make Excel about 10X more useful with just a little VBA here and there.

    Learning Python or Java is just great if you plan to be a professional programmer one day, those languages can solve very large problems without the codebase becoming unmanageable. If your problem is getting a bunch of kids excited about what computers can do, you have no choice but to use whichever language will produce results with the greatest WOW factor with the shortest learning time.

    That cuts out ALL verbose languages, languages that demand typing. The "Hello world" program should be one statement long.

    Notice that doesn't chop out Perl or Python. But also notice that at kid-levels, those languages can only take screen input and produce text output. That was cool for me in the 1970's but I think today you'll get better results with something that can go graphical right away. (This also just cut out your original BASIC).

    So, if your school has MS-Office on every machine, well, as a FLOSS fan I hate you, but you're crazy if you don't leverage the presence of VBA. You can show them what cool stuff a computer can do with Excel alone, show them some formulas in action and all that. (This, by the way, keeps them from thinking of "computer programming" as necessarily procedural right there - clearly, you are instructing the computer, but you are NOT using a procedure, just setting up conditions for behaviour of the cell objects!)

    Then show them procedural programming by modifying the spreadsheet with VBA. This can lead quickly to manipulating the Excel data structure, which is a huge collection of objects with properties and methods. Many can manipulate charts in pretty ways, or turn Excel into "graph paper" with coloured cells in funny shapes, like ASCII art. You can take it all the way to them inventing their own objects in VBA.

    AND: It will be useful in a job, even if they only learn to write 10-liners. Bonus.

  14. Re:I completely agree with Edsger W.Dijkstra by volkerdi · · Score: 4, Insightful

    Famous quote, but nonsense. In many ways, trying to build large BASIC programs and ending up with unmaintainable spaghetti code is one of the most valuable lessons a programmer can learn.

  15. Yes, Python :) by kripkenstein · · Score: 2

    Personally, I'd recommend Python as a starting language...

    I might, if there were a simple, cross-platform, one-click-install download bundle for all of the major operating systems which included pygame and a decent IDE, and even then I'd target motivated 13 year olds as the youngest users.

    You can run Python directly in the browser - no need for installs at all. In fact one of the motivations for getting CPython working in JavaScript was for things like this. (Note: It doesn't work perfectly yet, but all the hard work is already done.)

    For a basic IDE, that demo includes Skywriter. Integrating some additional features like load/save etc. would make it very usable I think.

    Regarding pygame: It would be possible to get something like that working in the browser, targeting an HTML canvas element. See this demo for C++ code written against SDL, compiled into JavaScript and an SDL implementation that targets a canvas.

  16. How to teach programming by QuoteMstr · · Score: 4, Interesting

    When teaching students how to program (which is entirely different from teaching them computer science), you should begin with the most fundamental concepts: talk about raw memory and opcodes. Discuss briefly how these instructions are actually interpreted and implemented (how a half-adder works is fascinating, even if most people never have to build one in real life).

    Once your students understand how to make computers do basic things with raw instructions, teach them jumps, conditionals, loops, and even subroutines. After that, introduce higher-level languages and compilers, and demonstrate that the compiler merely automates what your students have already been doing. From there, teach progressively higher-level constructs, including second-order function references, data structures, and so on. Object-orientation falls out naturally once you get to structures and function pointers.

    If you follow this approach, your students will have an understanding of the entire abstraction hierarchy, which is not only of immensely practical value, but also underscores the principle that nothing in this field is "magical". You can always pierce an abstraction, and even more importantly, erect new abstractions where appropriate. The most common flaw I find in programmers is the inability or unwillingness to build new abstractions. The only way we make progress in this field is by the old reductionist approach of breaking a hard problem into smaller parts and attacking each individually. When you teach your students how to do that by demonstrating the power of abstraction, you make them better programmers.

    Programmers shown UML, Java class graphs, and so on right away become too familiar with that level of abstraction. They think of lower levels as some kind of magic and don't realize they can and should build their own levels on top of what they're given. The result is often incoherent, rambling, brittle, and ugly code. Don't let that happen.

    1. Re:How to teach programming by EvanED · · Score: 2

      I have given this a lot of thought over the years (I'm not in a position to actually test the hypotheses, so I don't have empirical evidence to support my position) and I understand where you are coming from. (There was a /. post a long time ago about this book and I think it's a really interesting approach.)

      That said, I think in general it would fail miserably. There are a bunch of drawbacks. First, if you write in assembly you are basically completely tied to a particular platform. If you use a higher-level language -- even just bumping it up to C -- then the students have the freedom to use "whatever" they want. Your lab computers have Linux and they have Windows? No good if you teach assembly. Your lab has Windows and they have OS X? No good. Your lab has recent Apples and they have an old G5? No good. Want to allow them to work on their choice of platform? Have fun grading. Logistically, this is very difficult. (C isn't perfect in this regard -- but it is pretty darn close compared to assembly if you stay away from C99-specific features.)

      The second problem is more pedagogical. If the students aren't actually interested in learning, they aren't going to learn. And I think it'd be much easier to get most of them interested if they can actually program something that is useful and/or cool. You can spout off all you want about how "why we're doing all this will make sense in a year or two" and it won't help. Programs that are one of those two things are usually at least mildly complex, and thus the low-levelness of asm would be a true hindrance in achieving that goal.

      Personally, I think you'd have far more success (in terms of both students continuing through the curriculum and in terms of understanding of the material) if you approached the material you suggest in the opposite order: start out with a language that is actually reasonable to use for creating neat stuff, show them how to create neat stuff, then gradually unroll the layers.

    2. Re:How to teach programming by FrootLoops · · Score: 2

      In one of my CS classes, the instructors made their own cut-down version of assembly and gave us an interpreter written in Java, for cross-platform compatibility I assume.

      I think the parent and grandparent posts are targeting different audiences. The parent is trying to interest people in CS, while the grandparent is dealing with people who are already interested. People who are already interested, realistically, will mostly have computer experience--sometimes very significant experience. Because of that the ground up approach might get a bit pedantic for that audience.

      My CS program followed the sequence (in order) of "let's learn Python!", "let's dabble in Java, Scheme, and basic algorithms!", "now let's get serious and do some C++ with lots of data structures", "go learn about the low-level hardware you've been using", "zoom wayyy out and learn about basic hardcore theoretical cs", "*elective time!*". I'd say it was actually pretty effective. It stimulated interest early for a long trek through more tedious low level material later. Then again, it also showed me how much I don't want programming to be my life's work, and how happy I am to also have a math degree.

    3. Re:How to teach programming by DerekLyons · · Score: 2

      If you follow this approach, your students will have an understanding of the entire abstraction hierarchy, which is not only of immensely practical value, but also underscores the principle that nothing in this field is "magical".

      Those students who don't run screaming into the night or aren't bored into a zombie state, sure. But that won't be many.
       

      The only way we make progress in this field is by the old reductionist approach of breaking a hard problem into smaller parts and attacking each individually. When you teach your students how to do that by demonstrating the power of abstraction, you make them better programmers.

      You won't teach them how to do that with the method you propose - which does the exact opposite, it takes smaller parts and incomprehensibly links them into bigger parts then discards the bigger parts for a new set of smaller parts and repeats the process.

  17. Re:Not too big of a surprise by hardburn · · Score: 2

    b) The leap in the reverse direction, to functional languages, is mostly a simple matter of wrapping blocks in headers and return statements.

    Nay, no, notta. Functional languages make you think completely differently about how the computer operates. Simply wrapping things up like that is how you get spaghetti code. The budding programmer will tend to keep writing this way for a long time. Some never grow out of it.

    If you start in a language with these two attributes, you're already 1 - 2 years into a collegiate computer science degree.

    That's the biggest indictment of CS curriculums I've ever read.

    --
    Not a typewriter
  18. Learning BASIC led me to a CS degree by t'mbert · · Score: 2

    I learned to program in BASIC, on an Apple ][+, back in the early 80's when I was 10 or 11. I loved it, but I started wondering how programs like word processors could access a large document in RAM, and work with files bigger than available memory, and other mysteries...which led me to learn C (with a classic Borland C compiler) at 15, and eventually to a CS degree.

    In my case, BASIC (and I did LOGO too) didn't ruin me, it made me more curious and moved me into the more complex languages. When I got to college, data structures class was a piece of cake, as I'd already done linked lists and other structures while learning C, and I could easily deal with pointers and pointer arithmetic, multiple indirection, function pointers, and more. I feel a debt of gratitude to the humble BASIC language.

    Just a couple weeks ago, I started teaching my son Apple BASIC from a web-based Apple BASIC emulator, hoping that he'll be as excited about programming as I was.

  19. Scratch by gmuslera · · Score: 3, Informative

    When i first saw Scratch, included with the XO, got stunned on how powerful it was, and how visual and intuitivel could be for the children. Not sure if there is a web based implementation, but is open, available for all platforms, and maybe more important, already included in a computer meant for children (not sure how much it count in the rest of the world, but in my country almost all school chidren have it).

    1. Re:Scratch by cacba · · Score: 2

      The android app inventor is web based version of scratch for android.

      Not written from chrome.

    2. Re:Scratch by DrugCheese · · Score: 2

      Yeah me and my son spent countless hours playing around and laughing over the crazy things we were able to do with scratch. Fun to learn programming and foster creativity.

      --
      *DrugCheese rants*
    3. Re:Scratch by Anonymous Coward · · Score: 2, Interesting

      Second this. Scratch IS for the current generation what basic was to us. It is simple enough for a four-year-old to understand (and actually make functional games with), and yet deep enough to do real time ray tracing (for sufficient relaxed definitions of real time). Anyone who has not tried scratch needs to do so. RIGHT NOW. No there is not a web based application, but it does run on LINUX, and features the ability to convert your creation to java and upload them to the scratch website.

  20. Re:BASIC by bmo · · Score: 2, Insightful

    10 INPUT "Who is poster?";A$
    20 IF A$="plover" PRINT $A;" is a jerk" else 30
    30 PRINT A$;" is not a jerk"

    There are literally millions of programmers that cut their teeth on little 16K machines with basic in ROM. It stopped nobody from going on to OO languages. Dykstra was wrong.

    --
    BMO

  21. Re:Use C# by shutdown+-p+now · · Score: 4, Insightful

    C# forces one to think in OOP terms - you can't write a hello world app without "class" in it. Now learning OOP is definitely the important part, but it's not the one that should come first - before that, one has to understand the basic blocks of algorithms. Conditionals, loops, recursion - that kind of thing. A language that lets you deal with those without bringing any unnecessary stuff into picture is the language you want to use for teaching programming. BASIC is one such language. C# is not.

  22. Re:BASIC by iluvcapra · · Score: 2

    Dykstra was wrong.

    I suspect a lot of people, maybe not Dykstra, would point to the failure of Lisps to take hold in the marketplace as evidence that Basic has corrupted minds.

    --
    Don't blame me, I voted for Baltar.
  23. pascal by smash · · Score: 3, Informative

    I've got a big soft spot for pascal. I started wtih basic, and then LOGO (home computer had basic, then logo in school as a kid), but Pascal was the first useful language that actually taught me about data types, functions, and later, object oriented programming (TPv6).

    Its easy to read, not prone to bugs like using = when you mean == (in C), and fast enough to get useful stuff done.

    Problem with programming these days is that to get anything useful done you're buried under a hundred layers of toolkits and abstraction from what is actually going on.

    Give kids an old PC with a copy of DOS, turbo pascal and some basic instructions on VGA mode 0x13 and you can write fun stuff pretty quickly.

    --
    I run: Windows, OS X, Linux, FreeBSD. Just because you have a hammer, doesn't mean everything is a nail.
  24. VB.NET by tepples · · Score: 2

    However the statement that "Programmers who've learnt BASIC tend to be harder to retrain in a modern object oriented language" requires statistical study.

    Is C# "a modern object oriented language"? If so, then there's a dialect of BASIC that requires little or no retraining because it's functionally equivalent to C#, just with different syntax. It's called Visual Basic, and it's part of Microsoft Visual Studio Express.

    1. Re:VB.NET by FrootLoops · · Score: 2

      VB.NET is a dialect of BASIC in much the same way English is a dialect of Old English--that is, the names are similar.

  25. Re:Use C# by togofspookware · · Score: 3, Informative

    I thought he was making fun of reporters when they try to talk about computers.

    --
    Duct tape, XML, democracy: Not doing the job? Use more.
  26. Anyone looked at BASIC since line numbers went? by Invisible+Now · · Score: 3, Insightful

    Line numbers and gosub/goto s haven't been used since the mid80s.

    Ever program with a VBA object model, using Intellisense prompting? Name a better, more complete, and useful IDE environment...

    Count curly brackets all you want. Regard semicolons as essential. But you can't craft code that reads like simple English in any other language. Well named objects only make BASIC better.

    BASIC is like the O'Reilly cover that was chosen for it: A big friendly St. Bernard or a language.

    If you haven't built dozens of useful, maintainable, systems quickly, with small teams, maybe you should keep an open mind...?

    --

    "Knowing everything doesn't help..."

  27. Re:BASIC by Abstrackt · · Score: 3, Funny

    This reminds me of the joke about the programmer who died in the shower: "the shampoo bottle said lather, rinse, repeat".

    --
    They say a little knowledge is a dangerous thing, but it's not one half so bad as a lot of ignorance. - Terry Pratchett
  28. Re:BASIC by bmo · · Score: 5, Insightful

    No, it probably means that most people think procedurally instead of functionally. And while that's just a guess, I'd be willing to bet a case of beer on it.

    It also probably means that most everyday problems are procedural/imperative. I'd be willing to bet a case of beer on that, too.

    The beatings in academia that people get over the head with functional programming turns off a lot of people. Emphasis on functional programming in academia seems like mental masturbation instead of getting shit done. Kinda like what goes on between pure and applied science and math factions.

    "Lisp is superior to everything" - oh hell no. That's like saying a hammer is superior to a screwdriver.

    There is space in the toolbox for all kinds of tools. Not everything is a nail. If a problem can be solved easier in a procedural/imperative language, then use that. Similarly, if a problem can be solved easier in a functional language, by all means, use Lisp.

    But don't tie your brain in knots trying to fit the problem (or the way you think) into the language.

    That's just stupid and masochistic.

    --
    BMO

  29. Re:I completely agree with Edsger W.Dijkstra by kenh · · Score: 2

    Your right, programmers should always work in confined, carefully-constructed environment where there is no possibility of a program getting too large or too confusing - that will certainly prepare them for their first programming job - maintaining legacy spaghetti code, likely written in a "dead" language running on "archaic" hardware...

    --
    Ken
  30. BASIC rocks by Pugwash69 · · Score: 2

    I worked for 11 years writing payroll applications in a version of basic. It powered a significant number of payroll systems in the UK and probably accounts for most people's wage slips even today. Now I write web sites in ASP, running VBScript. BASIC lives and will always have a place.

    --
    Pro Coffee Drinker
  31. Re:Not too big of a surprise by Rockoon · · Score: 2

    Procedural languages turn into a spaghetti mess.

    Then what of OOP? When you get right down to it, OOP is just procedural with a heavy amount of implicit data indirection.

    The original BASIC's were spaghetti 1.0 while anything fully OOP is spaghetti 2.0

    ..and don't even get started on the more complex OOP stuff like polymorphism, because thats spaghetti 3.0.

    --
    "His name was James Damore."
  32. Re:Classic 8-bit micros' ROMs are copyrighted by Rockoon · · Score: 2

    How did the author of AppleWin get the right to redistribute the Apple IIe's copyrighted ROM?

    I don't think that Microsoft protects this copyright.

    (What... you didn't know?)

    --
    "His name was James Damore."
  33. Re:BASIC by bmo · · Score: 2

    As the owner of an HP calc, I have to say that what you say is not really the problem. The problem is and was inertia in the way math is taught. This inertia has led to "one way or the highway" with recommendation by HS math teachers everywhere for the TI-30 and its descendants.

    Couple that with the *much* lower price point of the TI-30 compared to the HP "equivalent" (the 10 and the 15), the choice for a HS student to pick the TI-30 style calc is a no-brainer. The love affair with TI then extends into higher education.

    Thus, millions of people never *ever* consider RPN. It has led to a stranglehold on the academic market by TI over the decades.

    It took me to be out of school to even think of going to HP.

    Personally, I won't go back to algebraic calcs. I even use a HP48 simulator on my desktop instead of the regular calculators that come with Gnome, KDE, or Windows.

    HP has come up with algebraic calcs over the years. They are always inferior.

    YMMV.

    --
    BMO

  34. So by ledow · · Score: 5, Insightful

    So the *BEGINNER'S* All-purpose Symbolic Instruction Code, and a language created exclusively for educational use are great languages for demonstrating and teaching kids how to program? What a shocker. You "surprised" yourselves how/why? By having ridiculous notions that "any idiot" knows how to teach kids better than the experts who set out in the 60's and 70's to EXPRESSLY do just that ?

    You've been suckered by language-purists, people who spend so long arguing about WHICH programming language to write something in that I could have written something in ten languages before they come to any conclusions whatsoever. BASIC is *wonderful* for teaching programming. I know, I've done it, from class-mates back in the 80's to modern-day kids nearly 30 years later. And yet my ENTIRE intake year for university sat through a whole year of Java lectures from a qualified professional and still didn't understand what half the statements they were using actually DID, while I didn't attend a single lecture and passed the course just by emailing in the assignments from home 30 mins before they were due. That's not to make me a genius, I was just taught properly, encouraged to learn, and started with simple tools - I wasn't forced to learn, by rote, a complex tool that requires deep understanding to know what it's actually doing. I started on something I *could* understand and progressed in steps. BASIC didn't corrupt me, it was a stepping stone that I outgrew.

    When you teach a child to write, you don't teach a 2-year-old quill-calligraphy, or demand their first piece in iambic pentameter. You give them a crayon. If it hits the paper 3 times out of 10 you congratulate them. Then you progress to more advanced things as the need requires. But guess what? If you think that's the last time you'll ever write anything with a crayon, you're wrong. If you're still submitting your CV (resume) in orange crayon aged 30, you have a problem (the same as someone routinely programming important code in BASIC at the same level of experience). But neither should you go and hunt down a quill and parchment to scribble the note that says you're out of toilet roll.

    Some people can't understand that BASIC is *excellent* for teaching. It was *designed* that way, and beats 99% of mainstream languages for that. But if your company is still running exclusively off it in 2010, it's a bit like sending out invoices in crayon. However, even in a modern office, sometimes you just need a tool for a small, simple job and sometimes BASIC works fine there (in the same way that scribbling "pay the caterers" in crayon on a post-it is perfectly acceptable as an aide-memoire). There are schools that, without a bit of BASIC, or shell-script, or DOS batch file, etc. wouldn't be filing their accounts, or importing the new student-intake data each year, I know that. When the job is once-a-year, with changing requirements, with specific needs, with various "mental hacks" that have to be applied anyway (i.e. "we need to drop column X this year if column Y is less than 20 because that old law no longer applies"), and needs to be done quickly it can happen in any language you like.

    I have taught BASIC only a year or so ago, to a top-class prep-school student, in a single one-to-one session, in a single afternoon. That was from *zero* programming knowledge (but a keen mind), exclusively on paper and the next day they were writing (working) games and hadn't required a single extra tool, library, download, reference or command-lookup - we ran them through QBASIC to see them in action but they worked perfectly. I have also spent several HOURS trying to clean up a single function written by a top-class MSc CS-student that had only ever been exposed to Java in order to find out WHICH of the several dozen syntax errors, scoping errors, operator-precedence errors, etc. was actually the main cause of their function returning junk. I could have taught them a whole programming language AND done the same job quicker than I could teach them to d

    1. Re:So by javabandit · · Score: 2

      I wish I had mod points. GREAT post. The analogy of teaching a child to write is spot on. Excellent post.

  35. Right tool for the job by Weaselmancer · · Score: 4, Insightful

    No, it's a worthwhile comment. He could have phrased it more diplomatically but it is a useful thing to know.

    C, C++, C#, Java, Ruby, Python, assembly... - these languages and all others are tools. They go in the toolbox and are brought out as needed. Each does something better than the others.

    Were I to write a VM I would use C as well. A good way to think of C is "user friendly assembly". This is an excellent language to use for an interpreter. For a VM you want SPEED. So you need something with as little baggage as possible. It must be fast, and C has that going for it. After primary compilation it creates asm files. So why not go straight to assembly? A VM is complex. For something huge and complex ASM is a little too fine grained. You want C. So C was used. Best tool for the job.

    Writing a gigantic user space application? C may not be your best bet. A lot of those types of programs spend a lot of time just sitting there waiting for input. You may not need anything that optimized. A big fat high level object oriented language can be a better pick. That's where Java/C# shine. You can do a lot with the fat libraries that go along for the ride. The UI creation is simple. Lots of bang for the buck.

    Match tool to task and you'll make better software.

    --
    Weaselmancer
    rediculous.
  36. Re:Use C# by shutdown+-p+now · · Score: 2

    Agreed, but I think Python is even better for that purpose - less things to deal with. And it has a decent turtle graphics library, which is a very good learning aid.

  37. Re:BASIC by plover · · Score: 2

    I think you proved my point eloquently.

    --
    John
  38. Re:Use C# by kthreadd · · Score: 5, Insightful

    And you avoid learning GOTO. I don't care how easy it makes initial learning, it's building bad habits that you're going to spend years killing.

    Now what's wrong with goto? It's a perfectly valid statement when used appropriately, just like any other statement. What's wrong is this old dogma that tell young people to not think for themselves and instead just repeat what everyone else says.

  39. Re:Clubcompy is sort of cute... by kthreadd · · Score: 2

    Modern versions of Basic have those. You know, Basic has also evolved just like many other programming languages.

  40. Re:Use C# by shutdown+-p+now · · Score: 2

    Python treats whitespace as syntax.

    Yes, and that's one of its stronger side. Using whitespace to delimit blocks of code is very natural to someone with no programming background.

    That was demonstrated to be absolutely stupid 30 years ago.

    It was?

    At least the FORTRAN fucks had an excuse with punchcards

    The way FORTRAN used significant whitespace has nothing in common with the way Python uses it, except for the fact that it's significant.

    No offense, but take a breath

    Judging by the overall tone of your post, you should really take your own advice.

  41. Don't equate BASIC and Logo by laird · · Score: 3

    I'd agree that interpreted languages (with BASIC and Logo being examples) are great for programming. The edit/compile/run cycle causes too much friction, discouraging kids from experimenting.

    But having taught hundreds of kids programming, there's a huge difference between BASIC and Logo. Logo is a simple but powerful language that teaches kids how to express what they want to a computer. BASIC is a complicated but limited language that mainly confuses kids and teaches them loads of incorrect beliefs that make it hard for them to eventually learn to express themselves clearly. Certainly starting with BASIC can be recovered from (Dykstra was being overly dramatic) but I would advocate doing that to anyone on purpose.

    Of the introductory languages that I've taught, I think that Logo was the best introduction, because it's the simplest, most natural syntax, with the ability to easily generate graphics that engage students. And while most people don't notice, Logo is a fully expressive programming language.

    For comparable, but more modern languages that are good for introducing kids to programming, there is Scratch (http://scratch.mit.edu/), which is friendly and interpreted and visual. Also free and open source.

    Reading the ClubCompy web site, they built something that is intended to be simple for kids to experiment, with no install, and thus is a "computer" interpreted in JavaScript. This seems like a nice idea. No real connection to BASIC or Logo, other than they want to achieve the simplicity and openness to experimentation that those languages represent. After giving it a look over, I like the fact that their language based on LOGO, but am not thrilled that they added LINE NUMBERS. I can't believe that it's a good idea to make kids learn about line numbers, with all of the associated complexity, rather than to use a simple text editor. The only reason that line numbers ever made sense is that back in the era when BASIC was invented, you couldn't assume a text editor, or even the ability to move a cursor on the screen (remember working on printing terminals?). But I think that limitation no longer applies. So while I like their goal quite a bit, I have a feeling that they would have been better off sticking with an existing simple language, such as python, lua, or even Logo.

  42. Re:MOD PARENT UP by EvanED · · Score: 2

    Saying that the smartest programmers you know "are the ones who know their low-level stuff" is not a very supportive reason for that sequence of teaching. All it says is that, when all is said and done, they had learned those things at some point. Did they start there? Did they end there? Who knows? Did they know those things because they actually had the interest to learn them for the same reasons that they are the best programmers you know? Is there, in fact, not really a causal relation at all?

  43. Re:Use C# by SanityInAnarchy · · Score: 2

    I actually did think for myself when I rejected GOTO. I actually went back and read the "GOTO considered harmful" essay.

    Can you provide an example of when goto is appropriate -- in particular, when it's appropriate to use a goto rather than actually structured programming, or even a safer option like break, return, or throw?

    --
    Don't thank God, thank a doctor!
  44. Re:Use C# by smash · · Score: 2

    The thing is, BASIC encourages use of GOTO, rather than being an unusual thing to use when unusual circumstances call for it. If they call for it.

    Using goto everywhere creates code that rapidly becomes an unreadable, unmaintainable mess for anyone else trying to follow it.

    --
    I run: Windows, OS X, Linux, FreeBSD. Just because you have a hammer, doesn't mean everything is a nail.
  45. Re:Use C# by serviscope_minor · · Score: 2

    And you avoid learning GOTO.

    What the hell is it with the BASIC detractors just making stuff up? BASICS with full structure have been available since 1982. That's 29 years ago. Seriously, loose the mullet and the walkman and join the present day.

    --
    SJW n. One who posts facts.
  46. Re:Use C# by digitig · · Score: 2

    Yeah, ideologically Python is all wrong and should be terrible. Trouble is, when you actually come to use it, it's great. So religiously you're right, scientifically the post you replied to is right. Evidence beats dogma.

    --
    Quidnam Latine loqui modo coepi?
  47. Re:BASIC by digitig · · Score: 2

    Editors are for wimps. Real programmers use Hollerith cards.

    --
    Quidnam Latine loqui modo coepi?
  48. Re:Use C# by BeanThere · · Score: 3, Informative

    And you avoid learning GOTO. I don't care how easy it makes initial learning, it's building bad habits that you're going to spend years killing.

    This is a common criticism - that you will spend 'years' killing the 'bad habits' you learned from using GOTO. I don't buy it. When I learned programming (on BASIC, back then, as a kid, that was 'the' language to learn on), and I progressed from GOTO's to subroutines, it didn't take me "years" to undo the "bad habit". On the contrary, the moment that I understood I had a better tool for so many jobs, I immediately started using that instead. Why would a programmer keep using a tool if it's much worse for the job? It just doesn't really happen. As soon as your programs get longer than a few hundred lines, or you want to start re-using code, you need something better than GOTO anyway ... it's really only useful on a very small scale, it is naturally self-limiting in use.

    Also, I think GOTO's have one advantage for a learning language aimed at small children: It's easier for a child to learn and understand, as a building block / stepping stone toward more complex things. For some reason, I even remember this learning process (using basic, that was popular then) when I was a small child, on our 48K ZX Spectrum ... GOTO's were easy and obvious, but I recall seeing these weird GOSUB things that seemed more abstract somehow. But, once they were explained to me, it wasn't that bad.

    Finally, any good programmer needs to do significant amounts of assembler at some point in his life, and you're gonna be doing lots of JMP's there anyway, and yet nobody considers that 'learning bad habits', because most people agree that learning assembler makes you a better high-level coder too, and there are reasons for that.

    The criticisms against GOTO are largely exaggerated.

    I have spent probably years cleaning up and maintaining other peoples really bad code. And yet, of all the horrors in the code I had to maintain, I don't recall once ever encountering a "GOTO problem" in the real world, where any programmer had made a big mess because they had learned GOTO's. Never. I've never seen it, and I wonder if anyone here has actually seen this mythical disaster that learning GOTO's supposedly leads to. There are many other bad habits that cause FAR more damage in real-world programming, and yet nobody even cares to teach those in formal Comp Sci or Engineering programs.

  49. Re:BASIC by ta+bu+shi+da+yu · · Score: 2

    OO has, time and time again, led to more bloat and more confusion due to so much abstraction rather than direct commands. Want to reuse code, here's a thought, use copy/paste. Having to find objects and then discover their methods is a waste of time, a rich api with built-in ready to run statements and functions that only require simple plug-in values is the way to go.

    Oh that's right. Copying and pasting is FAR more efficient. Cause when you find a bug in the original code, there's nothing easier than locating all the spots where you copied and pasted that code to make similar modifications.

    --
    XML is like violence. If it doesn't solve the problem, use more.
  50. Re:Use C# by Glonoinha · · Score: 2

    When the language is designed to have code run primarily in a linear fashion and doesn't (generally) nest the code into more than one layer deep, then a conditional GOTO is just the ticket for flow control. It's not 'harmful' any more than a hammer is 'harmful' - give either to a ten year old boy and he's going to make a mess, but used in proper context neither is particularly bad.

    The funny thing is - all the GOTO bashing by the same people that salivate at the opportunity to throw random exceptions in their code, have them bubble up the call stack and get caught three calls up the stack. Guess what folks : that's the most gnarly and evil reincarnation of the GOTO most of us seasoned professionals have ever seen.

    As for why BASIC is such a good beginners language - it has nothing to do with any of the above. It's about instant gratification - when newbies don't know the first thing about what makes a computer tick, being able to copy-type a few lines of text from a book and run it, then start tweaking it and seeing what the changes do - THAT is what hooks the new developer and gets his mind working. All this talk about OOP and high level languages - just scares them off. Get the fundamentals (the way, way low level fundamentals like what a variable is, that it holds a value, that the values can be changed and displayed on the screen, that you can do math on the variables) out of the way first - like showing a kid how to hold a hammer, that you only use it to hit nails on the head to drive them into wood, how the nails hold pieces of wood together - and BASIC is perfect for demonstrating those concepts without all the infrastructure surrounding bigger languages.

    (And I can't believe I just defended the use of GOTO. Damn.)

    --
    Glonoinha the MebiByte Slayer
  51. Re:Use C# by The+End+Of+Days · · Score: 2

    Javascript

    It has a simple syntax, supports a number of paradigms, and practically everyone has an interpreter for it already installed. It also has a simple, robust UI framework in that interpreter.

  52. Re:BASIC by cfulton · · Score: 2

    You either have never used OO correctly or don't know what you are talking about. Copy and Paste to reuse code is the worst possible idea. You simply spread maintenance work and bugs through out your code base. Good OO lowers line count, maintenance time/cost and bugs. Bad OO like bad anything can be bloated and the ruination of a project. Modern IDEs and documentation tools allow you to find object and discover methods quickly and as you code. (Think CTRL-SPACE). Large systems with many developers cannot be built in the simple way you suggest. Some larger form of design and control is needed. It does not "need" to be OO but, OO can provide the necessary structure.

    --
    No sigs in BETA. Beta SUCKS.