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

Re: BASIC - more harmful than useful?

Sun Dec 11, 2011 8:53 pm

Well, without BASIC on the BBC 30 years ago, I wouldn't be writing C on the Videocore IV now. It taught me all the Beginners All purpose Symbolic Instructions for Coding I've used since.

So, I have no shame when it comes to having using BASIC. It got me where I am today.
Principal Software Engineer at Raspberry Pi (Trading) Ltd.
Contrary to popular belief, humorous signatures are allowed. Here's an example...
"My grief counseller just died, luckily, he was so good, I didn't care."

hideki
Posts: 2
Joined: Sun Dec 11, 2011 10:01 pm
Contact: Website

Re: BASIC - more harmful than useful?

Sun Dec 11, 2011 10:04 pm

Basic is perfectly good for many tasks...

Once the machines appear I'll probably have a go at optimising Brandy (an open source BBC Basic V implementation) for the platform...

Brandy is also nice in that on ARM you can have the excellent BBC Basic assembler that was built into the BBC machines.

Open RISC OS should be usable on these boards given some work too and that'll fly on an ARM of this speed (and also includes a good BBC Basic implementation)

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

Re: BASIC - more harmful than useful?

Sun Dec 11, 2011 10:19 pm

RISC OS has already been running on the PI - search the forums and news for more information.
Principal Software Engineer at Raspberry Pi (Trading) Ltd.
Contrary to popular belief, humorous signatures are allowed. Here's an example...
"My grief counseller just died, luckily, he was so good, I didn't care."

User avatar
psergiu
Posts: 223
Joined: Mon Nov 07, 2011 8:36 am
Location: TX, U.S.A. (was: RO, E.U.)
Contact: Website

Re: BASIC - more harmful than useful?

Sun Dec 11, 2011 10:25 pm

I have one thing to say to all the BASIC haters - Your "superior" languages may not use GO TO, but, at run time, the CPU will still use a JMP instruction at the end of your "precious" while loop.

Look at the last generations of programmers - They started on Java & other OO higher level languages and have absolutely no idea how a computer really works, how the bytes are moving in the machine and how to optimize something. The world needs more Steve Wozniaks, not more Java copy-pasters.

smally
Posts: 4
Joined: Sun Dec 11, 2011 10:26 pm

Re: BASIC - more harmful than useful?

Sun Dec 11, 2011 10:43 pm

Im looking forward to getting my RasPi in the future!

There are now many languages that I use and it all started on BBC BASIC on the BBC B and still own every Acorn Machine from the Atom up to the RiscPC

I think BBC BASIC is more powerful that most people realize with it having operators for things like matrix multiplication built in. There is another alternate to using Brandy that is still in development and is not an interpreter but a compiler called OWL BASIC.

The compiler is written in python and the run-time library is in C# at present, I know that the run-time still has a lot of work to be done but I for one will be working on it more closely once I have finish Uni.

As for learning a first programming language I have given my son (Age 11) various books and he dosnt like Java but does like Python.

Personally I can see points for and against OOP and haven't quite made my mind up.

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

Re: BASIC - more harmful than useful?

Sun Dec 11, 2011 11:14 pm

again, i am not a BASIC hater. :) i just don't understand why something old like BBC BASIC that nobody seriously uses anymore is supposed to be a great learning environment on modern hardware. except for nostalgia i see no reason to use it.

of course if you would like to become a good programmer you shouldn't only know very high level languages but also look into C and other languages more close to the hardware. but C doesn't have to be the first language a kid learns.

http://www.tiobe.com/index.php.....index.html

the only BASIC of any significance is visual basic. the only other BASIC i noticed in the list is blitzmax.

Scribe
Posts: 98
Joined: Wed Sep 28, 2011 12:00 pm
Contact: Website

Re: BASIC - more harmful than useful?

Sun Dec 11, 2011 11:34 pm

Can't say I'm a big fan of BASIC, I learned C/C++ directly as my first high-level language, I found it easier than picking up BASIC, I think it depends on personal preference and how your brain likes to work but for me BASIC is more difficult to use than C++.

I prefer to teach C++ or something C based simply because the syntax has a much wider use in industry. If it's for beginner programming I use C-like scripting languages, php is powerful but easy, LUA can be used with ; and {} symbols optionally and is a widely adopted language. Honestly though, I like to teach from the ground up to develop a real understanding of the inner workings, it makes students much better at debugging and understand what's going on; this approach is more difficult as they get older and expectations are raised, which is where I'd hope something like the Pi will come into play, introducing programming to kids whilst they're eager for all knowledge and understand that they still have much to learn!

At a young age, it doesn't matter what you teach kids, they'll eat it up provided it can be broken down into smaller and simpler concepts, for this reason I'd agree with the post starter that BASIC as a stepping-stone to OO languages or C++ isn't required and could potentially create a slightly confusing knowledge foundation. What I'm trying to get at is BASIC would be useful because any programming exposure is a good thing, but a C-based language would be more useful, if it's having a simple entry point that's an issue, scripting languages can be a good modern approach as they focus more on program flow.

hastklass
Raspberry Pi Certified Educator
Raspberry Pi Certified Educator
Posts: 34
Joined: Mon Dec 12, 2011 11:20 am
Location: Cambridge

Re: BASIC - more harmful than useful?

Mon Dec 12, 2011 11:57 am

I am of a generation of teachers that were switched onto computing via the BBC micro and BBC Basic. For those of us who have done little programming since, for the R-Pi to boot up with BBC Basic would allow us to get started on the R-Pi as a familiar friend. It would not be long before we created some simple and engaging activities to enthuse our pupils. Once they understand some basic concepts and are hooked we can move them on to OOP.

obarthelemy
Posts: 1399
Joined: Tue Aug 09, 2011 10:53 pm

Re: BASIC - more harmful than useful?

Mon Dec 12, 2011 1:08 pm

I'm not sure about that. I think that once we get started on BASIC, we'll stick with it and not switch horses mid-stream for more complicated projects.
If we don't switch to to Python for 10 Print "Hello world" 20 goto 10, I doubt we'll suddenly switch for the game of life or displaying fractals.. Plus it woudln't mae any sense to burden pupils with 2 languages at such an early stage.
I think the slight not-a-delay to the Pi's availability is a nice opportunity to try out Python ^^

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

Re: BASIC - more harmful than useful?

Mon Dec 12, 2011 1:58 pm

Hello all! I'd like to share my thoughts on this topic...

I'm a 90% java man and very satisfied that way. Additional 5% is advanced javascript. At least proffessionally. I do some C/C++ with microcontrollers in my free time. Did very little assembler with AVR. Wrote a small bash or perl script now and then. Of course, got into computers with C64 and C128. And, taking all into account, I do believe that BASIC, though not exactly the one of the 80's, does have its place and good use. System scripting might be one. Mathematical scripting, problem solving and algorithm prototyping (I don't see much reason for making up all the new weird interpreted languages with odd syntax, but offering nothing really new or different from BASIC, like Mathlab language & co). And, of course, for teaching/learning. To be honest, I do hate the BASIC compilers in the microcontroller area, like BASCOM etc. But... for all that interpreted scripting purposes... there are many... BASIC is still a reasonable and logical candidate. At least in my oppinion.

For teaching purposes... interpreted BASIC sure has its place. It allows to take children (or learning adults) a step closer to assembler and the way computers work than any modern OOP language or even C can! And I think it is important to keep in mind that, for example, "top level" user GUI WEB cloud enterprise etc. application programming is a much much different thing and experience than programming the hardware itself. As well as it is true that any level inbetween those two is a world on its own. One cannot teach all these at the same time with the same tools. And not all tools are good for doing or teaching every of them. But what I really liked with the home computers of the 80's was how the BASIC and programming were really "integrated" into computers and "natural" to use. They acted as one. And that's what made programming and hardware exploration so tempting to me as a child.

hippy
Posts: 5969
Joined: Fri Sep 09, 2011 10:34 pm
Location: UK

Re: BASIC - more harmful than useful?

Mon Dec 12, 2011 2:08 pm

Quote from obarthelemy on December 12, 2011, 13:08
I think that once we get started on BASIC, we'll stick with it and not switch horses mid-stream for more complicated projects.

You're probably right but if Basic does the job then where's the problem -- Is it not simply a case of looking at Basic as inferior when that is not necessarily so ?

I've produced many programs in Basic which were not hindered by using Basic and would have been no easier, better or more credible if written in any other language, were better for being in Basic than other alternatives.

The underlying problem with any discussion of 'Basic' is that we have no common agreement on what that a particular 'Basic' is or offers and there are many variants. Only when we know which implementation is being considered can we say if it is inferior or not to other alternatives.

Scribe
Posts: 98
Joined: Wed Sep 28, 2011 12:00 pm
Contact: Website

Re: BASIC - more harmful than useful?

Mon Dec 12, 2011 2:28 pm

Quote from hippy on December 12, 2011, 14:08
The underlying problem with any discussion of 'Basic' is that we have no common agreement on what that a particular 'Basic' is or offers and there are many variants. Only when we know which implementation is being considered can we say if it is inferior or not to other alternatives.

Indeed. Many many variations.

obarthelemy
Posts: 1399
Joined: Tue Aug 09, 2011 10:53 pm

Re: BASIC - more harmful than useful?

Mon Dec 12, 2011 2:43 pm

True, any language will let you do pretty much anything, and the most important thing is to actually do it, and teach it. And there are plenty of versions of basic, even OO ones.
What worries me is that most talk of basic is about the 80s version (non-OO), and that starting off non-OO makes transitionning to OO later an order of magnitude harder, at least. Computing has moved on, it's time us old geeks caught up ^^

User avatar
NormanDunbar
Posts: 111
Joined: Wed Nov 23, 2011 12:13 pm
Location: Leeds, West Yorkshire, England.
Contact: Website

Re: BASIC - more harmful than useful?

Mon Dec 12, 2011 3:33 pm

Quote from obarthelemy on December 12, 2011, 14:43
...Computing has moved on, it's time us old geeks caught up ^^
Yeah right! ;) I'm an old geek too, and I can do COBOL still, as well as C++. Mind you, I'm probably better at COBOL!

Computing may have moved on, but there are still plenty of apps written and running quite happily in Non-OO methodologies.

And consider this, how much typing would be required, as well as understanding, to write an OO version of everyone's favourite example?

1000 PRINT "Hello World!"
1010 GOTO 1000


or


1000 REPeat ThisIsSilly
1010 PRINT "Hello World!"
1020 END REPeat ThisIsSilly


The above is simple and quick and easy to follow and understand. What is the OO version going to have to consider? Classes and/or Objects, methods, definition and instantiation etc.

Sometimes it's easy to start simple and work up from there. Especially with kids - you have to grab their attention very early on, get them interested and on-board, and then hit them with the heavy stuff - when they've had fun.

Other opinions are available of course.

Cheers,
Norm.

BTW: Can I just add that I really hate it when people pronounce "Object Oriented" as "Object Orientated" - yuk!
Why do they put lightning conductors on churches?
Why did Tarzan never have a beard?

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

Re: BASIC - more harmful than useful?

Mon Dec 12, 2011 4:12 pm

I could agree with many things written. But I still wonder what's the aim of raspberry pi and using it for teaching? What's the goal? Is it to produce skilled windows programmers by the end of the course (I guess no)? Web programmers, perl programmers, GTK+ programmers, system script coders... ?

Or is it more to get children comfortable with computers beyond the mouse and click? How beyond? Is it to introduce the children into the basic concepts of programming? Logo language used to do that. I wonder, are there really that many advantages in pushing young children straight into programming with "industry standard" C or C++, for example? If yes, why not Java, then? Java is the standard in the enterprise... that's where the money, the present and the future is. Why... oddly... python in that case? And... how old the children?

Or is it, perhaps, more to wake the children's interest in computers in the first place. And then to encourage their curiosity and further exploration of hardware and how computers work? That's the only real and actual advantage of raspberry pi over, say, cheap old PCs for teaching (other than pure prestige reasons). Even more if you add programmatically controlled I/O to the board and allow the children interact with the outer world, you know, lights, robots, etc. Not so hard to achieve. But... is the goal to encourage and develop that kind of curiosity? Which leads to that kind of skills?

I find BASIC appealing either as an interactive tool for system interaction and scripting, controlling robots over I/O, quick prototyping (!), solving math problems (!) and getting the first bite into computers. Of course, for the desktop, there is Delphi (yes, It's alive and kicking as hell), for enterprise and portability is Java, for web is JavaScript, for operating system hacking is C, for embedded taste is assembler and C on "bare metal", for I/O lamp flashing is IEC... but all of those "proper" tools and other can and should come later... potentially on proper hardware... What I believe is needed here is not taking the regular Windows / iPad / Android experience and squeezing it into the very cheap hardware, but creating something new... educational... something that will suck the children into this wonderful world of how computers work... beyond of what their iPads or Word and Internet Explorer offer. Similar as our home computers of the 80's have done.

User avatar
NormanDunbar
Posts: 111
Joined: Wed Nov 23, 2011 12:13 pm
Location: Leeds, West Yorkshire, England.
Contact: Website

Re: BASIC - more harmful than useful?

Mon Dec 12, 2011 4:18 pm

Quote from tomo on December 12, 2011, 16:12
... But I still wonder what's the aim of raspberry pi and using it for teaching? What's the goal? Is it to produce skilled windows programmers by the end of the course (I guess no)?
I believe that the aim is to produce skilled programmers which doesn't necessarily mean Windows.

Quote from tomo on December 12, 2011, 16:12
Or is it more to get children comfortable with computers beyond the mouse and click? How beyond?
In the UK, schools are teaching a so called computer skills. What this boils down to is being able to use Word and Excel. This is not setting any child up for a lifetime of programming, database admin etc. Universities cannot get kinds who can program very well these days.

Quote from tomo on December 12, 2011, 16:12
... there is Delphi (yes, It's alive and kicking as hell)
Oh yes, my favourite application development language of all time. :-)

Quote from tomo on December 12, 2011, 16:12
... but creating something new... educational... something that will suck the children into this wonderful world of how computers work...
And indeed, that's the plan. To gets kids interested in programming as opposed to using.

Cheers,
Norm.
Why do they put lightning conductors on churches?
Why did Tarzan never have a beard?

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

Re: BASIC - more harmful than useful?

Mon Dec 12, 2011 5:08 pm

Quote from obarthelemy on December 12, 2011, 13:08
Plus it woudln't mae any sense to burden pupils with 2 languages at such an early stage.
Au contraire, mon ami - It makes every sense to burden pupils with more than one language. Programming isn't about syntax, it's about concepts. There's a lot of concepts to get across - some, usually the most obviously fundamental, of them are common between most languages (the concept, for example, of an if/then/else block and the boolean logic that follows / underlies it), but many are not. Demonstrating that certain things are easy in one language and difficult, if not close to impossible, in another, is fundamental to turning out decent programmers. Sticking with one language means anchoring yourself in a morass of purely syntactic crap, and dispensing with certain concepts entirely. The programmers you produce using one language only will, of course, eventually reinvent lisp, but it's far easier, and a far better idea, to simply switch and swap languages as you teach. After all, the idea is to produce programmers, not $LANGUAGE programmers. If you want to teach the concept of a stack, use a language where the concept of a stack is fundamental (or at least easy to express). Recursion? See previous answer. And so on.

Bash[1] is, for example, turing complete - it is therefore possible to use it to carry out any given programming task. I wouldn't necessarily suggest it as a language for teaching general concepts, but it makes a nice counterpoint language. It is also higher up on my list of potential candidates for general purpose teaching than C++. Or Basic.

Simon

[1] It's amazing how many common tools are actually turing complete - even `make` is incredibly close to it. vi macros are.

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

Re: BASIC - more harmful than useful?

Mon Dec 12, 2011 5:34 pm

Sod all these languages. Let's put Prolog on it. That'll sort the men from the boys.
Principal Software Engineer at Raspberry Pi (Trading) Ltd.
Contrary to popular belief, humorous signatures are allowed. Here's an example...
"My grief counseller just died, luckily, he was so good, I didn't care."

obarthelemy
Posts: 1399
Joined: Tue Aug 09, 2011 10:53 pm

Re: BASIC - more harmful than useful?

Mon Dec 12, 2011 6:01 pm

I agree in theory, I disagree in practice. For the same reason we don't teach kid several spoken tongues at the same time, actually. Language is not just concepts and syntax, it is also vocabulary and experience. Basic has tens of keywords, same for python. Then you've got system variables. Then libraries. I'd rather kids achieve surface knowledge of everything before moving on to mainly orthogonal different languages.
What's the point of knowing how to order beer in 100 of languages ?

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

Re: BASIC - more harmful than useful?

Mon Dec 12, 2011 6:22 pm

Quote from obarthelemy on December 12, 2011, 18:01
What's the point of knowing how to order beer in 100 of languages ?
Travel broadens the mind, but rots the liver :)

It's actually a lot easier to teach kids 2 (or more) spoken languages at pre-school age than to try and hammer a second language into them in secondary school. Take, for example, the difference between

"I am 43 years old" and "j'ai 43 ans", or "a red car" vs "une voiture rouge". In French, I still have problems with, in particular, the gender of things - this has little use in English (although unsurprisingly enough, given the history of the English language, it still rears it's ugly head from time to time), but my kids can switch from one to the other with no problem. I've lived here for 10 years, and am pretty close to being totally bilingual, but it's still difficult for me from time to time. *Written* french is even worse, but, again, my older son can switch from one to the other with no problems. He's the only kid in his class (6eme) with an english parent, and has a "moyenne" of 19.8 (out of 20). The average for the class is 14.5 or so.

simon

jswstella
Posts: 1
Joined: Mon Dec 12, 2011 5:58 pm

Re: BASIC - more harmful than useful?

Mon Dec 12, 2011 6:28 pm

Forums - more harmful than useful!
I'm 35, would like to start, but dont know where. The more i read the more i'm baffled.

obarthelemy
Posts: 1399
Joined: Tue Aug 09, 2011 10:53 pm

Re: BASIC - more harmful than useful?

Mon Dec 12, 2011 6:41 pm

@jswstella: depends entirely on what you want to do. I think a generic first step would be to install xubuntu or lubuntu in a Virtualbox VM on your PC (not even the ARM version, the 386-32 one), then Python 3, then start doing whatever it is you want to do ^^

Svartalf
Posts: 596
Joined: Fri Jul 29, 2011 6:50 pm

Re: BASIC - more harmful than useful?

Mon Dec 12, 2011 7:10 pm

Quote from jamesh on December 12, 2011, 17:34
Sod all these languages. Let's put Prolog on it. That'll sort the men from the boys.

That...or Erlang or Forth... ;)

User avatar
walney
Posts: 233
Joined: Wed Nov 30, 2011 6:57 pm
Contact: Website

Re: BASIC - more harmful than useful?

Mon Dec 12, 2011 7:18 pm

@jwstella - one thing that I would advise is that before you start that you have a problem in mind that you would like to solve. I learned Ada and Prolog (making me a real man according to some), but I found it impossible to really get to grips with them without having a genuine task to motivate me to use them. My boss at the time suggested solving the N-queens problem. To me, that was just a mind-game - not motivation. (Maybe, "Solve the N-queens problem, or you're sacked" would have worked.)

So my advice would be first to start with a reasonable problem where you actually care about the solution, and work from there. The other advantage is that you will probably end up learning a lot more about the language - because almost inevitably, a problem that looks simple on paper turns out to be a bitch when you start trying to code it. And that's why you need the motivation - otherwise it's just too easy to give up when (not if) you find yourself a bit overwhelmed.

User avatar
mkopack
Posts: 242
Joined: Mon Nov 07, 2011 8:46 pm

Re: BASIC - more harmful than useful?

Mon Dec 12, 2011 7:27 pm

Eh, I learned BASIC, originally on a C64... Then over time I graduated up to PASCAL, then C, then in college made the jump to OO with C++ and a little Smalltalk-80. After graduating in summer of '95, I did a few things, worked for IBM @ the 1996 Olympics, and then in fall of '96 they sent me to Java training...

Basically, what I'm getting at here, NOTHING wrong with starting out with a good BASIC language to start with. For a new person just learning programming for the first time, it's a simple language, it teaches you the basics of logical constructs, IF-THEN, Loops, functions/subroutines, variables. Yes, it has some shortcomings, and yes it CAN teach bad practices, but it also doesn't overwhelm newbies with trying to understand memory management when they're really just trying to understand how to do the basics...

So I'd say a GOOD ciriculum is start out with BASIC for a couple weeks to teach the initial stuff, then move on to something like C to learn the lower level stuff. Then C++/Java for OO.

Python is also another good choice because it abstracts away a lot of stuff to keep the person focused on the "business logic", it has an extensive support library, it's easy to use, and is pretty portable, plus you can go from direct interactive command mode to procedural programming to OO programming and do it all from the same language...

But the biggest thing is - expose the kids to different languages, different techniques and different concepts so they don't fall into the trap of "I only know language X and think I can use that to solve every problem". The more they get exposure to, the more adaptable they'll be to changes over their career and the more useful they'll be.

Return to “Staffroom, classroom and projects”