BASIC - more harmful than useful?

Drop in for a chat and a cup of tea

899 posts   Page 21 of 36   1 ... 18, 19, 20, 21, 22, 23, 24 ... 36
by danpeirce » Fri Jan 25, 2013 1:46 am
pygmy_giant wrote:A lot of the complaints in this thread are that BASIC is er, basic.

Well - duh.

"BASIC - more harmful than useful?" - No.

"BASIC - the best programming language ever?" - No - its er, basic.

Despite that alot of its features are echoed in other languages - many skills learned from using BASIC are transferrable.

The fact that so much blather on this website is devoted to slagging it off shows how significant it is and how much of a debt alot of us owe to it for giving us a springboard into other languages.

Well despite the subject name of the discussion the posts in the last few days have actually been quite evenhanded and the point has not been "slagging" BASIC but to point out there is now a better alternative to that can be used to teach programming concepts to beginners. Times change and programming languages have been evolving.
User avatar
Posts: 88
Joined: Thu May 10, 2012 8:32 am
Location: Richmond & Surrey BC Canada
by DavidS » Fri Jan 25, 2013 1:53 am
rurwin wrote:
pybmy_giant wrote:Did it do us any harm?

I'd give a cautious "yes" to that. At the time I was learning BASIC nobody knew any different, but then modularisation, structured programming and information hiding became required methodologies. We had to learn them, and it was not as easy as it might have been had we learned to program like that from the start. There are still too many global variables in a great many programs; there are still too many cases where the implementation details of modules are intrinsic to the way they are used. Then came event-driven programming, Document-View and object orientation, which required a quantum shift in the way the programmer even thought about an implementation.

With BBC BASIC you do have structured programming (more than C, and almost as much as Pascal), you do have event driven programming (Look at the WIMP Programming examples).

Re-implementing those BASIC programs took me back to my BBC Micro days, but not in a good way. I found myself looking at a line of code like
Code: Select all
MODE 27
and thinking, "why is that not a named constant or even a string? Is the programmer supposed to remember the extents and bit-depth of thirty-odd modes?" I looked at code with REPEAT loops closed with UNTIL FALSE in an IF statement, and UNTIL TRUE elsewhere, and wondered how that distorts a student's understanding of structured programming. Yes it is the equivalent of BREAK and CONTINUE, but there is a conceptual difference.

Most languages have different aproches of implementing what the C derived languages tag as continue and break.
As to screen mode handling how do you do it in C, C++, Assembly?
You would implement a set of defined constants for the functions that you use for changing the screen modes, correct? Do the same thing in BBC BASIC, nothing is stopping you. I am often frustrated at the over use of named constants in many languages, having to look through 100s of #define statements to find what the numaric value is can be very tedious (often needed when porting things).

I looked at this
Code: Select all
SYS "Wimp_Initialise",200,&4B534154,"MyApp"
and wondered how anyone could think that was a reasonable thing to put in a new-user tutorial. It was that tone more than anything else that horrified me about the tutorial as a whole; it assumed the whole mindset as it was in the 1980's when we did not know any better -- spaghetti code, magic numbers, obscure "clever" techniques, the whole works -- and yet it was published in 2009. The author's approach to programming was literally stuck 30 years in the past.

It is not an absolute beginners tutorial, this is for after you have alread a very good understanding of BBC BASIC.

It assumes structured programming (not speghetti code), and it is a lot simpler than the means of doing the same in most other HLLs. Lets see you do the same in C++ as simply as that on the bare OS (no extra libs). There ARE libs out there for BBC BASIC that simplify this even more, just like there are with C, C++, Charm, Pascal, Oberon, etc.

I have no strong feelings about using BASIC to teach programming, so long as it is done in a modern manner and teaches techniques that are not counter-productive. It is possible to use modern techniques in any language -- I've used OOP techniques in FORTH, which did not even have structures, let alone objects built-in -- and it is trivial to write good, modern, maintainable BASIC code that will teach students to produce code the way they will be required to in industry.

I would agree. What ever language is used can be good, so long as not to much is hidden from the very young students. BASIC is just one option.
But if those tutorials are indicative of the way BASIC will be taught then it will damage the students' education and I am against it.

On this one I strongly dissagree. If you do not think it is good to teach good structured, well maintainable modern programming skills then I do not understand what you want to teach.

pygmy_giant wrote:"BASIC - the best programming language ever?" - No - its er, basic.

Beginers All purpose Symbolic Instruction Code. Well of course it is not the best it is Beginers, though as to what is the best overall general purpose language, ask n programmers and you will have n^5th answers :-) .

TO THE POINT OF THE THREAD:
if the correct dielect of BASIC is used it can encourage structured programming, and good habbits, with out removing to much from the control of the programmer to be usefull for teaching the very young.

There are many many options for a first language, each and every one has its pros and cons; I can not see BASIC being any more or less harmful than any other choice.
ARM Assembly Language: For those that want: Simple, Powerful, Easy to learn, and Easy to debug.
User avatar
Posts: 1251
Joined: Thu Dec 15, 2011 6:39 am
Location: USA
by DavidS » Fri Jan 25, 2013 2:06 am
Having spent the day digging around ROOL source code manually tracing the execution of the USB stuff, and considering the change of direction of this thread in the past 14 hours:

Should I still finish the conversion of the above Python? I was intending to after I caught up on the forums, though this thread has changed a good bit since this mourning.
ARM Assembly Language: For those that want: Simple, Powerful, Easy to learn, and Easy to debug.
User avatar
Posts: 1251
Joined: Thu Dec 15, 2011 6:39 am
Location: USA
by DavidS » Fri Jan 25, 2013 2:23 am
rurwin wrote:I see the code on the Opening Windows chapter and am horrified at the thought of teaching kids the bit-mangling and pointer maths necessary to get a simple window on the screen. Whereas you see me using a standard, universally accessible library to render it down to the above code as hiding stuff they need to know. And to be honest, that's an argument I am never going to win because there is no screen handling at all in the Linux kernel, much less windows handling. At it's root, putting a window on the screen is done by Xlib, it's still a library, it's still in user-space, and nobody ever uses it because it is too low level.
For very young very begginers I would agree that libraries can be useful in dealing with the GUI, though I have always beed aposed to seasoned programmers that rely on library piled on top of library to implement things, if this is actualy needed it is a sign of the underlying system being to dificult to program for (and part of the cause of the modern problem of SUPER BLOAT).

As to children programming for the WIMP once they have a reasonable grasp on BBC BASIC see:
Growse.com
Though you will have to search for the downloads (they are not there). There are many ohter resources that use BBC BASIC libraries to keep it simple for those that do not yet understand pointers, and such.
ARM Assembly Language: For those that want: Simple, Powerful, Easy to learn, and Easy to debug.
User avatar
Posts: 1251
Joined: Thu Dec 15, 2011 6:39 am
Location: USA
by pygmy_giant » Fri Jan 25, 2013 2:58 am
danpierce said:

Well despite the subject name of the discussion the posts in the last few days have actually been quite evenhanded and the point has not been "slagging" BASIC but to point out there is now a better alternative to that can be used to teach programming concepts to beginners. Times change and programming languages have been evolving.


Fair comment - but that kinda goes without saying.

Personally I never use it, but if it wasn't for BASIC I would never have been able to learn C as C isn't really a beginner friendly language so for that I'm grateful.

Maybe I am behind the times, but if I was to opt for a interprated rather than compiled language I suspect that BASIC on certain platforms would stand up if not outpace these new fangled languages performance wise for er, basic, programming. Better depends on context.

Humans are more evolved than chimpanzees but they cant climb trees as well, or sell more teabags.
Posts: 1566
Joined: Sun Mar 04, 2012 12:49 am
by danpeirce » Fri Jan 25, 2013 6:02 am
pygmy_giant wrote:
Personally I never use it, but if it wasn't for BASIC I would never have been able to learn C as C isn't really a beginner friendly language so for that I'm grateful.


This is quite surprising to me because neither FORTRAN or BASIC were at all helpful to me when it came to learning C. Pascal on the other hand was very helpful. I never had any exposure to structured programming concepts before I took a Pascal course. Perhaps the version of BASIC you learned actually did include elements that promote structured programming. But here is one of the significant problems with BASIC. It it is so badly fragmented into so many variants that we are likely not even talking about the same thing.
pygmy_giant wrote:Maybe I am behind the times, but if I was to opt for a interprated rather than compiled language I suspect that BASIC on certain platforms would stand up if not outpace these new fangled languages performance wise for er, basic, programming. Better depends on context.

Humans are more evolved than chimpanzees but they cant climb trees as well, or sell more teabags.

Yes, better depends on context. When FORTAN was first developed speed was everything. People had to be convinced that a language higher than assembly could produce programs that were not not too slow (CPU time was expensive because computers were very expensive). BASIC was a simpler descendent of FORTRAN.
More recently it has been recognized that software is expensive to produce. Modularity has become much more important. The cost of new software is much more reasonable if old code can be reused. To do this successfully without introducing new bugs in previously working code clean interfaces between modules are essential. That is why there was a trend first to structured programming and then to OOP. The thesis I linked a couple days ago pointed out additional issues.
There is no point in 2013 and beyond to teach a language that does not encourage a style that can produce modular code. There is no point and remaining stuck on 1960's imperatives. So ABC was an attempt to do the same things that BASIC was trying to do but since ABC had significant limitations it did not take hold. Python was influenced by ABC but Python is also extensible so it has legs and is becoming increasingly popular.

By the way I am so pleased that I get to crawl into a bed tonight rather than climb a tree and make a nest. Arthritic knees you know. Also, the life expectancy of a chimpanzee is only 45 and I am 52. Not only that but I get a lot of joy from programming and well chimps just don't get to do any.
User avatar
Posts: 88
Joined: Thu May 10, 2012 8:32 am
Location: Richmond & Surrey BC Canada
by rurwin » Fri Jan 25, 2013 7:53 am
DavidS wrote:
But if those tutorials are indicative of the way BASIC will be taught then it will damage the students' education and I am against it.

On this one I strongly dissagree. If you do not think it is good to teach good structured, well maintainable modern programming skills then I do not understand what you want to teach.

By "this tutorial" I was referring to the BASIC tutorials you had me read. They do not teach good structured, well maintainable modern programming skills. Far from it.
User avatar
Moderator
Moderator
Posts: 2890
Joined: Mon Jan 09, 2012 3:16 pm
by jamesh » Fri Jan 25, 2013 10:01 am
BASIC : Fragmented versions, inconsistent variants, no longer used in industry, not the same between platforms, no path from simple to advanced structures and classes, easy to learn.
Python : Well defined, consistent, used in industry, same on all platforms, easy path to more class based code, easy to learn.
Scratch : Well defined, consistent, not industrial, same on all platforms, not particularly sophisticated, big jump to a 'normal' language, GREAT for young children, easy to learn.

Hmmm.

And I grew up with BBC BASIC - the original one, not the Archimedes one.
Moderator
Moderator
Posts: 10528
Joined: Sat Jul 30, 2011 7:41 pm
by pygmy_giant » Fri Jan 25, 2013 11:54 am
And it gave you a spring board into other more grown up languages.

BASIC doesn't seem to have done you any harm. I doubt you had to undergo a course of counselling after learning BASIC. I suspect you simply retained and transfered those skills to the languages you use now.

Sure you can't create a linked list in BASIC but most code uses the fundamental control structures available in it if..then..else, procedures, funtions, arrays, even do...while etc... OOP, Libraries and modular code do not remove the need for these.

I'm not chapioning BASIC, BASIC isnt my language of choice, but neither is python or scratch. I don't disagree with what you are saying but you can't criticise BASIC for being basic. It does what it says on the tin.

Why do people feel threatened by BASIC and seem to want to 'stamp it out' or ridicule it? Why cant they just view it with warm fuzzy nostalgia. If adults or kids want to use it - why not? It won't corrupt them - it will alow them to experiment and have fun.
Posts: 1566
Joined: Sun Mar 04, 2012 12:49 am
by danpeirce » Fri Jan 25, 2013 12:27 pm
pygmy_giant wrote:And it gave you a spring board into other more grown up languages.

BASIC doesn't seem to have done you any harm. I doubt you had to undergo a course of counselling after learning BASIC. I suspect you simply retained and transfered those skills to the languages you use now.

Sure you can't create a linked list in BASIC but most code uses the fundamental control structures available in it if..then..else, procedures, funtions, arrays, even do...while etc... OOP, Libraries and modular code do not remove the need for these.

I'm not chapioning BASIC, BASIC isnt my language of choice, but neither is python or scratch. I don't disagree with what you are saying but you can't criticise BASIC for being basic. It does what it says on the tin.

Why do people feel threatened by BASIC and seem to want to 'stamp it out' or ridicule it? Why cant they just view it with warm fuzzy nostalgia. If adults or kids want to use it - why not? It won't corrupt them - it will alow them to experiment and have fun.

In my view it is simply a dead end.
I have no problem with people playing with it or any other language.
I just don't want to see public funds for public education supporting a weaker alternative when there are better alternatives. Society invests a lot of money in public education.
By the way Python (a stronger alternative) can be just as much fun and it has better potential to be useful down the road.
Last edited by danpeirce on Fri Jan 25, 2013 12:36 pm, edited 1 time in total.
User avatar
Posts: 88
Joined: Thu May 10, 2012 8:32 am
Location: Richmond & Surrey BC Canada
by DavidS » Fri Jan 25, 2013 12:35 pm
Yes BASIC is fragmented, this is a truth. We are running an ARM based computer that has the ability to run an OS that was designed for the ARM, and a BASIC that does promote structured programming.

@pygmy_giant:
I would think that BASIC gave most of us our 'spring board' into other languages ;-) and I think that this is the big one, we all need a stepping stone when we were kids to get us going. Many (like me) started with LOGO went on to BASIC followed by Structured BASIC into Assembly then to compiled BASIC followed by all the other languages.

@Jamesh:
Yes BASIC is fragmented. We have the advantage of an ARM based system that can run RISC OS, and BBC BASIC V, this gives a good standard for a good structured BASIC that supports pointers and modularity for the RPi.

@ruwin:
Ok those tutorials are far from the best examples. Though I could point out some for 'modern languages' that are just as bad. These just happend to be the ones that come with RISC OS Pi.

danpeirce wrote:This is quite surprising to me because neither FORTRAN or BASIC were at all helpful to me when it came to learning C. Pascal on the other hand was very helpful. I never had any exposure to structured programming concepts before I took a Pascal course. Perhaps the version of BASIC you learned actually did include elements that promote structured programming. But here is one of the significant problems with BASIC. It it is so badly fragmented into so many variants that we are likely not even talking about the same thing.

This depends on the version of BASIC. There may be many different verients, though we once again have the advantage of a well defined BASIC that supports libraries and pointers.

pygmy_giant wrote:ersonally I never use it, but if it wasn't for BASIC I would never have been able to learn C as C isn't really a beginner friendly language so for that I'm grateful.

Maybe I am behind the times, but if I was to opt for a interprated rather than compiled language I suspect that BASIC on certain platforms would stand up if not outpace these new fangled languages performance wise for er, basic, programming. Better depends on context.

Definitely, BBC BASIC outperforms any other interpreted language that I have yet used. And becouse BBC BASIC V is a modular and structured language it is even good for reasonably complex applications. I have recently done a good deal of testing the speed of interpreted BBC BASIC and it performs about 3 to 4 times slower for the same task (line for line translated) done in C compiled with GCC -O3. This says quite a bit in the favor of BBC BASICs speed as I know of compiled languages that do not do so well.
ARM Assembly Language: For those that want: Simple, Powerful, Easy to learn, and Easy to debug.
User avatar
Posts: 1251
Joined: Thu Dec 15, 2011 6:39 am
Location: USA
by DavidS » Fri Jan 25, 2013 12:44 pm
pygmy_giant wrote:And it gave you a spring board into other more grown up languages.

BASIC doesn't seem to have done you any harm. I doubt you had to undergo a course of counselling after learning BASIC. I suspect you simply retained and transfered those skills to the languages you use now.

Sure you can't create a linked list in BASIC but most code uses the fundamental control structures available in it if..then..else, procedures, funtions, arrays, even do...while etc... OOP, Libraries and modular code do not remove the need for these.

Which BASIC?
You most definitely can create linked lists in BBC BASIC V, as well as trees, and most other things. I think that the only thing missing is pointers to procedures/functions.

I'm not chapioning BASIC, BASIC isnt my language of choice, but neither is python or scratch. I don't disagree with what you are saying but you can't criticise BASIC for being basic. It does what it says on the tin.

Yes this is very true. BBC BASIC V is a simple language, that does support the more advanced concepts, modularity, pointers, etc.

I do use BBC BASIC V a good bit for two things:
1) I like the flexability of its assembler, so I do much of my assembly this way.
2) It simplifies the design of a mildely optimizing compiler when you want to add a language that does not yet have a compiler for RISC OS, or the existing compiler does not at all optimize.

Why do people feel threatened by BASIC and seem to want to 'stamp it out' or ridicule it? Why cant they just view it with warm fuzzy nostalgia. If adults or kids want to use it - why not? It won't corrupt them - it will alow them to experiment and have fun.

Thank you.
ARM Assembly Language: For those that want: Simple, Powerful, Easy to learn, and Easy to debug.
User avatar
Posts: 1251
Joined: Thu Dec 15, 2011 6:39 am
Location: USA
by pygmy_giant » Fri Jan 25, 2013 12:45 pm
@ danpeirce - Fair point.

I wonder whether though we should look at this in perspective.

No one is suggesting we should be hot housing primary school kids like Korean olympic gymnasts to become super-nerds.

I would suggest that the first programming language is not that important and that all programming in any language should be encouraged. If there are teachers or parents or kids who want to use BASIC or FORTRAN or COBOL or assembler (you can't get much more 'basic' than that) because thats what they feel comfortable with - why not?

I would suggest that most programming students do not end up earning a living from programming and that the benefits they get from it are significant and incidental. Those that do do because they are attracted to the concepts and activity rather than one particular language.

I accept that there is a need for standardisation within the education system, but that fundamentally it should focus on principles and make kids aware that there are many programming languages for many reasons.

If the secretary for state for education, or whoever sets the curriculum sasy all kids must learn only Python, or whatever, then great - go with that, but you can't ignore the past or avoid the future, which may not be python.

Some kids might actually wnat to study the history of computing just like some kids are interested in the history of art.
Posts: 1566
Joined: Sun Mar 04, 2012 12:49 am
by DavidS » Fri Jan 25, 2013 12:52 pm
danpeirce wrote:
pygmy_giant wrote:And it gave you a spring board into other more grown up languages.

BASIC doesn't seem to have done you any harm. I doubt you had to undergo a course of counselling after learning BASIC. I suspect you simply retained and transfered those skills to the languages you use now.

Sure you can't create a linked list in BASIC but most code uses the fundamental control structures available in it if..then..else, procedures, funtions, arrays, even do...while etc... OOP, Libraries and modular code do not remove the need for these.

I'm not chapioning BASIC, BASIC isnt my language of choice, but neither is python or scratch. I don't disagree with what you are saying but you can't criticise BASIC for being basic. It does what it says on the tin.

Why do people feel threatened by BASIC and seem to want to 'stamp it out' or ridicule it? Why cant they just view it with warm fuzzy nostalgia. If adults or kids want to use it - why not? It won't corrupt them - it will alow them to experiment and have fun.

In my view it is simply a dead end.
I have no problem with people playing with it or any other language.
I just don't want to see public funds for public education supporting a weaker alternative when there are better alternatives. Society invests a lot of money in public education.
By the way Python (a stronger alternative) can be just as much fun and it has better potential to be useful down the road.

Nice to know that you have the ability to know what the future holds in 16 to 20 years, when the kids we teach today will be out of university and looking for jobs. Besides they will have had plenty of time to learn many other languages before that.

And as to public funds to education; Public education is no longer what it once was :-( . Now in order for a kid to get a real education they either need to be tought by there parents, or a good private institution. As such I do not understand what your statement of public education has to do with this in any way.

It is clear that you are anti BASIC, and I think that this has clouded your view.
ARM Assembly Language: For those that want: Simple, Powerful, Easy to learn, and Easy to debug.
User avatar
Posts: 1251
Joined: Thu Dec 15, 2011 6:39 am
Location: USA
by DavidS » Fri Jan 25, 2013 12:55 pm
I am neither anti BASIC or pro BASIC. There are many options out there, BASIC is just one. I do not feel that there is anything wrong with BASIC especialy as a beginers language.
ARM Assembly Language: For those that want: Simple, Powerful, Easy to learn, and Easy to debug.
User avatar
Posts: 1251
Joined: Thu Dec 15, 2011 6:39 am
Location: USA
by danpeirce » Fri Jan 25, 2013 1:23 pm
pygmy_giant wrote:@ danpeirce - Fair point.

I wonder whether though we should look at this in perspective.

No one is suggesting we should be hot housing primary school kids like Korean olympic gymnasts to become super-nerds.

I would suggest that the first programming language is not that important and that all programming in any language should be encouraged. If there are teachers or parents or kids who want to use BASIC or FORTRAN or COBOL or assembler (you can't get much more 'basic' than that) because thats what they feel comfortable with - why not?

The cost will be in training teachers to actually be competent to teach programming, and getting these teachers into schools. At our local high school no programming is being taught. I expect this is common. In my opinion there needs to be more emphasis on science and technology and wise choices need to be made.
pygmy_giant wrote:I would suggest that most programming students do not end up earning a living from programming and that the benefits they get from it are significant and incidental. Those that do do because they are attracted to the concepts and activity rather than one particular language.

True enough. But, realistically we need a program to train teachers and the program needs to include a real language so that computer labs can be done. A choice would have to be made on which language to include and out of the choices available today I'd go with python.
pygmy_giant wrote:I accept that there is a need for standardisation within the education system, but that fundamentally it should focus on principles and make kids aware that there are many programming languages for many reasons.

If the secretary for state for education, or whoever sets the curriculum sasy all kids must learn only Python, or whatever, then great - go with that, but you can't ignore the past or avoid the future, which may not be python.

Some kids might actually wnat to study the history of computing just like some kids are interested in the history of art.

I have no problem with someone learning the history of programming and general programming concepts but I believe it would be beneficial to have programming taught at least in secondary school and students need to be able to do real exercises on a real computer so a programming language is essential. Also, in my opinion if this were done well programming could also be incorporated into other subjects like math and science. It would be my hope that using computers and programming in a math course could help make the subject less tedious for a lot of students since a computer is good at doing things people find very tedious. Perhaps computers in science and especially physics could help make these classes more attractive to students.
User avatar
Posts: 88
Joined: Thu May 10, 2012 8:32 am
Location: Richmond & Surrey BC Canada
by jamesh » Fri Jan 25, 2013 1:43 pm
pygmy_giant wrote:And it gave you a spring board into other more grown up languages.

BASIC doesn't seem to have done you any harm. I doubt you had to undergo a course of counselling after learning BASIC. I suspect you simply retained and transfered those skills to the languages you use now.

Sure you can't create a linked list in BASIC but most code uses the fundamental control structures available in it if..then..else, procedures, funtions, arrays, even do...while etc... OOP, Libraries and modular code do not remove the need for these.

I'm not chapioning BASIC, BASIC isnt my language of choice, but neither is python or scratch. I don't disagree with what you are saying but you can't criticise BASIC for being basic. It does what it says on the tin.

Why do people feel threatened by BASIC and seem to want to 'stamp it out' or ridicule it? Why cant they just view it with warm fuzzy nostalgia. If adults or kids want to use it - why not? It won't corrupt them - it will alow them to experiment and have fun.


I never said BASIC had done me harm, although I do believe that it has meant learning other languages (C, or C++ for example) has been more difficult than had I started with, for example, Pascal or Python. I was also not critising BASIC, I was pointing out some very relevant difference with a couple of other options. I was also not trying to stamp it out or ridicule it. The point is I believe there are better alternatives to BASIC for teaching programming. Pascal, Python would both be a better option, or Scratch for young children. Time and technology has moved on from BASIC.

JFYI, I wrote a application for my local coal merchant in BBC BASIC, that used linked lists in disk files for transaction processing. He used it for a number of years until I had to port it to QBASIC on a PC...
Moderator
Moderator
Posts: 10528
Joined: Sat Jul 30, 2011 7:41 pm
by danpeirce » Fri Jan 25, 2013 1:45 pm
DavidS wrote:Nice to know that you have the ability to know what the future holds in 16 to 20 years, when the kids we teach today will be out of university and looking for jobs. Besides they will have had plenty of time to learn many other languages before that.

Kids come to University today with no programming knowledge at all. The best we can do is choose the best alternative currently available. Based on trends up to now I'd go with python for pre university training.
DavidS wrote:And as to public funds to education; Public education is no longer what it once was :-( . Now in order for a kid to get a real education they either need to be tought by there parents, or a good private institution. As such I do not understand what your statement of public education has to do with this in any way.

The whole point of the Raspberry Pi is to get programming into public education and this forum is on raspberrypi.org. The Raspberry Pi exists to help change the current situation but I don't think just the raspberry pi and some educational material is going to be enough. I think there also needs to be outreach from universities to provide workshops to teachers in their communities to get some training. Perhaps full blown courses as well.
DavidS wrote:It is clear that you are anti BASIC, and I think that this has clouded your view.

You might think that except as I have pointed out to you earlier Universities are not teaching BASIC. They look for languages that can demonstrate all the concepts they think are essential.
User avatar
Posts: 88
Joined: Thu May 10, 2012 8:32 am
Location: Richmond & Surrey BC Canada
by DavidS » Fri Jan 25, 2013 2:08 pm
danpeirce wrote:
DavidS wrote:Nice to know that you have the ability to know what the future holds in 16 to 20 years, when the kids we teach today will be out of university and looking for jobs. Besides they will have had plenty of time to learn many other languages before that.

Kids come to University today with no programming knowledge at all. The best we can do is choose the best alternative currently available. Based on trends up to now I'd go with python for pre university training.

This is an unfortunate truth. I could understand Python as a good second or third language (depending on if the kid began before any school, or began in primary school) once programming is introduced into the curiculum for public/private education. Though first start them with a language that shows the flow of execution (teach them about algorithms with out yet calling it algorithms). And a procedural language is much better for this than an overly OO language. It does not have to be BASIC. I have repedetely stated that there are many other options, though this particular thread is about BASIC.

DavidS wrote:And as to public funds to education; Public education is no longer what it once was :-( . Now in order for a kid to get a real education they either need to be tought by there parents, or a good private institution. As such I do not understand what your statement of public education has to do with this in any way.

The whole point of the Raspberry Pi is to get programming into public education and this forum is on raspberrypi.org. The Raspberry Pi exists to help change the current situation but I don't think just the raspberry pi and some educational material is going to be enough. I think there also needs to be outreach from universities to provide workshops to teachers in their communities to get some training. Perhaps full blown courses as well.

I agree with this completely. Unfortunately there are many things that are directly related that are supposed to be present in the education that are lacking to an extreme. In order to get CS back into public education we will also have to improve many other areas that are lacking at the same time. And this will take some time.

We will need to start to teach kids how to do the basic arithmatic calculations again. Most kids make it through school with out knowing how to do many of the basic calculations. We will have to bring back boolean algabra (in elementry school it was called logic math in my school). The concept of equations will have be brought back to the 2nd grade like it was when we were kids.

We will have to bring back teaching the difference between additive and subtractive prime colors.

And most importantly we will have to teach kids how to learn (this is very much lacking from the current curiculum).

DavidS wrote:It is clear that you are anti BASIC, and I think that this has clouded your view.

You might think that except as I have pointed out to you earlier Universities are not teaching BASIC. They look for languages that can demonstrate all the concepts they think are essential.

BASIC is not the only option, as stated repeditly. Though this thread is about BASIC.

Unfortunately most university cources do not teach any troditional procedural languages, and those that do focus on C. C is not a very good language for teaching 5 to 7 year old kids. And my point has repeditly been that these kids need to learn a good simple procedural language that will hold there atention in order to be grounded for the next level of there education in CS. It does not matter if this language has any relation to BASIC or not. It only matters that it keeps there interest and teaches them the concepts, and lends it self to structured programming, AND IS NOT OO. OO should be taught after procedural programming is understood.

You keep dismissing BASIC out of hand, hence my statement.
ARM Assembly Language: For those that want: Simple, Powerful, Easy to learn, and Easy to debug.
User avatar
Posts: 1251
Joined: Thu Dec 15, 2011 6:39 am
Location: USA
by jamesh » Fri Jan 25, 2013 2:22 pm
BASIC is dismissed, because Python is better suited for teaching procedural coding, and can subsequently be used to teach OO without having to learn a new language from scratch. That's the point we are trying to get across. Not that BASIC is BAD, but that Python is BETTER.

To my eyes, at the procedural level, BASIC and Python are pretty similar. But Python can be used for OO later, and is also used in big projects outside of teaching. It is better defined (i.e. Python2 on any platform is the same, as with Python 3), and has a much better 'upgrade' path from simple to complex code.
Moderator
Moderator
Posts: 10528
Joined: Sat Jul 30, 2011 7:41 pm
by DavidS » Fri Jan 25, 2013 2:56 pm
I am aware that there are many views on the best way to teach young people to program. I think that one of the big misconceptions is the idea that they can not understand it until age X. Remember that it is no more dificult to teach a child than teaching them how to read (and a lot easier than teaching an english speaking child to read english [we have a complicated language, with many rule exceptions]). So herin is my view:

If it were up to me I would say:
1 FIRST: Begin by teaching kids that you can do interesting things with a computer, using something simular to LOGO. Begin with something akin to turtle graphics, then on to very simple procedure grouping akin to "ON something DO" in LOGO. This is greate for kindergarden and first grade.
2 SECOND: Teach them a good simple structured procedural language such as PASCAL (or maybe BASIC) with support for modules (Standard Pascal does not have this). Give them a good feel for declaring everything and structured procedural programming. This should not take more than one semester.
3 THIRD: Start to teach them modular programming, using the same language used for step 2.
4 FOURTH : Get them into structures. This is the bases of OO, though not yet including methods.
5 FIFTH: Get them understanding memory addressing and pointers (a core concept for how OO works).
6 SIXTH: Teach some OO. Get them into using objects.
7 SEVENTH: Teach them to create objects, use inheretence, etc.
8 EIGHTH: Teach them how OO works. Show them how an object is nothing more than a structure containing the data elements of an object, and that a method is nothing more than a standard procedure that takes a pointer to the current instance of the object as one of its arguments, that is normally hidden (in many languages refferenced as this).

By this time they will be in the 5th or 6th year of school (Grade in the US), and ready for more formal CS education in intermediate and secondary (high) schools, for those that continue with that path. Then once they reach university they will have a good background and be able to continue with CS with little difficulty, if they so choose.

Also do remember to teach them good habits to commenting code. This should be an implicite statement though just in case I am explicitely stating it.

jamesh wrote:BASIC is dismissed, because Python is better suited for teaching procedural coding, and can subsequently be used to teach OO without having to learn a new language from scratch. That's the point we are trying to get across. Not that BASIC is BAD, but that Python is BETTER.

To my eyes, at the procedural level, BASIC and Python are pretty similar. But Python can be used for OO later, and is also used in big projects outside of teaching. It is better defined (i.e. Python2 on any platform is the same, as with Python 3), and has a much better 'upgrade' path from simple to complex code.
I feel that Python is not the best alternative for very young first time programmers, as you already have to use class methods before you do any IO. Even Hello world requires using a class method. See the rest of this post above.
ARM Assembly Language: For those that want: Simple, Powerful, Easy to learn, and Easy to debug.
User avatar
Posts: 1251
Joined: Thu Dec 15, 2011 6:39 am
Location: USA
by gritz » Fri Jan 25, 2013 2:57 pm
jamesh wrote:BASIC is dismissed, because Python is better suited for teaching procedural coding, and can subsequently be used to teach OO without having to learn a new language from scratch. That's the point we are trying to get across. Not that BASIC is BAD, but that Python is BETTER.

To my eyes, at the procedural level, BASIC and Python are pretty similar. But Python can be used for OO later, and is also used in big projects outside of teaching. It is better defined (i.e. Python2 on any platform is the same, as with Python 3), and has a much better 'upgrade' path from simple to complex code.


It's also cross platform, portable, reasonably widespread and doesn't exist in 1*10^99 subtly different forms (I can live with Python being two point something and three point something). It's a pragmatic choice. I don't think that there's anything wrong with learning Basic per se - especially considering that the actual coding is only a small part of the entire process of application development that kids will be taught - engineering is engineering, after all - but if you're going to align to a standard it's probably not the best place to start.

Although this thread is full of reasonable argument on both sides it's also an ample demonstration of why nothing ever gets done in open-source land. Education is a business and grown-up decisions need to be made.
Posts: 449
Joined: Sat Jan 28, 2012 2:33 am
by jamesh » Fri Jan 25, 2013 3:51 pm
DavidS wrote:I am aware that there are many views on the best way to teach young people to program. I think that one of the big misconceptions is the idea that they can not understand it until age X. Remember that it is no more dificult to teach a child than teaching them how to read (and a lot easier than teaching an english speaking child to read english [we have a complicated language, with many rule exceptions]). So herin is my view:

If it were up to me I would say:
1 FIRST: Begin by teaching kids that you can do interesting things with a computer, using something simular to LOGO. Begin with something akin to turtle graphics, then on to very simple procedure grouping akin to "ON something DO" in LOGO. This is greate for kindergarden and first grade.
2 SECOND: Teach them a good simple structured procedural language such as PASCAL (or maybe BASIC) with support for modules (Standard Pascal does not have this). Give them a good feel for declaring everything and structured procedural programming. This should not take more than one semester.
3 THIRD: Start to teach them modular programming, using the same language used for step 2.
4 FOURTH : Get them into structures. This is the bases of OO, though not yet including methods.
5 FIFTH: Get them understanding memory addressing and pointers (a core concept for how OO works).
6 SIXTH: Teach some OO. Get them into using objects.
7 SEVENTH: Teach them to create objects, use inheretence, etc.
8 EIGHTH: Teach them how OO works. Show them how an object is nothing more than a structure containing the data elements of an object, and that a method is nothing more than a standard procedure that takes a pointer to the current instance of the object as one of its arguments, that is normally hidden (in many languages refferenced as this).

By this time they will be in the 5th or 6th year of school (Grade in the US), and ready for more formal CS education in intermediate and secondary (high) schools, for those that continue with that path. Then once they reach university they will have a good background and be able to continue with CS with little difficulty, if they so choose.

Also do remember to teach them good habits to commenting code. This should be an implicite statement though just in case I am explicitely stating it.

jamesh wrote:BASIC is dismissed, because Python is better suited for teaching procedural coding, and can subsequently be used to teach OO without having to learn a new language from scratch. That's the point we are trying to get across. Not that BASIC is BAD, but that Python is BETTER.

To my eyes, at the procedural level, BASIC and Python are pretty similar. But Python can be used for OO later, and is also used in big projects outside of teaching. It is better defined (i.e. Python2 on any platform is the same, as with Python 3), and has a much better 'upgrade' path from simple to complex code.
I feel that Python is not the best alternative for very young first time programmers, as you already have to use class methods before you do any IO. Even Hello world requires using a class method. See the rest of this post above.


1) Use Scratch.
2-8) Use Python.

The hello world program for Python does't use class methods, it's almost the same as BASIC.

Code: Select all
print "Hello, World!"
Moderator
Moderator
Posts: 10528
Joined: Sat Jul 30, 2011 7:41 pm
by pygmy_giant » Fri Jan 25, 2013 10:11 pm
sounds like a plan - I think there is a lot of similarity between languages, and a need for language independant learning.

One example might be to get kids to role play and pretend to be a computer themselves to help them grasp algorithms and control structures etc. They could do this by following a flow diagram or psuedo code to perform a simple task like sorting coins into order. They could also write programs for each other to follow as a problem solving exercise.

I mean that as a complimentary exercise rather than as a cheap alternative to buying IT equipment.

Hats off for writing a linked list in BASIC btw - I would not know where to start with that.
Posts: 1566
Joined: Sun Mar 04, 2012 12:49 am
by pygmy_giant » Fri Jan 25, 2013 10:45 pm
As said already - integrating programming with math and science/tech also seems natural.
Posts: 1566
Joined: Sun Mar 04, 2012 12:49 am