Lakes
Posts: 267
Joined: Wed Aug 24, 2011 2:17 pm

Re: Educational Programming Language

Thu Aug 25, 2011 8:00 pm

http://processing.org/

Its free, well documented and easy to get started with a few lines of code, but leads onto advanced programming OOP if users want to learn that.

More to do with Graphics and Sound, which is good thing (I think) to get people programming stuff.

Nice series of tutorial videos

Runs on Linux, but would it run on a Raspberry Pi?

ShiftPlusOne
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 6053
Joined: Fri Jul 29, 2011 5:36 pm
Location: The unfashionable end of the western spiral arm of the Galaxy

Re: Educational Programming Language

Thu Aug 25, 2011 8:34 pm

Pie? PIE!??!

Anyway, never heard of it, thanks for sharing. It might be able to run on the Raspberry Pi. =)

Lakes
Posts: 267
Joined: Wed Aug 24, 2011 2:17 pm

Re: Educational Programming Language

Thu Aug 25, 2011 8:36 pm

Quote from ShiftPlusOne on August 25, 2011, 21:34
Pie? PIE!??!

Anyway, never heard of it, thanks for sharing. It might be able to run on the Raspberry Pi. =) I was hungry... :D

Edited original post :)

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

Re: Educational Programming Language

Fri Aug 26, 2011 6:02 pm

Quote from Lakes on August 25, 2011, 21:00
Runs on Linux, but would it run on a Raspberry Pi?

As long as it doesn't break alignment rules and will run gracefully within the 256Mb memory profile on the machine, probably so. I'd forgotten about it, but it's a good prospect to add to the tools available in a distribution if it will go on. Guess we'll just have to see when the devices become available since they've only got enough alpha boards to hand to the Foundation's devs right at the moment.

Styx
Posts: 1
Joined: Tue Aug 30, 2011 12:06 am

Re: Educational Programming Language

Tue Aug 30, 2011 1:10 am

if i'm not mistaken, processing is just java in disguise (run through a preprocessor), so if the raspberrypi has a java vm (which it should) it will run with no problems

Lucretia
Posts: 47
Joined: Sun Aug 28, 2011 10:49 pm
Contact: Website

Re: Educational Programming Language

Tue Aug 30, 2011 10:38 am

Ada, an Algol derived language like Pascal, only difference is, it provides *everything* you need. You can start small and then move onto separation (packages), generics, tasking and protected types, real-time, actually defining your types explicitly (i.e. defining exactly how many bits are used for a record element, the endian-ness, etc. see below), distributed apps, exception handling, etc.

The real-time and representation clauses are well worth it for this platform given the size.

You say you want to get kids learning, what's better spending your life in a debugger and trying to work out cryptic compiler messages or getting real compiler errors/warnings that actually tell you what's wrong and not spending your life inside a debugger? I'm not saying an Ada programmer won't spend some time in the debugger, but it is far less than the equivalent C derived language programmer. Not only that, but evidence suggests people who learn Ada become better programmers on other languages.

Luke.

subminiature
Posts: 43
Joined: Wed Nov 02, 2011 6:27 pm
Contact: Website

Re: Educational Programming Language

Thu Nov 03, 2011 3:51 am

Pascal and then Modular-2 were developed because Ada is too much, too big and too complex. Turbo Pascal won the game until Borland Delphi came along. But Visual Basic and VBA took over until .net.

BCPL, C, C++, Objective C, C# and Java all required a better disciplined programmer.

I agree a strong type programming language is easier to develop with and have checked.

These debates went on when BBC Model B put a form of BASIC on their machines and even RiscOS had a very powerful BASIC included, but RiscIX had a C compiler that produced slower applications.

Open Source languages and environment sound good, but a low cost, aimed at education and CBT is V-Delta with a history back to TenCORE where good programs can be written with the minimum of training and include advanced audio, video and graphics.

User avatar
GavinW
Posts: 90
Joined: Tue Nov 01, 2011 8:11 pm
Location: UK
Contact: Website

Re: Educational Programming Language

Fri Nov 04, 2011 4:54 pm

The last three decades have been littered with various attempts to sell this or that programming language or software package as an educational goodie. In the 80s Texas Instruments tried flogging microcomputers in the UK as well as the USA because they came loaded with Scheme, which had been used so successfully at MIT and many other places. They even bundled a copy of Abelson and Sussman's SICP with it. Then there was LOGO; programming for kiddies and you got a toy turtle too. In universities they used to start students off with Haskell or ML. Then they went for Java. Some institutions, unable to distinguish between the incompatible demands of teaching and research, decided that MatLab or Mathematica was what students needed - so that the poor students got to see the computer as a magic calculator for drawing pretty graphical output and had no idea how or why it worked.
Much depends, therefore, on what you mean by education. . Do you want kids to be able to push the right buttons, or to think for themselves? I hope that the Raspberry Pi has been conceived more with the latter notion in mind. When we tried to get business input to a scheme to promote joint qualifications in mathematics and computer science we ran straightaway into an impasse. Each business (I will not risk libel by saying who they were) demanded a different programming language be used in the curriculum. I have grave suspicions about promoting this or that piece of equipment or software for education. The political and commercial undercurrents swirl too dangerously below the surface.
otium negare negotium vanum

jacklang
Posts: 166
Joined: Thu Aug 04, 2011 10:59 am

Re: Educational Programming Language

Fri Nov 04, 2011 5:36 pm

The community group from Computers at School who are kindly writing the manual https://groups.google.com/group/raspberryfilling?hl=en are looking at

Scratch/BYOB and Python as beginning languages

clivef
Posts: 67
Joined: Thu Oct 27, 2011 1:40 pm

Re: Educational Programming Language

Fri Nov 04, 2011 7:35 pm

At the end of the day, the language is not as important as the concepts. We want to encourage computational thinking and you don't even need a computer to do that.

P.S. My dad is bigger than your dad :D

clivef
Posts: 67
Joined: Thu Oct 27, 2011 1:40 pm

Re: Educational Programming Language

Fri Nov 04, 2011 7:38 pm

Quote from Lucretia on August 30, 2011, 11:38... evidence suggests people who learn Ada become better programmers on other languages. I can't really let that pass in an anecdotal bish bosh about programming languages :) . References please...

Lance Constable Carrot
Posts: 19
Joined: Fri Jul 29, 2011 6:37 pm

Re: Educational Programming Language

Fri Nov 04, 2011 8:10 pm

In my oppinion it's very important to learn C, because:
- There are lots of other languages with a similar syntax (Java and C#).
- It condenses the basic concepts needed to program in any language.
- If you learn it, you can always code for a living in the future.
- After learning it you can easily learn C++.
- After learning C++ you can learn any other language.
- It is the fastest language when used right.
- With C you can code from a tiny microcontroller to mainframes.

User avatar
GavinW
Posts: 90
Joined: Tue Nov 01, 2011 8:11 pm
Location: UK
Contact: Website

Re: Educational Programming Language

Fri Nov 04, 2011 8:49 pm

Sorry, Carrot, I cannot agree with some of your opinions, particularly the second. Important though C remains, an awful lot of new and fundamental insights into programming were only developed well after the mid-70s when C was born. There are thousands of references I can point you at, which you might enjoy. Have a look, for example, at Why Functional Programming Matters by J.Hughes, The Computer Journal, Vol 32, number 2, April 1989. Or have a read of Structure and Interpretation of Computer Programs by Abelson and Sussman ISBN 0-262-01077-1 (1985). This used to be required reading for all computer science students at MIT. It will not bring you uptodate, but it deals with concepts that are not expressible in C. Of course, C is computationally complete, but that is not the same as expressibility.
otium negare negotium vanum

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

Re: Educational Programming Language

Fri Nov 04, 2011 9:14 pm

Likewise: I'll go through them one by one.

- There are lots of other languages with a similar syntax (Java and C#).
There are indeed. However, syntax is largely irrelevant except in teaching, where you need as little syntax as possible to get in the way. C has some really "interesting" syntax at times (see later)

- It condenses the basic concepts needed to program in any language.
Dealt with quite nicely by Gavin. I'd add that you don't even need to get into functional programming; for OO you can't enforce encapsulation, it's hard to do dynamically typed programming, message passing is painful to implement...

- After learning it you can easily learn C++.
You can easily learn C++ as it implements a superset of C. You can't easily learn C++. Nobody can easily learn C++.

- After learning C++ you can learn any other language.
I'd suggest that, after learning C++, it's hard to learn any language that doesn't resemble C++. It's rather like Dijkstra's comment on BASIC* in that respect, actually.

- It is the fastest language when used right.
When used even "almost right", assembler is faster and tighter, and C (like most languages) is rarely used anything close to right.

Not that I'm knocking C, mind. It's a very handy language, and is probably the closest thing to a portable assembler that there is. It's also relatively maintainable (compared to the horrors of trying to maintain and / or extend any sizeable C++ codebase).

But it's a bloody awful language for learning to program.

Here's one I came across earlier. Bear in mind that I've been programming C since the '80s, and understand what this code is supposed to do, yet it still had me scratching my head for a bit as to how it actually did it.
typedef struct obj {
struct obj *p[1];
} obj;
typedef obj * (*primop)(obj *);
#define primopval(X) ((primop)(X)->p[0])

...

obj *apply(obj *proc, obj *vals, obj *env) {
return (*primopval(proc))(vals);
}

Simon

* In case you've never seen it :
It is practically impossible to teach good programming to students that have had a prior exposure to BASIC: as potential programmers they are mentally mutilated beyond hope of regeneration.

Lance Constable Carrot
Posts: 19
Joined: Fri Jul 29, 2011 6:37 pm

Re: Educational Programming Language

Fri Nov 04, 2011 10:16 pm

Quote from tufty on November 4, 2011, 21:14

typedef struct obj {
struct obj *p[1];
} obj;
typedef obj * (*primop)(obj *);
#define primopval(X) ((primop)(X)->p[0])

...

obj *apply(obj *proc, obj *vals, obj *env) {
return (*primopval(proc))(vals);
}


I think no one starts teaching C with that example.

The first time I saw a phong shading 3D example in C (in 1988 when I was 13) I understood that code and I didn't think C was difficult, I thought C was awesome. I've been coding since that time, and now I code for a living in C, C++ (both on Linux), Objective C (iPad) and C# (Windows) during the week. I can only say C is awesome, and I think it could be a good programming language to learn programming. The cons are that you need to have good and simple libraries on which to relay.

I agree C isn't the smartest language in the world, but it's functional. You can do everything you want, even the Linux kernel.

User avatar
johnbeetem
Posts: 945
Joined: Mon Oct 17, 2011 11:18 pm
Location: The Mountains
Contact: Website

Re: Educational Programming Language

Fri Nov 04, 2011 10:37 pm

IMO Pascal is still a great language for teaching good programming practices. I'm glad to see implementations are still around.

After Pascal, IMO one should really learn and master assembly language. With assembly language you must really understand what the computer is doing at the bare metal. Assembly language is key to writing good high-level language programs because you have insight as to how high-level contructs map to the bare metal, so you're in a better position to write high-level code that maps well. IMO you're a better compiler user if you've been a compiler for a while.

C is a terrific language after you have learned good programming practices from Pascal and have mastered assembly language. This is because C is not really a high-level language: it is more like a portable assembly language which uses structured programming notations. C may look like a high-level language at the source code level, but its execution is at the machine language level and when it breaks the errors are often machine-level errors, like a buffer overflow trashing other arrays or the stack. With no mastery of assembly language, good luck fixing problems like that.

The advantage of Pascal over C is that the run time is safer (e.g., checking array limits) and the syntax is more like English: "while a do b" instead of "while (a) b", "repeat b until a" instead of "do b while (a)", and ":=" for assignment to remind the programmer that the value is transferring from right to left and so "=" can be used to test for equality instead of the IMO rather ugly "==".

Once you've learned Pascal, learning C is just a matter of picking up K&R.

JMO/YMMV

P.S. tufty, I love your C alphabet soup example. I've always found C function pointer notation a real pain.

Bakul Shah
Posts: 321
Joined: Sun Sep 25, 2011 1:25 am

Re: Educational Programming Language

Fri Nov 04, 2011 11:55 pm

I think a competent programmer should know multiple languages including C but if it were up to me, I'd pick Scheme as the first language. Most of it is extremely simple, there are some decent introductory books on it, and Scheme being interactive you ignore dealing with a bunch of issues such as compilation, syntax/memory/type errors, crashes etc. [True, you can do some of the same with Python and it is a good compromise but IMHO not as good as Scheme. In about a semester a good student will be capable of writing an interpreter in Scheme for a major subset of Scheme. With that and teaching them how to write macros, you just taught them how they can extend Scheme to suit their own needs -- and *that* is very powerful! You can't do this with Python in a semester!] The thing about Scheme is you can start focusing on concepts pretty much right away and not get lost in the language syntax and type minutiae.

Ultimately I'd teach them about call-with-current-continuation & such but no use in scaring them for the first semester or two ;-)

The second language I'd teach them (may be concurrent with the first one) would be assembly language, not C, as it really teaches them how a processor works. They get a very good understanding of the cost of doing things and being comfortable with looking at assembly language is a valuable skill when debugging something complex (or catching compiler bugs) or writing compilers or special purpose code generators. But this would be for no more than a semester. Whipping up an assembler in Scheme would make use of both skills!

C would be my #3 language choice.

On the plus side for Python, there are lots of avaliable libraries & tools. This is an important criterion as you can build more useful things sooner and if you are motivated, you learn more.

subminiature
Posts: 43
Joined: Wed Nov 02, 2011 6:27 pm
Contact: Website

Re: Educational Programming Language

Sat Nov 05, 2011 12:17 pm

From the video clips the Raspberry Pi project had it's roots in wanting to address the lack of students entering computer science and those that do no having exposure to programming. Harping back to the days of the BBC Model B with BASIC 6502 assembler and the kind of projects that got some hooked on computer science and engineering.

Schools and the Government (UK) responded to skills in computers with ICT and the apparent pressure to learn Word, Excel, Powerpoint - M$ Office, a little about e-mail and Adobe Elements one Windoze computers.

When computer science was taught up to 16+ for GCSE the course had to include pupils who would never program no more than they would ever understand calculus and have difficult with percentages. The most able rang rings around the teaching staff that very very rarely happened in any other subject.

At college level - A Level or equivalent, and universities industry will expect skills that they can tap into without training. That includes experience in C, C++, C#, .net, SQL etc and largely look down on anything they don't use.

In terms of education of computer science good practices and understanding is best met - at first - using other languages than C. The way different children work with learning and planning a program has to be present and most students like early feed back to know if they have it 'right'.

Then also consider the amount of time they pupil might have. With 12-15 subjects on the time table there is little class time per subject. Keen and able students would also want to share what they have done with friends as happened with the school micros and programing before ICT.

I have helped learners with debugging and programing in many languages often remotely by phone but have never seen anyone do the same with C code - any help or discussion was written down in front of them even with two experienced - and highly paid - C programers they always seem to have start with it on screen or printed out.

Then there needs to be the support on this platform to learning and using the language but aimed at the pupil and at that level.

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

Re: Educational Programming Language

Sat Nov 05, 2011 4:49 pm

So what, exactly, would you suggest, apart from "not C for beginners" (a sentiment I wholeheartedly agree with)?

Simon

By the way, I'd suggest not referring to "windoze" and "M$" if you want to be taken seriously. That stopped being funny about 1998 or so, even for someone like myself, who despises MS, their fetid technology releases, and, above all, the effect their illegal monopolising has had on the IT industry as a whole (really, I can rant on about the latter for hours).

kme
Posts: 448
Joined: Sun Sep 04, 2011 9:37 am

Re: Educational Programming Language

Sat Nov 05, 2011 5:08 pm

Quote from tufty on November 5, 2011, 16:49
So what, exactly, would you suggest, apart from "not C for beginners" (a sentiment I wholeheartedly agree with)?The answer is simple: There is no "best" language. You pick the one where you can most easily help and suggestions. Use what your friends use, or your school or your parent(s). Human interaction is the most efficient way not to run into problem and give up.

subminiature
Posts: 43
Joined: Wed Nov 02, 2011 6:27 pm
Contact: Website

Re: Educational Programming Language

Sat Nov 05, 2011 7:10 pm

Quote from tufty on November 5, 2011, 16:49
So what, exactly, would you suggest, ... I'd suggest not referring to "windoze".

I don't have an answer and has been said there isn't a best.

But what ever language(s) is/are picked they need shared support for materials and for that an open field isn't very good.

I like BASIC - it worked on previous home computers - and VBA is very easy to teach and can produce very useful applications - at least in business. But in the classroom BASIC tutorials were very boring and only a few did anything that was useful to them.

V-Delta (roots in TenCORE) is designed to be used for teachers and for learning and has all the features that teach good programming and yet can produce more quickly than most languages useful applications. It isn't open source and the $38+$18 is too expensive and also it isn't ready yet but neither is a full boxed, packaged R-pi.

Looking at the scope and task that might be set in teaching programming - something possible already been done before but not for 12-16 years old for sometime may point to one language or other.

There doesn't have to be one language either. One to create games, one to create small applications and one for controlling sensors and robots.

And "windoze" is referring to the fact that after the Archimedes schools where bought into Intel PCs and expensive Microsoft license and updates (and that was a long time ago) which the heads and budget payers still see as the beginning and end of all discussions.

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

Re: Educational Programming Language

Sun Nov 06, 2011 8:24 am

I have to ask - are you affiliated with V-Delta?

WizardOfOZ
Posts: 76
Joined: Thu Oct 13, 2011 8:08 am

Re: Educational Programming Language

Sun Nov 06, 2011 9:33 am

Something to keep in mind while you debate $FAVORITE_LANGUAGE is that the environment is just as important as the programming language. I seriously doubt it is a coincidence that many individuals, who started programming on the 8 bit machines of yesteryear, are today actually quite accomplished at what they do. Yes, BASIC may not be the preferred choice, but those machines had:

*) Concurrency. You needed to tinker with and understand interrupts, meaning concurrency, in order to do many of the seriously interesting things back then. Interrupts may not be feasible today, but multi-threading is, possibly with message passing as IPC. (That would be hard(er) to mess up, compared to most other IPC mechanisms I can think of.)

Considering how bad many new programmers are at thinking about concurrency, combined with the importance of the subject on modern programming architectures, I'd say this should be a must-have, through library support or some such.

*) Low level access in assembler. Use $PREFERRED_HIGH_LEVEL_LANGUAGE for the overall program structure, and low level assembler for the super time critical bits, including easy integration of assembler snippets calls from within the primary language. The assembler-for-kids could have a (much) simplified machine model, which shaves off most of the complexity of the full CPU. Think a simplified assembler like a 32 bit 6502 (A, X, Y, SP, PC, Status), no multiplication nor division, very few addressing modes and limited number of OP codes/instructions. This seems relatively easy to do on an ARM CPU.

Many new programmers seem to have difficulties with optimization and refactoring of existing code, or even to think about speed/memory optimal code to start with. Doubly so if they have to invent new and non-trivial data-structures in order to do so. I believe this key skill in part comes from being forced to think about weird optimizations and tinkering with 'funny' algorithms in assembler, like binary division or a square root on a 6502... :)

*) Easy hardware access, if possible. The environment should provide easy access to hardware, possibly virtualized, so that no real setup need to be performed by the programmer. GPIO pins for use with external hardware interface and 'bitmapped' (probably 32 bit per pixel on the Pi?) screen area are the two primary ones needed. First one for flashing LEDs and whatnot, which will be very important to encourage further exploration, and the second to have something for your assembler subroutines/methods/functions to show off in. May need a library call to initialize, but once set up the environment should provide a *completely* transparent memory mapped I/O. PEEK and POKE calls the 21st century!

*) Graceful simplification. Must be *really* easy to get started with. I must confess I am not convinced I would have grokked functional programming back when I started out. It is fine to facilitate OO and more, but for starters you want:

10 print "Hello!"
20 goto 10

or similar.

Quote from tufty on November 4, 2011, 21:14
* In case you've never seen it :
It is practically impossible to teach good programming to students that have had a prior exposure to BASIC: as potential programmers they are mentally mutilated beyond hope of regeneration.

I have always wondered if this quote was written along the same vein as Newton's comment about his predecessors: "If I have seen further it is only by standing on the shoulders of giants." (Meant sarcastically as his view of his contemporaries was fairly low, and one of his most outspoken opponents was of low, physical stature.)

In any case the quote is funny, as the majority of programmers starting out in the eighties, started learning in BASIC. At least a few of them turned out not too badly.

subminiature
Posts: 43
Joined: Wed Nov 02, 2011 6:27 pm
Contact: Website

Re: Educational Programming Language

Sun Nov 06, 2011 11:42 am

Quote from tufty on November 6, 2011, 08:24
I have to ask - are you affiliated with V-Delta?

No and have no more informatiion on them or where they are at than their web page. I have programmed in TenCORE upon which it is based.

I am not affiliated with any hardware or software company.

User avatar
johnbeetem
Posts: 945
Joined: Mon Oct 17, 2011 11:18 pm
Location: The Mountains
Contact: Website

Re: Educational Programming Language

Sun Nov 06, 2011 8:23 pm

I have always wondered if this quote was written along the same vein as Newton's comment about his predecessors: "If I have seen further it is only by standing on the shoulders of giants." (Meant sarcastically as his view of his contemporaries was fairly low, and one of his most outspoken opponents was of low, physical stature.)

I was taught in USA science class that Newton was referring to intellectual giants like Galieo, Copernicus, and Kepler. Whatever. I like Brian Reid's corrolary:
In computer science, we stand on each other's feet.

Regarding Dijkatra:
It is practically impossible to teach good programming to students that have had a prior exposure to BASIC: as potential programmers they are mentally mutilated beyond hope of regeneration.

I find this personally insulting, since I was exposed to BASIC at an early age and found it a pain to do stacks and trees as you had to simulate recursion. String processing was a pain too since the BASIC I had access to didn't have string arrays. What an exhilarating release to be able to program in PDP-11 assembly language. So much easier to program in, and lightning fast execution.

While I see Dijkstra's point that it can be hard to unlearn bad habits, I believe it is possible to program well in almost any language, though some do indeed make it hard to do so. Also, absolute statements are generally wrong, including this one.

Return to “General programming discussion”