Follow Slashdot blog updates by subscribing to our blog RSS feed

 



Forgot your password?
typodupeerror
×
Education Programming

Why Teach Programming With BASIC? 709

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."
This discussion has been archived. No new comments can be posted.

Why Teach Programming With BASIC?

Comments Filter:
  • yeah but (Score:5, Insightful)

    by hguorbray ( 967940 ) on Tuesday December 28, 2010 @09:16PM (#34693792)
    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'
  • by Anonymous Coward on Tuesday December 28, 2010 @09:18PM (#34693818)

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

  • Slashvertizement (Score:3, Insightful)

    by SoftwareArtist ( 1472499 ) on Tuesday December 28, 2010 @09:25PM (#34693872)

    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.

  • by hcs_$reboot ( 1536101 ) on Tuesday December 28, 2010 @09:28PM (#34693906)
    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.
  • by ZorinLynx ( 31751 ) on Tuesday December 28, 2010 @09:29PM (#34693916) Homepage

    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.

  • by rbrander ( 73222 ) on Tuesday December 28, 2010 @09:53PM (#34694090) Homepage

    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.

  • by volkerdi ( 9854 ) on Tuesday December 28, 2010 @09:54PM (#34694098)

    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.

  • Re:BASIC (Score:3, Insightful)

    by bmo ( 77928 ) on Tuesday December 28, 2010 @10:17PM (#34694310)

    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

  • Re:Use C# (Score:4, Insightful)

    by shutdown -p now ( 807394 ) on Tuesday December 28, 2010 @10:20PM (#34694338) Journal

    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.

  • by Invisible Now ( 525401 ) on Tuesday December 28, 2010 @10:47PM (#34694528)

    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...?

  • Re:BASIC (Score:5, Insightful)

    by bmo ( 77928 ) on Tuesday December 28, 2010 @10:53PM (#34694570)

    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

  • So (Score:5, Insightful)

    by ledow ( 319597 ) on Tuesday December 28, 2010 @11:54PM (#34694904) Homepage

    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

  • by Weaselmancer ( 533834 ) on Tuesday December 28, 2010 @11:57PM (#34694916)

    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.

  • Re:Use C# (Score:5, Insightful)

    by kthreadd ( 1558445 ) on Wednesday December 29, 2010 @01:24AM (#34695492)

    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.

All great discoveries are made by mistake. -- Young

Working...