jamesh
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 27732
Joined: Sat Jul 30, 2011 7:41 pm

Re: BASIC - more harmful than useful?

Wed Dec 28, 2011 3:30 pm

boley said:



... and believe me, no matter what language you start in, your code will always be bad, and have bad coding practices.


That is a very good point.  I once was meeting with the Department Head of a film school and he stated that one good reason for a formal education (in film making) was to get a lot of the student's bad films out of the way.  They were inevitable.


How does he explain George Lucas' films getting worse? (I give you...."The Phantom Menace")
Principal Software Engineer at Raspberry Pi (Trading) Ltd.
Contrary to popular belief, humorous signatures are allowed.
I've been saying "Mucho" to my Spanish friend a lot more lately. It means a lot to him.

mdf200
Posts: 3
Joined: Sun Nov 27, 2011 8:22 pm
Contact: Website

Re: BASIC - more harmful than useful?

Wed Dec 28, 2011 4:11 pm

You should have a watch of this...

feature=related

It's a BBC program called Electric Dreams, and it takes a modern day family back to the 70s, then progresses a year a day. This one is from the 80s, when they've to pick a computer, and it's really interesting to see the teenage boy STILL hooked on the computer because he can get stuck into BASIC.

No matter what modern tech kids get (boys mainly), they are enthralled by the ability to program and control a computer. Telling it what to do is a big enough hook - was for me too!

(whole program is brilliant BTW).

boley
Posts: 48
Joined: Wed Nov 30, 2011 9:50 pm

Re: BASIC - more harmful than useful?

Wed Dec 28, 2011 7:41 pm

JamesH said:


boley said:



... and believe me, no matter what language you start in, your code will always be bad, and have bad coding practices.


That is a very good point.  I once was meeting with the Department Head of a film school and he stated that one good reason for a formal education (in film making) was to get a lot of the student's bad films out of the way.  They were inevitable.


How does he explain George Lucas' films getting worse? (I give you...."The Phantom Menace")


Maybe his student films were too good, and never got the bad ones out of his system?

elmicker
Posts: 5
Joined: Tue Nov 29, 2011 10:08 pm

Re: BASIC - more harmful than useful?

Wed Dec 28, 2011 9:30 pm

eben said:


Is that right? I forget. In any case, there"s a large amount of voodoo code involved, which the user is required to take on trust until he or she has learnt quite a lot about the language"s syntax and object model. In my experience, this tends to demoralize and demotivate a good proportion of learners.


That is right, and you're right that Java has an unfortunate tendency to drive away newbies, but then what language doesn't? Like mathematics, programming is something that has to be loved and it is not something that everyone is capable of doing (nor something that everyone is willing to do, and unfortunately the overlap between these sets isn't as large as one would like!).

I've posted myself about the pitfalls of forcing new programmers into using stuff they don't understand as a matter of trust, but Java's fluff hardly stands as the worst example of that (the mountain of "C++" Hello Worlds with using namespace std and return 0 in them are always going to take that title), and I think to describe Java as "the worst kind of teaching language" as a consequence is seriously disingenuous.

In some cases, that fluff isn't even a bad thing. I know that, not all that long ago, when I was being introduced to programming in Java, taking the quite daunting step from producing single-class trivial programs to having to juggle objects left, right and centre was made all the easier by being very comfortable with the object notation, as it was one that had been used right from day one. However, that said, it is usually a Bad Thing.

But still, Java has its redeeming features that make it, in many cases (university undergraduate – a captive, somewhat dedicated audience – springs to mind), almost ideal. Java code is exceptionally readable (Python's array notation, while powerful, can be something of a mind-bender at the outset), it introduces programmers to a style of programming and a language that, unlike most others, is actually used in the real world, it forces people into a habit of writing safe code, it familiarises people with the realities of the write-compile-execute cycle, the quantity of newbie-level documentation is staggering, it's C-like, it's easily extensible and as flexible as any other modern language, all the while hiding the nasty elements of earlier languages (direct memory manipulation etc.).

In terms of longer term advantages, because after all it should be only a matter of weeks at the most before the newbie understands Java's fluff, the short jumps from Java to Android or from Java to C# should be enough to make one seriously consider Java as a teaching language, not to mention the wealth of (occasionally esoteric) libraries and its applications within enterprise computing.

But obviously I still prefer Python. It's just too damned easy to make someone go "Woah" really, really quickly when you're using Python.

Why anyone would still consider BASIC to be anything but a relic is beyond me. It's ugly, provides no insight to modern programming logic, has no long-term applications for someone who sticks it out and has little to no proper support. It ain't the 80s any more, we shouldn't be teaching people to program in languages that belong there. You wouldn't build a media centre that takes betamax over a DVR would you?

User avatar
DavidS
Posts: 4334
Joined: Thu Dec 15, 2011 6:39 am
Location: USA
Contact: Website

Re: BASIC - more harmful than useful?

Thu Dec 29, 2011 3:53 pm


Why anyone would still consider BASIC to be anything but a relic is beyond me. It"s ugly, provides no insight to modern programming logic, has no long-term applications for someone who sticks it out and has little to no proper support. It ain"t the 80s any more, we shouldn"t be teaching people to program in languages that belong there. You wouldn"t build a media centre that takes betamax over a DVR would you?



A structured language is a structured language.  And as to it belonging in the 80's; how many OO BASIC compilers did you see in the 1980's?  Last I checked most of these are much newer.

No one seems to have a thread bashing C just because of how popular it whas in the late 70's and 80's.  So why slam an equaly capable language?  And for that matter a language that current variants support OO?  There are even a couple of modern Operating Systems written or being written in BASIC.
RPi = The best ARM based RISC OS computer around
More than 95% of posts made from RISC OS on RPi 1B/1B+ computers. Most of the rest from RISC OS on RPi 2B/3B/3B+ computers

Miroslav-Stimac
Posts: 3
Joined: Thu Dec 29, 2011 6:54 pm

Re: BASIC - more harmful than useful?

Thu Dec 29, 2011 7:34 pm

elmicker said:


Why anyone would still consider BASIC to be anything but a relic is beyond me. It"s ugly, provides no insight to modern programming logic, has no long-term applications for someone who sticks it out and has little to no proper support. It ain"t the 80s any more, we shouldn"t be teaching people to program in languages that belong there. You wouldn"t build a media centre that takes betamax over a DVR would you?


Do you know Microsoft .NET?

The two main programming languages of the .NET technology are C# and Visual Basic .NET. I am a software developer and I use both programming languages. In most projects there is no special reason why I should take one of them and not the other one because both have more or less the same features. There are some exceptions, but those are not relevant for many projects.

I see no reason why not to use the BASIC syntax. It is easy to read, easy to understand and modern BASIC programming languages, such as Visual Basic .NET, are well structured. Furthermore, the compiled code is as fast as the one programmed in C# because both, the C# code and the VB .NET code, are translated into an intermediate language before they are compiled to the native code.

People who say that BASIC is ugly, has no structure and is slow, talk and think about the BASIC interprators used in many home computers in the 80s when there was a lack of memory. For example, think about the COMMODORE 64. The ROM of this computer has a size of 21 KB that contains not only the BASIC, but the whole programming system and the character set. There was no available space in order to contain a programming language that has more than the very essential commands and the simple structures. There was even no compiler in the ROM. Therefore the BASIC programs looked so dirty and were so slow.

But modern BASIC programming languages can be very fast and very well structured. Please do not mix them up with those of the 80s.

Best wishes,

Miroslav Stimac

jamesh
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 27732
Joined: Sat Jul 30, 2011 7:41 pm

Re: BASIC - more harmful than useful?

Thu Dec 29, 2011 7:38 pm

elmicker said:


Why anyone would still consider BASIC to be anything but a relic is beyond me. It"s ugly, provides no insight to modern programming logic, has no long-term applications for someone who sticks it out and has little to no proper support. It ain"t the 80s any more, we shouldn"t be teaching people to program in languages that belong there. You wouldn"t build a media centre that takes betamax over a DVR would you?


I agree with DavidS – BASIC contains all the features (even the 80's BASICS) to learn programming logic. IF, ELSE, CASE, THEN, WHILE, REPEAT etc. The ones I used didn't have exception handling, but then neither does C, but then C was developed in the late 60's. So its a good job nobody uses it now eh! Damn 60's tree hugging hippy crap. Oh, hold on a sec……
Principal Software Engineer at Raspberry Pi (Trading) Ltd.
Contrary to popular belief, humorous signatures are allowed.
I've been saying "Mucho" to my Spanish friend a lot more lately. It means a lot to him.

spock
Posts: 223
Joined: Sun Oct 02, 2011 10:33 am

Re: BASIC - more harmful than useful?

Thu Dec 29, 2011 8:20 pm

if you say that current variants of BASIC support OO then you can also count C# as current version of C.

[C# -> C] is exactly the same as [visual basic .NET -> gwbasic].

yes, C is really old too and nowadays too cumbersome for many things...

but:

- it is a standard (if you talk about C you know what is meant - unlike with BASIC with its hundreds of variants)

- it still is mainstream (OS kernels, micro controllers,...)

- it is useful to know because it kind of is the lingua franca of computing (almost all languages can use C libraries,...)

...

spock
Posts: 223
Joined: Sun Oct 02, 2011 10:33 am

Re: BASIC - more harmful than useful?

Thu Dec 29, 2011 8:25 pm

hm...

actually all this "BASIC" stuff is kind of silly. there is no "BASIC". there are many, many languages and some use "BASIC" in their name.

visual basic has about as much to do with bbc basic as python has to do with bbc basic.

simply ignore the name and pick a nice language for teaching.

(but i still don't understand why someone would prefer something archaic with line numbers and so on for teaching. )

tomo
Posts: 19
Joined: Mon Dec 12, 2011 12:50 pm

Re: BASIC - more harmful than useful?

Thu Dec 29, 2011 9:29 pm

spock said:


if you say that current variants of BASIC support OO then you can also count C# as current version of C.


Well, you could count it as a weird variant of Java, though.


[C# -> C] is exactly the same as [visual basic .NET -> gwbasic].


Not exactly, but pretty similar. As is GWBASIC vs C64 BASIC. Or Delphi or Object Pascal vs the original Pascal. The criterion in these cases is, indeed, mostly in whether the language creators want to keep with the family line or not. But, obviously, languages do evolve. Some of them keep the name, some of them don't. Thus, it's pretty easy to bash BASIC with C64 BASIC in mind. But, indeed, 80's are gone (oh…God…why???). So let's get out of there! At least, let's get precise about what (… ehm… implementation, feature…) we criticize and "live and let live" about the rest.

But I know… the strongest reason for wanting to "kill" that damn BASIC is because it's ugly I know the feeling so well. As I'd do quite some shooting in the "language jungle" myself. And it always makes me so angry and frustrated when I see some people that just don't get it.

pvgb
Posts: 51
Joined: Sat Oct 15, 2011 9:53 pm

Re: BASIC - more harmful than useful?

Thu Dec 29, 2011 10:29 pm

No. I fully agree we are not in the Eighties.

In the Eighties you could go into any one of a number of High Street shops, type in a couple of lines of code and see the machine do something.

Try that today.

In the Eighties computer magazines had programs in them that you could type in and learn from. (even a sort of passive leaning by osmosis type of experience – code wasn't frightening any more )

Apart from the Linux magazines how many Newsstand magazines do that today ?

In the Eighties if you had a home computer you could write programs, as the machine came with a free programming language. Mostly some variant of Basic. ( From the hard to read ATOM Basic to the relative elegance of BBC Basic)

If you have a computer at home today then the chances are that a programming language is an optional extra. ( Costing how much ? ) – An option that most do not take up.

The schools that had computers in the Eighties tended to teach things like programming and the things round it, like algorithms. Loads of people probably made a decision on what careers to follow based on their hour a week in the computer room. Some became programmers. Some decided that programming was not for them. You have to respect their choice. ( VisiCalc had yet to come along, but If I had been taught spreadsheets at school I would probably never have taken up computing after that ! )

Today, the schools teach Word processing and Spreadsheets and Presentation software. The kids are deciding that computing is not for them. In droves.

Like it or not, the user experience in the Eighties involved Basic. Tried ? Yes ! Trusted ? Not always ! ( I still shudder at the BBC Basic fallback error message of "Mistake" ) However you look at it Basic was a factor – either as a cause or as an unwitting victim.

Today, and I suspect this is the point of the whole Raspberry Pi Enterprise, we do not have the interest in computing in general, and programming in particular.

Somehow computing has become less compelling as a subject than accountancy.

You may wish to review what Eric Schmidt ( Executive Chairman of Google ) said at the Edinburgh International Television Festival.

Michael Gove seems to think there is a problem. ( http://www.guardian.co.uk/tech.....er-science )

No. I fully agree we are not in the Eighties. The picture was brighter in the Eighties.

I have no particular brief for Basic. I suspect that Basic is not appropriate for the Raspberry Pi because it is not embedded into the system the way that the Eighties micros had it embedded.

The nearest thing is probably Python. Not because it is the "best" language, but because it is the most convenient for lots of reasons.

No language is perfect – they all have some ugliness lurking somewhere.

Can we stop this "my flint axe is better than your flint axe" argument and try and work out how best to take advantage of this opportunity ?

User avatar
DavidS
Posts: 4334
Joined: Thu Dec 15, 2011 6:39 am
Location: USA
Contact: Website

Re: BASIC - more harmful than useful?

Fri Dec 30, 2011 7:22 am

@pvgb:

Thank you.......
RPi = The best ARM based RISC OS computer around
More than 95% of posts made from RISC OS on RPi 1B/1B+ computers. Most of the rest from RISC OS on RPi 2B/3B/3B+ computers

Sarten X
Posts: 1
Joined: Fri Dec 30, 2011 8:06 am

Re: BASIC - more harmful than useful?

Fri Dec 30, 2011 10:35 am

This post is long. In short: BASIC is a wonderful language. It's an all-purpose language that teaches beginners the use of particular symbols to instruct the computer. Taken as that and nothing else, I feel it does its job better than any other language.

Now for the long-winded rant...

The modern hatred of BASIC has practically nothing to do with the language itself. Rather, it stems from many years of seeing low-quality programs written by low-quality programmers, who only knew BASIC. These low-quality programmers were able to get jobs because any programming ability was seen as good. An experienced programmer entering a new job and finding BASIC programs meant that the programs were likely to contain bugs, spaghetti code, poor documentation, and other hallmarks of poor programming practice. Today, that stereotype is even more likely to be reinforced, as the only major surviving programs in BASIC date from the 80's, and won't have the benefit of modern structured paradigms (even translated to BASIC's keywords).

This is, of course, the result of seeing BASIC outside its natural habitat: the classroom. BASIC was designed as an educational tool, accessible to the masses, to teach some basic programming concepts to the workforce of tomorrow (which is now yesterday). These concepts are so simple that they're often forgotten:


The computer does only what it's told to, and nothing else (ideally). It is not a magic box, and it is not sentient. It will not decide to act on its own, and it will not understand things it is not told about. It is a mechanical tool, little different than a hammer or an automobile.
Programs are complex sets of instructions, themselves comprised of simpler instructions, which are reduced to even simpler instructions.
Context is important. Parts of a program inside one context are isolated from other contexts, unless special arrangements have been made.

These concepts are mostly irrelevant now. The vast majority of computer users don't need to understand how a computer operates in order to use it. Rather, most users will have spent enough time with computers to simply understand the limitations of a system as being natural. Programming concepts don't need to be accessible to everyone - just the programmers.

Unfortunately, the programmers aren't being shown these concepts early, either. Modern "learn to program" tools focus on results, not principles. You can click a button, and the script-recording tool will note that you want to do that again later. To make an interface, you draw the interface on a blank template, and the IDE will work out all that silly behind-the-scenes code to do that tedious stuff like load libraries and initialize objects.

If I were to teach an introductory programming class, I would start with BASIC for the first week. We'd write a nice simple "Hello, World!" program, then greet the student by name (to demonstrate input and variables), and maybe use a subroutine or two (for showing the importance of context). Then I'd move on to more modern languages, like Python, accompanied by a lecture on several different languages and how they all have their own particular benefits. Good programmers today must know a variety of languages, and be able to switch between them seamlessly. It is no longer an issue of "this language is good or bad" but rather "this language is good or bad for this particular project", and education must reflect that.

Rather than address these concepts, most current education programs teach particular languages, using boilerplate examples to work around issues that the students don't understand yet. Knowing the simple programming concepts is an artifact of a bygone era, where man mastered machine. Now, in the effort to hide from the ugly result of overly-eager hiring, we're stuck in a world where Johnny can't code, and experimentation is frowned upon. Today's most accessible technology (iPods, Android phones, and the like) are almost completely closed to amateur programs. The Raspberry Pi aims to change that, and BASIC is still a suitable language to use. No other language is as straightforward as BASIC for educational use. Its keywords are plain English, its syntax is minimal, and it requires no boilerplate to get started.

tomo
Posts: 19
Joined: Mon Dec 12, 2011 12:50 pm

Re: BASIC - more harmful than useful?

Fri Dec 30, 2011 10:44 am

pvgb said:


No. I fully agree we are not in the Eighties. The picture was brighter in the Eighties.


Exactly. You couldn't put it better. I think we do want to bring some of the 80's back into computing, since what makes the problem is that we've lost it.


I have no particular brief for Basic. I suspect that Basic is not appropriate for the Raspberry Pi because it is not embedded into the system the way that the Eighties micros had it embedded.

The nearest thing is probably Python. Not because it is the "best" language, but because it is the most convenient for lots of reasons.


Well, I am biased, I guess. And I admit easily. Since, when I think what would be the best tool to start children's interest in computers from the technical side, I always think about what I would like to have (which, I guess, brings me back to the 80's). So, perhaps, I possibly do fail to see some alternatives that might also be o.k. But, my point is that BASIC is o.k., not that no alternative is. And when I say BASIC, I see it integrated into the system in a similar way as it has been in the 80's. How, exactly, I don't know. But it has to give a similar experience as it has back then, though it has to be in the 2012. As anyone with a fair ammount of imagination, I, too, have some ideas about how it could be done, since I don't really think it's impossible. But I will spare you with it, since ideas, per se, aren't really worth much. But there are some open source interactive BASIC implementations that may come handy for that purpose. But, yet, none of them as they are, without at least some adapting. On the other hand, I don't know of any other language interpreter that would be integrated with the system in that way "out of the box", either. Except, perhaps, Bash & co. But their languages aren't really suitable for somebody trying to do something fun with the computer for the first time.

Still holding to the "integration" issue… What would be the advantage of Python over some interactive BASIC? I don't see Python being more integrated with the system in any way.

Talking about alternatives, what about a JavaScript interpreter? It's a fun little language (at least until you try to do something big… debugging is a pain). It's easy to start. It has an ubiquitous C-like syntax, which is an advantage. It doesn't annoy you with OO, unless you want it, and it can be made to give instant results. There is a big gap between the interpreter and the system, that should be leaped over, somehow. But, I believe, the other alternatives have the same problem, too. I find Javascript – syntax-wise – much easier for a beginner to start and understand than Python. But, it may be just my taste. The Python is, to be honest, much more mature on the desktop side.

spock
Posts: 223
Joined: Sun Oct 02, 2011 10:33 am

Re: BASIC - more harmful than useful?

Fri Dec 30, 2011 12:56 pm

i see how some things were nicer for kids with the home computers of the eighties. i was a kid in the eighties too. (but i first got the spectrum of my uncle at the end of the eighties when i also already was exposed to the ibm-pc of my father.)

but i don't see what BASIC has to do with it? have some of you BASIC proponents even looked at modern alternatives?

for me the main difference was that compared to today the possibilities were very limited which made everything less overwhelming and intimidating. we won't get this back!

...and recreating the eighties isn't important anyway. the raspberry pi just should prominently feature the programming tools it comes with and i hope that a very strong educational community will form around it. that's all it needs. stuff like booting into some programming language prompt isn't important.

Joules
Posts: 87
Joined: Sun Dec 25, 2011 8:50 pm

Re: BASIC - more harmful than useful?

Fri Dec 30, 2011 1:33 pm

For me, my nephew thinks his uncle is a computer Wizard, and shows interest in whatever I do.  I can tell you I am no Wizard, but I can spark his interest in programming by showing him confidently something I learnt and knew when I was his age.  Then I can send him on his way to modern languages outside of my abilities if his interest is first captured.  It's about igniting that first spark, however you do it.  A natural competent teacher can be captivating and inspiring.

tomo
Posts: 19
Joined: Mon Dec 12, 2011 12:50 pm

Re: BASIC - more harmful than useful?

Fri Dec 30, 2011 3:23 pm

spock said:

but i don't see what BASIC has to do with it? have some of you BASIC proponents even looked at modern alternatives?
What are the "modern alternatives"? Is it just about the fascination with a "newer stuff" in general or something to do with "can do this" and "can't do that"? Why deriving from the BASIC-like syntax should be called "old" and deriving from, e.g. the C-like syntax, should be called "new"? What about being stubborn and making up a completely new and different syntax, style etc. just for the sake of being new... will it also make it better, since "new is better" or "old is bad"? I don't buy it.

I think children should learn to choose and use different languages for different things... even on RPI... but we're talking just about the starting point here, right? So, BASIC is intrinsically unsuitable and bad for everything? Why exacty? For all that damn educational and academic uses and other needs that we face today, BASIC is unsuitable?


for me the main difference was that compared to today the possibilities were very limited which made everything less overwhelming and intimidating. we won't get this back!


But, perhaps, we should? We're talking about the entry point into computers, about waking the interest, igniting the fire, not developing a new computer science, right? Besides, in the embedded world, things are still often much limited like in the 80's. It's not an experience from the alien planet, even in these days. But, again, we are talking about the first experience with computers, right? Should it be complex?


...and recreating the eighties isn't important anyway. the raspberry pi just should prominently feature the programming tools it comes with and i hope that a very strong educational community will form around it. that's all it needs. stuff like booting into some programming language prompt isn't important.


Well, if the only aim and advantage of the Raspberry Pi is supposed to be in providing a cheap low-level hardware to the people, then, perhaps, it would be better to put all that money and time in starting and organizing refurbishing services. I'm sure an old PC can do all that RPI can do and even more. The only thing it lacks has to do with prestige of having a fancy new flashing hardware that has the power of long-dead desktop computers of yesterday. Is this that great advantage?

Of course, the idea above doesn't excite me much. Since, yes... I believe we do have to bring part of the 80's back. At least the spirit, the feeling that computer is a "magic of the science" at our own disposal, and not just another stupid flashy TV set, IPhone or Internet Explorer box we have and use these days. Does it have to include BASIC to achieve that? Probably not. But putting a linux distro with a bunch of "educational" software and languages on the hardware, really isn't new or much of a progress. People have done it for years and I don't think one "educational" distro more will make the world change.

tufty
Posts: 1456
Joined: Sun Sep 11, 2011 2:32 pm

Re: BASIC - more harmful than useful?

Fri Dec 30, 2011 3:50 pm

tomo said:


For all that damn educational and academic uses and other needs that we face today, BASIC is unsuitable?


Yes.  Yes it is.

BASIC covers some of the very first bases of programming - structure, control flow, boolean logic.  That's it .  All of it.  It really is, for want of a better word, "basic".  Once you're past the absolute beginner stage, BASIC isn't going to take you anywhere.  Frankly, there's nothing you can do in BASIC that you can't do in LOGO.  And LOGO has turtles.

Yes, some updated variants of BASIC have extra control constructs, some OOish bolt-ons, the ability to add direct assembler (as though that's somehow a benefit for a language intended for teaching programming), to compile rather than interpret (again, irrelevant), and various other bits and pieces.  But those extra bits are, by definition, non-standard, and non-portable - lipstick on a pig.

Programming has, actually, changed significantly since the 1960s.  BASIC hasn't kept up.  It's outdated, it cannot be used for teaching efficient or effective programming on modern processors or operating systems.  There are a plethora of other languages out there that are *just* as easy to grasp for the first stages that BASIC covers, but which can then be used going forwards to learn more advanced and useful techniques, *and* which are portable across hardware and operating system.

I would personally have suggested NewtonScript as a decent beginner's language.  It's certainly massively better than BASIC in all areas.  However, even I have to admit that it's not a very good choice these days (particularly because the only hardware that ever hosted it was discontinued in 1998).

A call to the BASIC-lovers.  Throw away your mouldering old toys.  Forget BASIC.  Like that old teddy bear, it's broken and smelly, and its left arm has come off at the seams.  It's time to move on.  Come and join the future.  It's fun here.

Simon

spock
Posts: 223
Joined: Sun Oct 02, 2011 10:33 am

Re: BASIC - more harmful than useful?

Fri Dec 30, 2011 4:17 pm

but how would you do it tomo? it's impossible! the arm cpu and the gpu isn't a z80 cpu. and linux isn't some basic interpreter that fits in 20kb of rom. if you want the eighties back you simply can get an old home computer on ebay.

but if you boot into a clean desktop with programming tools that are easy to start and use and if there is good teaching material then the situation isn't that bad. it even could be better than in the eighties.

i prefer the raspberry pi to a refurbished pc. it has many advantages like being very small and portable, low power consumption, noiseless, a common platform to develop for (hopefully hundreds of thousands raspberry pis will be sold ),…

http://en.wikipedia.org/wiki/C.....nditionals

i don't see the advantage of basic-like syntax. python is a lot more elegant. (i even find C# more elegant. ) but i will stop with the basic thing now. it doesn't really matter.

(and yes, of course children should learn to choose different languages for different things.)

tomo
Posts: 19
Joined: Mon Dec 12, 2011 12:50 pm

Re: BASIC - more harmful than useful?

Fri Dec 30, 2011 5:01 pm

tufty said:

Yes.  Yes it is.
Tufty, hold a bit your horses. Most of things you wrote up there are cute, but irrelevant. And programming really hasn't change that much. Not to mention that "programming" just isn't that "one thing" you are talking about, but there are many different situations when programming of some sort is required and each situation often brings different programing styles, languages and needs. You fail to admit this, it appears to me. And this is funny. You keep talking about the programming as if all languages should follow and fit all possible purposes or there would be a single criterion to judge them all. But... they don't. There isn't. So, I may say, rather kindly welcome to the present! I really doubt that the future will be different. Probably, it will be even more diverse.

tufty
Posts: 1456
Joined: Sun Sep 11, 2011 2:32 pm

Re: BASIC - more harmful than useful?

Fri Dec 30, 2011 5:41 pm

tomo said:


tufty said:


Yes.  Yes it is.


Tufty, hold a bit your horses. Most of things you wrote up there are cute, but irrelevant.


I don't believe so.


And programming really hasn't change that much.


Ah, but it has.  Programming in general, and particularly UI programming, has moved on massively from the "one processor, one thread of execution, batch processing" model that BASIC started with, into the realms of event-driven programming on processors that support multiple threads running on heterogenous cores.  The model is totally different, and it's something that not only BASIC fails to take into account.


You fail to admit this, it appears to me. And this is funny. You keep talking about the programming as if all languages should follow and fit all possible purposes or there would be a single criterion to judge them all.


If you go back through some of my past posts outside of this particular thread, you'll note that I actually advocate teaching using multiple languages, picking the one that meets the requirement best.  I'm far from being a "one language fits all" kind of guy. That said, in certain cases, I can be a "one language doesn't fit anywhere" kind of guy.

Simon

tomo
Posts: 19
Joined: Mon Dec 12, 2011 12:50 pm

Re: BASIC - more harmful than useful?

Fri Dec 30, 2011 6:16 pm

spock said:


but how would you do it tomo? it's impossible! the arm cpu and the gpu isn't a z80 cpu. and linux isn't some basic interpreter that fits in 20kb of rom.


Well, if you insist. Not impossible at all. Why would it be? Of course, using a modern OS prevents us from accessing the hardware directly, but that's not necessary an obstacle. Do I think "my way" would save the world? I don't think anything. I don't know what would and wouldn't. I think it would sure be fun using it. But opinions vary.

I see BASIC somewhere where Bash normally lies. Imagine Bash having a solid BASIC-like instead of its own language. And all the linux commands would have a friendly wrapper around (remember "rm -R /"? it simply shouldn't do what it does without asking. And "ls -l" should present the data in a more readable way), without much changing their syntax or what they do.

The most close thing to my "BASIC" is perhaps SmallBasic (the other, not the MS one) interpreter in console mode. It's powerful enough and capable even to do some quick advanced math, etc. Which doesn't hurt. It's nice, actually. Extensions would be written to allow to do some simple, quick GUI programming. More as a glue, though. Some other language would be provided for that, instead.

Another important thing would be the GPIO and other I/O. To hook something on those pins (or in some other way) and to be able to control these pins directly in BASIC. Robots, lights, switches etc. could be hooked on RPI and children would be able to control these things instantly and interactively with their programs. If old enough, they could even solder something and then hook it on the RPI.

First steps into assembler could be done from BASIC itself. E.g. a control functions or a "driver" for some device hooked on GPIO with inline assembler.

Nothing would prevent starting and using other languages. In fact, other languages would be provided. GUI or advanced programming would be taught these way, for example. Some linux/arm assembler could be also taught.

GUI "desktop" would be there. The computer would boot directly to the command line. Or at least, the decision would be made during the bootup (and perhaps saved). At any time, the user would be able to switch from the command-shell text mode to the "desktop" mode and back with a press of a F...something.

Not a world saver. But fun. Fun thinking about it.


but if you boot into a clean desktop with programming tools that are easy to start and use and if there is good teaching material then the situation isn't that bad. it even could be better than in the eighties.


Perhaps. Perhaps, indeed. But simply putting together another distro with a bunch of software pulled from the all possible places (as, probably, 99% of distributions are made), without a true thought-out and consistent look and feel and organization, doesn't provide much enjoyable experience. And it sure isn't anything new that hasn't been done before. Many times.



i don't see the advantage of basic-like syntax. python is a lot more elegant. (i even find C# more elegant. ) but i will stop with the basic thing now. it doesn't really matter.


I don't see any real advantage of the Python syntax. I prefer JavaScript over Python, if forced to compare, but - at the same time - I admit that Python on the desktop is much more mature. I agree it really doesn't matter, since it's more about "how" than "what".

liam collins
Posts: 17
Joined: Sat Oct 29, 2011 5:06 pm

Re: BASIC - more harmful than useful?

Fri Dec 30, 2011 8:00 pm

tufty said:


I don't believe so.


And programming really hasn't change that much.


Ah, but it has.  Programming in general, and particularly UI programming, has moved on massively from the "one processor, one thread of execution, batch processing" model that BASIC started with, into the realms of event-driven programming on processors that support multiple threads running on heterogenous cores.  The model is totally different, and it's something that not only BASIC fails to take into account.





I'm not a fan of BASIC but almost all languages started with a 'one-processor, one-thread' model (I'm ignoring OCCAM and some of the other RT languages) but libraries are written to extend the functionality.

Fundamentally programming hasn't changed. The environments are more complex and people try new fad-styles (RAD, 4GL, OOPs) but, deep down, Knuth's multi-volume epic still stands. I have programmed on multi-threaded, multi-processor systems back in the early 80's. I've seen GUI develop since the Xerox Star 8000 (late 70's?) and find that the 'new stuff' is the same stuff wrapped up in different ways. The app-loops may now hidden and the event handling calls are done using 'interfaces' but its all the same. An object is a block of memory containing a data structure and accessed by a pointer (well hidden one) but it is not new.

Is BASIC a good language to start to learn from? I don't know. Should the environment that the learner is using be simple (single thread-single core) YES! The newbie programmer should not have to stagger from 'hello world' straight into the vertical cliff of API calls for modern environments – It took me a few days to pick up Objective-C but I'm still suffering the API flood of OS-X interfaces/API

As for Python – the major problem that I can see newbies suffering from issues arising from the 'whitespace' indentation rather than 'begin…end' notation. This is not insurmountable but it may cause issues when they move to the C style languages.

What might be useful is to have a newbie environment that was:

1. Interactive (maybe option for compiling)

2. Have a simple IDE – (keyword fill in, colouring, library documentation built in, loops colour coded (maybe different coloured background for each level of indentation),etc…)

3. Language with a simple syntax that is coherent (NO POLYMORPHISM! Easy to spot BEGIN..END blocks [not C style '{' '}'] )

4. Ability to create libraries

5. Structure language (no 'goto')

6. NO OOPs – no lazy function call name resolution, no polymorphism and no inheritance

7. The ability to simply access hardware

8. A good debugger and meaningful error messages ('void main() missing' in Java when I've coded 'void main(Strings args)' is NOT a good error message! – also a good reason not to allow polymorphism!)

9. A environment that starts simple but gradually allows more access to the OS/GUI API

10. Lots of features like HASH/DICTIONARY arrays

11. The ability to create structures of data.

12. The ability to include threading and parallel processing

13. Multi-language support for keywords and messages

Once the newbie programmer has a good understanding of algorithm design and structured coding then the horror of the programming world can be poured forth on to them.

pvgb
Posts: 51
Joined: Sat Oct 15, 2011 9:53 pm

Re: BASIC - more harmful than useful?

Fri Dec 30, 2011 8:38 pm

tufty said:


BASIC covers some of the very first bases of programming – structure, control flow …


As part of your polemic you cite the key argument for BASIC !

Most of the hesitancy I see in beginning programmers stems from an unwillingness to appear a fool in public. "Vodoo code" ( Thanks @eben) is a tarpit that many fall into.

You would probably not believe  how many typographical errors are possible with the simple statement

#include <iostream> using namespace std;
I was once told, and have come to believe it to be true, that the first program that you write is the most difficult. It is a battle of wits between you and the computer. Not only do you have the programming language itself, but the editor, compiler, IDE, runtime, libraries, environment and the fact that the person sitting next to you on one side finished ten minutes ago and the person on the other side of you is about to burst into tears because it isn"t working.

I am told that we live in an age where instant gratification is expected, and that the education system does not seem to reward perseverance.

Programming is not a pastime that gives instant gratification. Programming requires perseverance.

I don"t really care what we use to teach programming, but I suspect it had better hit these two targets.

Positive suggestions, preferably with reasoned argument welcomed !

Dudeofdoom
Posts: 8
Joined: Fri Dec 30, 2011 9:03 pm

Re: BASIC - more harmful than useful?

Fri Dec 30, 2011 9:43 pm

Well…..

13 pages later and I don't think anyones getting it…

(well other than 1 or 2 peeps)

I can't wait to get my slice of pi and I sure as hell hope its got  BBC Basic

I'm  buying  a pi for my friend to give it to him and I know he will sit down plug it in and write some silly programs for himself on it and thoroughly enjoy himself..Just like he did er 30 years ago in school..

He doesn't care about OOP,modules ,debugging and IDE's..

Later he'll start integrating it into stuff motors actuator etc and get his kids involved and perhaps later he'll want to move onto something more  elegant.

Its not about the parts… its all about the spark..

You have to know far to much to use the 'modern' tools  the learning curve is very steep and you have to be very enthusiastic to keep on top.

Mark…

Return to “Staffroom, classroom and projects”