Wednesday, March 10, 2010

The Value of BASIC As a First Programming Language

http://developers.slashdot.org/story/10/03/10/0348241/The-Value-of-BASIC-As-a-First-Programming-Language?art_pos=24
"Computer-science legend Edsger W. Dijkstra famously wrote: 'It is practically impossible to teach good programming to students that have had a prior exposure to BASIC: as potential programmers they are mentally mutilated beyond hope of regeneration.' The Reinvigorated Programmer argues that the world is full of excellent programmers who cut their teeth on BASIC, and suggests it could even be because they started out with BASIC."

Blind hatred of anything is usually a bad thing.  A common question is, what is the best first programming language for someone to learn?  I say it depends on who is learning.  If someone is learning how to program because they intend to become a professional programmer, then I'd have to say C or Perl would be the best place to start.  In fact I'd argue anyone aiming to professionally program should learn them regardless of what they eventually plan to use.  They both lay the ground work for their respective types of language.  However, not everyone that learns to program will ever do it professionally; in fact, most won't.  The hatred of BASIC and GOTOs comes from professional programmers that have to maintain code that was horribly written.  It makes sense they would grow to hate BASIC for making it so easy to self teach programming (and along with it these bad habits)

But at the end of the day professional programmers don't rule the world, and our every choice isn't done so as to make life most convenient to them.  The ability to make simple quick and easy programs to automate tasks is an invaluable skill.  I have never, and likely never will, had a job that required professional programming.  Yet, programming has saved me countless hours automating tasks that others did by hand.  The ability to manipulate large chunks of data in minutes or hours instead of days or weeks is simply beyond description.  I don't think I can overstate just how great of a skill basic programming is for anyone that uses a computer; it borders on magic.

The key about BASIC is that it is simply so easy to learn.  Anyone with a basic understanding of algebra, a bit of patience and curiosity, and some intelligence can go from not knowing what programming is, to making useful programs in a week of free time.  Read some QBASIC code; it reads like English.  There are almost no characters you wouldn't see in math or English.

Now I realize that few people know if they will be professionally programming later on in life when they first learn to program.  However, it doesn't matter.  Later when it becomes clear that they want to do that as a career they can start to learn a real language.  If they are unable to unlearn what they picked up in BASIC and relearn what is needed then they likely wouldn't have been a good programmer regardless of first language.  I'll admit that it may add some extra work to the learning, but I'll argue that it is worth it for the ease with which people can learn to program for personal use.

1 comment: