Deutsche Welle news article on Raspberry Pi - "Raspberry Pi and the new computer science kids"

The fact BASIC does not enforce good programming practices is why I think it is not ideal for learning. I do think everyone should have a go at assembly language just to make them really appreciate high-level languages.

I was also late to get hands-on experience with computers due to lack of resources.

--snip--

Unfortunately programming is my job ;-)

--
(\__/)  M. 
(='.'=) If a man stands in a forest and no woman is around 
(")_(") is he still wrong?
Reply to
Mark
Loading thread data ...

I disagree.

the most basic (sic!) thing is to get the idea of programming across quickly and easily. Basic does that.

Plenty of time to move on to structured approaches later when the deficiencies of BASIC make it perfectly clear why you should..

--
Ineptocracy 

(in-ep-toc?-ra-cy) ? a system of government where the least capable to lead are elected by the least capable of producing, and where the members of society least likely to sustain themselves or succeed, are rewarded with goods and services paid for by the confiscated wealth of a diminishing number of producers.
Reply to
The Natural Philosopher

I think a lot of that is down to the teacher - it's their job to teach good programming practice - afterall the determined Real Programmer can write FORTRAN programs in any language...

However yes, old BASICs were somewhat "intersting", but modern BASICs are much better - optional line numbers, full set of while/until loops, switch statements, named procedures, local variables, recursion, etc.

I had a good teacher all those years ago (34 ish now) mostly program in C these days and BASIC - but I had to write my own BASIC interpreter to find one that I liked ;-)

I do think that people can learn starting with a good BASIC - mostly because the entry level is zero - turn the computer on and there it is (although it takes a Pi 5 seconds to boot into my BASIC) but I don't see it as a solution, just a stepping stone - get kids intersted in programming, teach then the basics, then the ones who're really keen will move onto something else - be that Python, Pascal (or more likely Ada these days), C/C++, PHP, and so on.

Gordon

Reply to
Gordon Henderson

You could start here:

formatting link

--
Stuart Winsor 

Midlands RISC OS Show 13th July 2013
Reply to
Stuart

How does assembly language "enforce good programming practices"? Null terminated strings were common in assembly long before C was even a gleam in Dennis Ritchie's eye. And nothing in assembler prevents buffer overruns or any of the other dreaded programming mistakes. As a matter of fact, assembler doesn't prevent anything.

Not sure what "late" means. I first programmed (IBM 1401) in 1971. Didn't really care much for computers at that time and didn't get into it full time as a professional until 1980. While I did COBOL on IBM and Univac systems for a living I played with the 8080/Z80 on my own eventually moving on to the 6809, 68000 and PDP-11. Then the VAX and (gasp) Prime 50-series. Today I play with 6809, Z80, 68000, PDP-11, VAX and Alpha. And now, it looks like I will be adding ARM although I seriously doubt much is done on the rPI in languages lower than C.

Was mine, too. But at least for the moment, I am retired.

bill

--
Bill Gunshannon          |  de-moc-ra-cy (di mok' ra see) n.  Three wolves 
billg999@cs.scranton.edu |  and a sheep voting on what's for dinner. 
University of Scranton   | 
Scranton, Pennsylvania   |         #include
Reply to
Bill Gunshannon

You can write good structured code in BBC BASIC. It has most of the tools you would want. (Data structures are missing, but there are freely available libraries which add that.)

--
Alan Adams, from Northamptonshire 
alan@adamshome.org.uk 
http://www.nckc.org.uk/
Reply to
Alan Adams

Mark wrote

On the whole I agree with you about BASIC not being an ideal programming language , but BBC BASIC had (and still has) the a exciting feature of an inline assembler.

quote from wikipedia:- " One of the unique features of BBC BASIC was the presence of an inline assembler allowing users to write 6502 assembly language programs. The assembler was fully integrated into the BASIC interpreter and shared variables with it, which could be included between the [ and ] characters, saved via *SAVE and *LOAD, and called via the CALL or USR commands. This allowed developers to write not just assembly language code, but also BASIC code to emit assembly language, making it possible to use code-generation techniques and even write simple compilers in BASIC. "

--
John Rickman -  http://rickman.orpheusweb.co.uk/lynx 
Ein nasser Vogel fliegt nicht bei Nacht - Das ist der Sinn des Lebens.
Reply to
John Rickman Iyonix

On 19 Apr 2013 17:11:49 GMT, snipped-for-privacy@server1.cs.uofs.edu (Bill Gunshannon) declaimed the following in comp.sys.raspberry-pi:

If the assembler has an excellent macro facility, it even turns into a situation of everyone creating their own language out if it.

XDS CP/V Meta-Symbol carried that to an extreme. It didn't even have a native instruction set -- one had to specify a definition file for the Xerox Sigma processor in use (Meta-Symbol did have a macro to simplify the Sigma instruction definition, rather than using the more complex instruction definition macro -- I once used the latter to define the Intel 8080 instruction set).

Enjoy... I'm in a hybrid state... Just applied for retirement benefits from the company that laid me off 18 months ago, but recently employed at another company to get medical benefits (30 years at the former, combined with credit for not being a voluntary departee, means age 55 early retirement is only about $300/month less than waiting for age 60).

--
	Wulfraed                 Dennis Lee Bieber         AF6VN 
        wlfraed@ix.netcom.com    HTTP://wlfraed.home.netcom.com/
Reply to
Dennis Lee Bieber

On Fri, 19 Apr 2013 20:55:29 +0100, John Rickman Iyonix declaimed the following in comp.sys.raspberry-pi:

Flashbacks of my college days...

The FORTRAN-IV compiler on the Sigma allowed inline assembly (flagged by an "X" in column 1, as I recall). Could be useful to access individual bytes from a 32-bit word (especially as the system was addressed by 32-bit words, 16-bit was a half-word; one had to use indexed instructions to reach the extra three bytes of each word:

ld.i,3 2 ld.b,9 someword,3

reads just the 3rd byte at address 'someword' {been too long, I don't recall if it used ".mode" or some other notation

-- I do recall it was not like 8080 (or PDP-11/VAX/etc.) in that it had LD and STO, rather than MOV: opcode,register address/register,indexregister}

--
	Wulfraed                 Dennis Lee Bieber         AF6VN 
        wlfraed@ix.netcom.com    HTTP://wlfraed.home.netcom.com/
Reply to
Dennis Lee Bieber

Nothings new here. Ellott 503 Algol allowed inline assembler thanks to its /code/ reserved word (1967 vintage).

--
martin@   | Martin Gregorie 
gregorie. | Essex, UK 
org       |
Reply to
Martin Gregorie

Thanks Stuart!

That does look rather promising. Now all I have to do is yank one of the drives and measure up the belt length around the V grooved pulleys. Ideally, a 2mm square cross-section belt is required but I think a 2mm dia round cross section would serve almost as well provided I get the right length.

--
Regards, J B Good
Reply to
Johny B Good

Not a floppy drive. What I was talking about was a solenoid operated Data Cassette drive unit which relied on a 2mm square cross section drive belt running in the V grooved pulleys of the two contra-rotating capstain flywheels and a drive motor (reel table spindles were each directly driven via a spring cushion drive hub motor - no belts involved there).

I mentioned "Floppy Drive" only in the context that I was using the cassette drive as a substitute for the (then) very expensive floppy drive storage option (controller card and a single 5 1/4 inch 80 track floppy drive would have cost me nearly 300 quid! - the bare data cassette drives only cost me about a tenner each from my local electronics surplus dealer).

In the context of your question, I did briefly consider using an elastic band (but only briefly). Whilst an elastic band of suitable size would have gotten the capstain spindles spinning again, the stretching effect would have made then run slower and compensating for this by speeding the drive motor up would have resulted in unacceptably large speed variations (wow effect in audio tape deck terms). So, it was considered very briefly and just as quickly dropped.

--
Regards, J B Good
Reply to
Johny B Good

In this case it's the phrase "does not enforce" which is key to the issue of whether or not BASIC is an ideal language for learning. Most of us tend to learn more from our mistakes than from our 'successes'. IMHO, the straightjacket of a "well structured language" will not serve the novice programmer's need to learn, especially when trying to encourage innovative thinking.

If a programmer is prevented from being a bad programmer by virtue of the constraints of the language he's programming in, then how the Hell can he ascertain whether he's an intrinsically good programmer or just simply yet another bad programmer being saved from being 'found out' by the programming language he just happens to be using?

Fortunately for me, it's just a hobby. ;-)

--
Regards, J B Good
Reply to
Johny B Good

That, I feel impelled to point out, is its main charm. ;-)

--
Regards, J B Good
Reply to
Johny B Good

Assembly language 'enforces' good programming practice by ensuring that you are fully exposed at every level to the dire consequences of bad programming practice.

FSVO 'enforce' :-)

--
Ineptocracy 

(in-ep-toc?-ra-cy) ? a system of government where the least capable to lead are elected by the least capable of producing, and where the members of society least likely to sustain themselves or succeed, are rewarded with goods and services paid for by the confiscated wealth of a diminishing number of producers.
Reply to
The Natural Philosopher

Pascal is the language "inside" Delphi, which is still widely used. I use Free Pascal most days and it's being actively developed. (You know what they say about "fashion"!)

Reply to
Bob Martin

I agree, but what is seen as a strength in assembler is listed as a flaw in BASIC. One should also note that as odd as it sounds, BASIC was a strongly typed language. No conversions without a function to handle the cast.

bill

--
Bill Gunshannon          |  de-moc-ra-cy (di mok' ra see) n.  Three wolves 
billg999@cs.scranton.edu |  and a sheep voting on what's for dinner. 
University of Scranton   | 
Scranton, Pennsylvania   |         #include
Reply to
Bill Gunshannon

One could say the same about C. :-) You do realize that it is trivial to program an overrun in assembler wether you know the result or not. bill

--
Bill Gunshannon          |  de-moc-ra-cy (di mok' ra see) n.  Three wolves 
billg999@cs.scranton.edu |  and a sheep voting on what's for dinner. 
University of Scranton   | 
Scranton, Pennsylvania   |         #include
Reply to
Bill Gunshannon

And arrays normally have bounds checking too.

-Gordon

Reply to
Gordon Henderson

You mean, NAND (or NOR) only, right?

--
Roberto Waltman 

[ Please reply to the group, 
  return address is invalid ]
Reply to
Roberto Waltman

ElectronDepot website is not affiliated with any of the manufacturers or service providers discussed here. All logos and trade names are the property of their respective owners.