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."
Can't get there from here (Score:4, Funny)
There is still the theory that once you teach someone basic it becomes impossible to teach them programming. /running and ducking...
Re: (Score:2)
Re: (Score:3)
Re: (Score:3)
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 co
Re: (Score:2, Insightful)
This theory is easy to prove false with a counter-example. Me.
Re: (Score:3)
Re: (Score:3)
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.
VB.NET (Score:3)
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.
Re:Can't get there from here (Score:5, Insightful)
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.
Re:Can't get there from here (Score:5, 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?
Re: (Score:2)
Re: (Score:2)
Try Python. It's the only language I can think of that's similarly easy -- namely you can accomplish anything you want with zero fluff. If you want to, you can write in pure procedural style without creating a single class of your own. It'd be easy to transplant your QBasic knowledge into Python, and then learn more tricks (object orientation, functional programming features, iterators and generators, etc).
Re: (Score:2)
QBasic is the only programming language I failed. It was also my first. I couldn't figure out the damn QBasic for dummies Book. It made absolutely no sense to me what was going on. But it may have also been my age.
Re: (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 interpr
Re: (Score:2)
There is still the theory that once you teach someone basic it becomes impossible to teach them programming. /running and ducking...
Know the difference between Theory and Hypothesis...
http://lmgtfy.com/?q=theory&l=1 [lmgtfy.com]
Re: (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
Re: (Score:2)
Basic is fine if you're just wanting to quickly introduce it, but anything beyond that is just going to convince them to go to arts college.
Re: (Score:3)
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.
Re: (Score:3)
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.
Re: (Score:2, Funny)
Basic is fine if you're just wanting to quickly introduce it, but anything beyond that is just going to convince them to go to arts college.
10 REM ARTS COLLEGE
20 PRINT "HELLO WORLD"
30 GOTO 10
Re: (Score:3)
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 p
Python vs. BASIC (Score:4, Informative)
I learned to program pretty much with Applesoft BASIC and a Franklin Ace 1000 manual [ironicsans.com]
Now I'm teaching my mom (!) to program in Python using the Hello World [amazon.com] 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...)
Re: (Score:2)
Re: (Score:3)
Why do I suddenly imagine Optimus Prime holding his cargo trailer over his head and running..
Re:Python vs. BASIC (Score:4, Interesting)
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. :)
Re: (Score:3)
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.
Re: (Score:3)
Re: (Score:2)
Writing a program to renumber your programs is an excellent early programming exercise.
BASIC Programmers Never Die... (Score:5, Funny)
...They GOSUB and don't RETURN.
Re:BASIC Programmers Never Die... (Score:4, Funny)
yeah but (Score:5, Insightful)
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'
Re:yeah but (Score:4, Funny)
work with what you've got (Score:2)
Looking back, BASIC may have been the most available language available on ROM at that time, so that's what folks used (despite that it supposedly 'mutilates the mind beyond recovery' according to Dijkstra http://en.wikiquote.org/wiki/Edsger_Dijkstra [wikiquote.org] ).
I think now, javascript would have that advantage since it comes with the browser (and firefox is particular
Comment removed (Score:5, Funny)
Slashvertizement (Score:3, 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.
Why Not Python? (Score:2)
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.
If I were trying to teach motivated ten year olds in person, I might choose Python/pygame as well.
That's not our goal, though. We're trying to help motivated eight year olds discover the joy of programming as a means of
Yes, Python :) (Score:3)
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 [syntensity.com] - 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 ele
Re:Slashvertizement (Score:5, Funny)
I came for infotainment but was disappointed to find an edutizement
Teach Python instead (Score:2)
Programming should begin with OO - yes really! (Score:3)
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.
Re:Programming should begin with OO - yes really! (Score:5, 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.
Re: (Score:3)
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.
Is it 1994 again? (Score:2)
BASIC? Really? In 2010 someone is making products with BASIC?!?!?! This has to be for legacy supp... wait you say it isn't? WHAT THE FUCK!!!
Please do your students a favor and use Python.
Microcomputers grew up with us. (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.
Re: (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.
Re: (Score:3)
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.
Re: (Score:3)
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?)
Re: (Score:3)
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/
Re: (Score:3)
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.
Re: (Score:3)
They can still program (RISC) microcontrollers in C/assembly. It's much nicer than x86. You can get one for $25 (AVR Butterfly).
Re: (Score:3)
I rather like The Elements of Computing Systms [idc.ac.il] as an educational tool, you build a computer in an emulator.
Teaching Kids Programming Considered Harmful (Score:2)
Teach them math and language skills. These are the fundamentals of programming and it is a waste of time to teach programming until these foundations are in place.
Re: (Score:2)
sys 64738, peek, & poke won't work but GOTO wo (Score:2)
If you are new to basic try this little program...
10 ? 'HELLO WORLD'
20 GOTO 10
Re: (Score:2)
loop while( true )
screen.print( "Hello World" );
Re: (Score:2)
Looks like that is on the to be implemented list as well, but GOTO works
"How can we teach kids how to program?" (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.
I completely agree with Edsger W.Dijkstra (Score:2)
"It is practically impossible to teach good programming to students that have had a prior exposure to BASIC: as potential programmers they are mentally mutilated beyond hope of regeneration."
- Edsger W.Dijkstra
There might be hope for subjects that started using "gosub" without ever using "goto" but I have never seen anyone having done that.
But then again IMHO today's html/javascript is one form of modern spaghetti code too so maybe BASIC should be taught because of that.
Re:I completely agree with Edsger W.Dijkstra (Score:5, 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.
Re: (Score:2)
Re: (Score:3)
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...
"computer programming" is not "logic" (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.
How to teach programming (Score:5, 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 [wikimedia.org] 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.
Re: (Score:3)
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.
Re: (Score:3)
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 t
Scratch (Score:4, Informative)
Re: (Score:3)
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.
pascal (Score:4, 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.
Anyone looked at BASIC since line numbers went? (Score:4, 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...?
So (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
Re: (Score:3)
I wish I had mod points. GREAT post. The analogy of teaching a child to write is spot on. Excellent post.
Don't equate BASIC and Logo (Score:4)
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.
Re:BASIC (Score:5, Funny)
10 print "hello"
20 goto 10
This is why we can't have nice things.
Re: (Score:2)
Re: (Score:3, 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
Re: (Score:3)
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.
Re:BASIC (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
Re: (Score:3)
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 locat
Re: (Score:3)
Re: (Score:3)
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 hi
Re: (Score:3)
I think you proved my point eloquently.
Re:BASIC (Score:4, Funny)
Re: (Score:3)
Re: (Score:3)
Dear FBI, please stop by sometime later this week. As you can see, I am at home at 7:12pm CST. Thanks!
FTFY
Re: (Score:2)
You left out the important part.
WHY do you think Basic is a terrible choice for learning to program, and WHY is Scheme better?
Re: (Score:3)
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.
Re: (Score:3)
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.
..and don't even get started on the more complex OOP stuff like polymorphism, because thats spaghetti 3.0.
The original BASIC's were spaghetti 1.0 while anything fully OOP is spaghetti 2.0
Re:Use C# (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.
Re: (Score:3)
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.
Re: (Score:3)
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.
Re: (Score:3)
Re:Use C# (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.
Re: (Score:3)
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?
Re: (Score:3)
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 the
Re: (Score:3)
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.
Re: (Score:3)
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.
Re:Use C# (Score:4, 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.
Re: (Score:3, Informative)
I thought he was making fun of reporters when they try to talk about computers.
Right tool for the job (Score:5, 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.
Re: (Score:3)
Modern versions of Basic have those. You know, Basic has also evolved just like many other programming languages.