views:

523

answers:

18

I just came across a new BASIC implementation for Google Android application called Simple. You can read about it here:

http://google-opensource.blogspot.com/2009/07/programming-made-simple.html

Clearly, a lot of time and effort has been recently put into enabling this functionality for Android.

Should the software industry continue to encourage non-programmers into learning BASIC, or are modern languages like C#, Python, Ruby more appropriate at this time?

+7  A: 

I don't see any reason for continuing with BASIC. The original BASIC was good because it was a very lightweight language with a minimum amount of constructs consistent with capabilities of machines of the time. It also had built-in graphics primitives, which are a good way to "get something interesting done quickly", and are very useful teaching tools.

Modern BASIC is much more complex, and its syntax is significantly more bloated, and new additions are more often than not inconsistent with core of the language (or, if you prefer to look at it the other way, the core of the language is outdated compared to new constructs that are slapped on top of that).

I believe that today, Python covers all teaching ground that BASIC ever did. And its turtle module is good enough to provide the basic teaching graphics.

Pavel Minaev
+1: Ditch basic. Move to Python -- it's simpler.
S.Lott
Not all modern Basics are "Bloated." Some of them cling to one of the advantages that earlier BASIC had. The ability to run in a extremely small footprint.
NoMoreZealots
I referred to "bloated syntax", not to "bloated execution speed". I know there are plenty fast BASIC implementations out there (e.g. PowerBASIC). But the syntax is still a mess of legacy constructs with bits and pieces retrofitted from more modern languages in a very ad-hoc fashion.
Pavel Minaev
Bloated syntax is replaced with bloated library in python. import why.would.this.be.easier.to.teach.foo.* as obtuseNonstandardName? Something that people like us take for granted, like wildcards and aliasing are NOT good ideas for beginners because initially they won't understand and they will just copy. Not to mention, I knew people who had a hard time grasping ARRAYS in COLLEGE, list are great once they've GROKed data structures, but not for a beginner. White space as scope is fraut with dangers for an undeciplined programmer.
NoMoreZealots
+9  A: 

I think Basic is a very fine language for non-programmers. You are saying that Python, Ruby and C# are easy ?! really ?!

I don't think that a non-programmer would care about reflection for example. These languages boost the productivity of a programmer. For a non-programmer they are nightmares! With tons of concepts.

I know a lot of friends who learned QBasic in high school very easily and did some really cool stuff with it.

So, yes Basic or its modern descendants are very fine for non-programmers. I find SmallBasic very interesting :)

AraK
One doesn't need to understand, or even be taught, reflection, in order to learn C#. Normally, you'd teach a person some limited subset of a language that is most suitable for their level of understanding. Similarly to how you wouldn't teach a newbie about `PEEK`/`POKE`, or `CALL INTERRUPT`, or the details of image format used by `GET` and `PUT`, in QBASIC.
Pavel Minaev
What I am emphasizing is that, C#, Ruby and Python are easier for a programmer to learn. SmallBasic for example is easier for a hobbyist to learn and do *cooler* stuff with it than Python or Ruby.
AraK
Can you give any _specific_ examples (i.e. analysis of features or language concepts) of how and why SmallBasic is easier for a hobbyist to learn compared to Python?
Pavel Minaev
Hey, I peeked and poked on an Apple IIe my first day of programming in 9th grade (1981). Nobody got hurt.
MusiGenesis
Take a look at Getting Started Guide and compare it to that of Python. The IDE of SmallBasic is much more friendlier for a non-programmer than installing CPython! the list goes on :)
AraK
"The IDE of SmallBasic is much more friendlier for a non-programmer than installing CPython" What? Python is pre-installed on everything except Windows. And Windows has an MSI that's trivial to use.
S.Lott
I learned Basic while I was in elementary school, Libraries are more confusing for a 11 or 12 year old than line numbers. Anyone who's had homework can understand numbered statements. 'Good ol Boy' Basic on those old 6502 based machines gave me a more concrete understanding of what happens when you read/write a HW register, via a PEEK/POKE, than any theoretical BS I learned in college. Which served me well cause the FIRST job I got out of college was writting a device driver. Non of class mates could have done it based on their classes.
NoMoreZealots
@Pavel - I don't think a new user would ever need to use a peek or poke with a modern BASIC implementation, but I may be wrong.
Jess
+3  A: 

The language is nowhere near as important as the concepts. Variables, data structures, conditional statements, looping. The language is a tool, a means to understand programs and programming. I'd bet that people here first learned to program in one of maybe a dozen different languages; in half those cases I doubt they write anything in said language any more.

So, sure. BASIC. LOGO. Python. Pascal. C. Java. Assembly. Once you know how to do it in one language, it's so much easier to translate that thinking to other languages, to expand the breadth and depth of languages and of programming styles and methodologies.

Joe
+4  A: 

Speaking as a 14-year veteran of Visual Basic (going back to VB3): hell no. There are lots of other languages out there that are just as easy for beginners and non-programmers to learn, and they have the advantage of transitioning nicely to more powerful languages.

It's not that BASIC is all that horrible; it's just that some things should be allowed to die.

MusiGenesis
Visual Basic is really nothing like BASIC. :)
Bob Somers
I agree. I have used every version of VB. Before that Powerbasic, Quckbasic, Amiga Basic and Spectrum Basic. Now I just do C#.R.I.P. BASIC
FlappySocks
The Basic Stamp uses hardware that can't run Java, Python or even Lau. It lets kids play with real hardware in way thats not practical, on "More enlightened" languages.
NoMoreZealots
I've changed my mind. We should keep BASIC around for the same reason we keep the Amish around: if civilization collapses, we'll still be able to code.
MusiGenesis
@Bob: um, I think VB is at least a little bit like BASIC. :)
MusiGenesis
As someone who programmed in BASIC for years, VB looks nothing like BASIC to me. It looks like an overly-busy Pascal.
Nosredna
The trouble with talking about BASIC is that some people are talking about oldskool BASIC and others are talking about Structured Basic.
Nosredna
+1 to Nosredna, later versions of VB really owe more heritage to Pascal than they do to BASIC. True BASIC does not have functions, typed variables etc. (I learned to program in BASIC on the Apple II and Commodore.)
Nate C-K
A: 

Alice is a great language for beginners, particularly children.

For adults, functional languages have surprising results. F#, having good support, is a good call.

Visual Basic is not bad, and is widely supported. Being able to do stuff in Excel is a plus for many adults.

If the person intends to become a programmer, and is not a children, I recommend Scala. It has both functional and object oriented paradigms, well balanced, and has a good support structure.

Daniel
Scala as a beginner language? I don't think that's a good starting point. In fact, I don't think that any language in which you have to write `class` or `object` to write a basic "Hello, world!" type application is a good starting point.
Pavel Minaev
Well, you don't: http://paste.pocoo.org/show/131244/. Or the version on a batch file: http://paste.pocoo.org/show/131245/.
Daniel
Or just plain put that line inside a file and run it with scala hellowworld.scala. No object, no class.
Daniel
The nice thing about VB.NET or VBA for adults is that you can immediately see results. Creating a calendar, todo list, recipe tracker, or similar app in the first days of learning is pretty rewarding for a new developer.
Jess
+2  A: 

Not that many acknowledge it but there are more microcontrollers sold anually than x86s. I'm not sure about usb mice, but a common implemntations PS2 mice and keyboards both was use an 8 bit micro. If for no other reason than it would be rather silly to put a quad-core pentium in a system that could make due with a part that cost less than a $1. So the application languages running on resource limited systems still exist. Products like the "Basic Stamp" provide a platform for young perspective engineers to experiment with. Basic is nice on these platforms due to the fact you can ROM basic and run a token stream on a system less than 1 k of ram, which is common for products from the company Microchip, manufacture or the PIC microcontrollor family.

Edit: Other than that, I learned BASIC in elementary school. I really don't buy that I would have grasped Python's dependancy on libraries at that age.

NoMoreZealots
This is an interesting point. I suspect that something like the Apple ][ (or equivalent) could be essentially built for about $10, and kids could program on it. Now, this isn't a great deal for someone with a modern computer, but for children in cash-starved school districts this could be a huge win...a programmable computer for the price of a textbook.
Beska
There are single chip microcontrollers out there that have 64K built in and run anywhere from 8 to 100MHz. Those things blow away the 8-bitters I grew up with! It's like an Apple II on steroids!One of the local middle schools here is doing a robotics competition. The robot is based on the Basic Stamp II from Parallax. I just wish we had a more encompassing curriculum. It's a nice hands on project for kids.
NoMoreZealots
+3  A: 

Many middle schools and high schools use unstructured basic to programming. These languages (basicA, basicQ) are out of date and focus on programming concepts and modes of thinking which are no longer used. For instance unstructured basic makes use of GOTO statements.

I'd recommend logo for teaching kids as it is designed to keep them interested while teaching them important concepts.

  • It has a turtle that they can move around. This can be very helpful to get kids doing for loops and functions
  • It has be easily used with simple robotics (the turtle can be a robot turtle)
  • There are many books for teaching to very young children.

Pete Eddy made an excellent point in the comments that:

"The key is to include "enough" functionality in the language, that they don't need to do things like: "import Blah.foo.bar.and.the.kitchen.sink.* as somethingDifferentEVERYTIME;" because that's just ugly stupid to explain to someone at an age they SHOULD be learning the basics of programming."

e5
What? Modes of thinking which are no longer used? Basic algorithm constructs such Loops, flow control and variables? Regardless of the design methodology these concepts are still relevent. Abstraction and reuse weren't invented with OOP, they were concepts that were taught when plain old PASCAL was still used to teach computer science. And OO concepts can be implemented in non object oriented langauges. Many early C++ compilers were just pre-processors. Ultimately all other concepts get layered on a non-object-oriented, non-dynamic, non-reflective, non-insert-bussword processor.
NoMoreZealots
The use of GOTO's and flow control based on line numbers is not a useful thing to teach. Furthermore using whitespace to scope is probably a bad idea in a language for learners.
e5
Goto aren't needed on a modern basic. The whole issue dijkstra had with them was you could do the same thing with while statements and proper block statements in "if else" statements. Those aren't really a problem in a modern basic. The key is to include "enough" functionality in the language, that they don't need to do things like: "import Blah.foo.bar.and.the.kitchen.sink.* as somethingDifferentEVERYTIME;" because that's just ugly stupid to explain to someone at an age they SHOULD be learning the basics of programming.
NoMoreZealots
@Pete Eddy, +1 I agree completely, especially in regards to teaching without fancy specific libraries! Unfortunately modern basic is not always/often taught. Many highschool/middleschool level introduction to programming classes, use basicA basicQ. Goto's are a problem in basicA basicQ. Sorry about the confusion, edited my post to reflect the fact that I am talking about unstructured basic.
e5
No problem. When it basicA I doubt modern school would teach it any more. Is that even still available? Even in your mid 20s it been a long time since you were in 6th grade.
NoMoreZealots
Isn't there a Python turtle program now? I remember going to a kid's computer camp when I was in 2nd grade. It ended up being in LOGO, which was a huge disappointment (I was starting to pick up C64 Assembler at the time). After a whole week, the most complex thing we did was create a symmetrical flower with that dang turtle. I was ready to pull my hair out.
Jess
http://ianbicking.org/docs/PyLogo_lightning.html
e5
+2  A: 

Non-programmers should try Lua or DrScheme. Since the 1960's, we have learned a thing or two about teaching programming to non-programmers and other beginners.

Norman Ramsey
+1  A: 

"The software industry" doesn't encourage BASIC, and hasn't for a long time. Do you hear anyone demanding that BASIC be put back into ROM on new computers?

Just because someone implements a BASIC for a system doesn't mean that "the software industry" is planning a new crop of BASIC programmers. Just about all languages get ported to just about every platform.

However, there are now and will be many, many jobs for VB (and COBOL, for that matter) legacy maintenance. As long as there is money in it, people will need to learn it. As long as there are parents who learned BASIC as a child, some will want the experience of sitting down with their kids and passing that along. I see no harm and no foul here. For the kids, BASIC lost a long time ago. There are a dozen or more popular languages vying for attention.

Nosredna
+2  A: 

I think of the company advertising "Thought Processors" or the college pretending that learning BASIC suffices or at least helps, whereas the teaching of BASIC should be rated as a criminal offence: it mutilates the mind beyond recovery.

--Edsger Dijkstra at the ACM 1984 South Central Region Conference

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 Dijkstra, How do we tell truths that might hurt? (1975)

Dijkstra knew a lot more than I do, so I'll take his word for it.

R. Bemrose
Of course, those quotes are from the time before Basic turned itself into Pascal. :-)
Nosredna
Dijkstra was being puckish, I'm sure, and BASIC *did* turn into Pascal over the years, which was always geared towards teaching programming.
Rob Perkins
+1  A: 

Personally, I think BASIC feels more natural to a kid or someone else just starting out. BASIC can easily be learned by a 6 year old (or at least I thought so at the time).

Here's a quick comparison ... tell me which feels more natural:

Python:
a = 0
while a < 10:
    a = a + 1
    print a

Basic:
a = 0
do while a < 100
    a = a + 1
    print a
loop

I might be wrong, but I think the required formatting of python would trip up a kid ... that's one thing I personally HATE about Python. What happens if someone goes through and removes some of your spaces? Oops! Either way though, as long as the teachers aren't suggesting the students use GOTOs everywhere, it is relatively easy to move from BASIC to Python and vice-versa.

Jess
"What happens if someone goes through and removes some of your spaces? Oops!" Does that happen much? Space-removing gremlins?
Nosredna
Sure - noobie developer starts modifying code, adds a few spaces or removes a couple. Many developers are acclimated to spaces never mattering. Moving to a language where spaces are uber-important can be a challenge.
Jess
@Nosredna:Ithappenstomeallthetime.
MusiGenesis
Heh. I've programmed in tons of languages. Going to Python felt great. For once the visual spacing matches the depth! To me that's a lot more sane than in other languages when you have the spacing indicating one thing and the braces indicating something else.
Nosredna
@Nosredna: I'm just trying to enjoy C# for as long as I can before MS turns it back into VB ("var" and "dynamic" are just the beginning of this).
MusiGenesis
C# is a great language.
Nosredna
Don't get me wrong, I agree that Python is great, but there are little things that make it harder to learn than BASIC. I'm really thinking more about kids than hobbyists though. For adults learning to code, I almost always suggest using the Macro Record function in Excel then start trying to modify it to do something useful.
Jess
BASIC doesn't come with a Cultist type loyalty that demands you follow their point of view. Most pieces of Pythonic documentation spends more pages trying to convert you than there were pages in the BASIC manuals I learned from. While the language in and of it's self may have merit, treating it like the "Holy Grail" (pun intended) is the type of irrational "Bad thinking" that Dijkstra warned about.
NoMoreZealots
@NoMoreZealots - funny, I had an old employee come to me the other day and say "Hey, I can convert your entire system to python in a few weeks, why are you wasting so much time and money on .NET?"
Jess
+1  A: 

The problem is: If you start programming in BASIC, you will continue programming the same way in Java/C#. Like Djikstra said

... teaching of BASIC should be rated as a criminal offence: it mutilates the mind beyond recovery.

Helper Method
A: 

No, please don't.

BASIC (even VB) helps people develop a very, very bad procedural / imperative style with long methods and classes.

I think the best combination for beginners would be to teach them F# first and then, to introduce OOP, first the GoF - patterns, then clean coding rules and then C#.

No more bad garbage coding, please. :-(

StormianRootSolver
A: 

If you can find enough high school teachers that know other languages, they may be better off. Most students are not going to become progammers, but can use some of the 'basics' to expand the functionality of Office products for example. Financial analysts, accountants, office managers, personal assistants, HR staff, etc. will use Excel. You can't approach this purely from a programmer's point of view. And NO language will prevent bad code.

The English language has a lot of problems and is not the most spoken language, but it is pretty handy.

Jeff O
+1  A: 

Any language which is useful for showcasing the fundamentals of computer science is fine to teach the fundamentals of computer science, including BASIC, if what we're talking about is a variant of BASIC which implements object orientation, recursion, referencing and self-referencing, and the essential data structures. Line-numbered BASIC doesn't do that, but Visual Basic and implementations similar to it, like Object Pascal, do.

Beginning programming is not about the nuances of CS; it's appropriate to use a language which hides memory management issues and doesn't force programmers to think about symbol case or even much about scoping.

But even after having said all that, if what we want to do is raise a generation of programmers who automatically think about things like manycore issues before they're juniors at a University, staring with DSL's or F# (I know it's not a DSL) might be just the thing. I don't necessarily agree that C# or any C-based language is a natural endpoint to any of that.

Rob Perkins
A: 

Learning Programming concept and pattern is more important then language.

SilverNight