Educational Programming Language

General programming chat and advice for beginners

74 posts   Page 2 of 3   1, 2, 3
by murkle » Tue Nov 15, 2011 11:59 am
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.


You might be interested to know that MEI have just started work on an A Level Maths module that will include some programming (probably using TI-Nspire)
Posts: 5
Joined: Tue Oct 18, 2011 7:47 pm
by feeley » Tue Nov 15, 2011 8:27 pm
I hope that the R-Pi will have some implementation of the Scheme programming language preinstalled as it is one of the important languages for teaching CS. The Gambit Scheme system (http://gambit.iro.umontreal.ca) in particular is a full-featured, fast and lightweight implementation of Scheme. It should compile "out of the box" on ARM (after all there's a version for iPhone/iPad and Android). It has an interpreter with a good debugger, and also a Scheme-to-C compiler which can (and has) been used for mainstream programming.
Posts: 1
Joined: Tue Nov 15, 2011 8:09 pm
by abishur » Tue Nov 15, 2011 9:47 pm
The good news is that if it's available for (insert your linux distro of choice here) then even if it doesn't come preinstalled then you'll be able to download from your package manager (or if you use the model A with no ethernet, then download the package to your SD card, then install it back on your r-pi ;) )
Dear forum: Play nice ;-)
User avatar
Forum Moderator
Forum Moderator
Posts: 4250
Joined: Thu Jul 28, 2011 4:10 am
Location: USA
by antiloquax » Sun Nov 20, 2011 11:54 am
I am a teacher with limited programming experience. I want to get Raspberry Pi to each kids to code. I am learning Python 3, as that looks like a pretty decent choice, although I have heard a little about Kids Ruby, which sounds interesting.
I would be interested in any advice / thoughts other users have.
mark
Posts: 406
Joined: Sun Nov 20, 2011 11:37 am
by tufty » Mon Nov 21, 2011 10:09 am
Python is a pretty good choice, it's uncluttered by syntax and "instant". It's even a pretty good candidate for livecoding. "Instant feedback" is good, almost imperative, for teaching kids.

The real problem is finding something that's gonna "hook" the kids and still get across the concepts you want to get across. A lot of that depends on the age group you're targetting, but music or games are probably the simplest way of doing it
Posts: 1367
Joined: Sun Sep 11, 2011 2:32 pm
by winkleink » Mon Nov 21, 2011 11:02 am
I've seen the comments that the Educational Programme for R-Pi will be launched in 2012, so has any consensus been reached on the default programming language so resources can be developed?

For me as it is getting a lot of votes it would be Python with Pygame (assuming P-Pi supports the SDL Libraries)

Show a simple game like the ones on this page.
http://cs.simpson.edu/?q=pytho.....e_examples
Then let their creativity go wild and have them modify it.
[embed][/embed]

For this to work the critical piece is SDL support (I expect Python is a go) so will Raspberry PI support SDL by the time the Educational Launch happens?

There is also a massive amount of resources, demos and completed programs available on the Pygame site.
http://pygame.org/news.html

Make it fun, make it interactive, encourage creativity and the kids will want to play.

Back to the 80's - the BBC Micro really helped but to me it was the freedom to tinker that really got me excited and drove me on. My teachers in school had no idea how to program they just held the key to the computer room. We learned from each other and in a supportive but competitive way.
Twitter:Winkleink
Google+: Winkleink
User avatar
Posts: 217
Joined: Mon Nov 07, 2011 9:12 am
Location: UK
by antiloquax » Mon Nov 21, 2011 5:05 pm
Quote from tufty on November 21, 2011, 10:09
Python is a pretty good choice, it's uncluttered by syntax and "instant". It's even a pretty good candidate for livecoding. "Instant feedback" is good, almost imperative, for teaching kids.


Thanks, Tufty! :D I'll persevere with Python.
Posts: 406
Joined: Sun Nov 20, 2011 11:37 am
by droxim » Mon Nov 21, 2011 8:36 pm
I would vote for Python. I prefer lua as a clean, well designed language but Python has a community that is much more helpful to beginners. Lua people will help you once you have proven that you have made the effort to learn the basics, whereas Python people actively encourage beginners.
Posts: 4
Joined: Sun Nov 20, 2011 10:30 pm
by asb » Tue Nov 22, 2011 5:55 am
Quote from winkleink on November 21, 2011, 11:02
For this to work the critical piece is SDL support (I expect Python is a go) so will Raspberry PI support SDL by the time the Educational Launch happens?


I've run a number of SDL-based applications on my alpha board.
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 794
Joined: Fri Sep 16, 2011 7:16 pm
by winkleink » Tue Nov 22, 2011 10:06 am
I've run a number of SDL-based applications on my alpha board.


Yeah. This has just confirmed for me that the R-Pi will be easy to develop on.
There are so many resources for learning programming for beginners with Python such as http://www.briggs.net.nz/log/w.....-for-kids/ and then for Pygame something like http://codentronix.com/2011/04.....-breakout/ as a starter program would show what is possible.

Being called PyGame I think is a plus and a minus. Game will maybe make kids more interested, while educators may not like the idea of the goal being to program games.

For me it is the perfect way to get into programming. Start with what you care about and expand from there.
Twitter:Winkleink
Google+: Winkleink
User avatar
Posts: 217
Joined: Mon Nov 07, 2011 9:12 am
Location: UK
by hawkwolf » Thu Nov 24, 2011 11:24 am
Posts: 3
Joined: Thu Nov 24, 2011 11:20 am
by winkleink » Thu Nov 24, 2011 3:49 pm
Looks like hawkwolf is just a bad poster on forums.

Greenfoot appears to be a about teaching and learning JAVA.
From the site the sponsors are University of Kent, Oracle and La Trobe University

I wandered around the site and it looks legit.

hawkwolf - I'd recommend you provide a bit more details with your posts otherwise they just look like spam or worse
Twitter:Winkleink
Google+: Winkleink
User avatar
Posts: 217
Joined: Mon Nov 07, 2011 9:12 am
Location: UK
by st599 » Mon Nov 28, 2011 10:28 am
Occam or Ada.
Posts: 26
Joined: Mon Sep 05, 2011 1:29 pm
by obarthelemy » Mon Nov 28, 2011 12:11 pm
@st599: I doubt the targeted young kids could/should use a razor !
Posts: 1399
Joined: Tue Aug 09, 2011 10:53 pm
by elmicker » Tue Nov 29, 2011 10:33 pm
I'd really have to question those who are suggesting the likes of assembly and C. It's one thing to think longingly of your days hacking away in BASIC and assembly, it's quite another to try and engage IT-literate kids with computing by throwing them back to the 1970s.

Speaking as someone who was only recently taught to program, in an undergraduate environment, on a top-level course, I can say with some surety that the #1 best way to discourage people from getting into computing is introducing them quickly to very low level or very high level concepts. The most loathed parts of our course were the computer architecture module and the computation module. Assembly code and formal languages. Two things you do need to understand to advance in computing, but two areas you really want to avoid when trying to get people motivated.

When you teach someone in a very low level language, you aren't teaching them programming, you aren't teaching them algorithms or critical thinking, you're teaching them how to grapple with the quirks of whatever 70s throwback it is you're teaching them in. The only time someone should have to learn how to construct an algorithm in assembly is if they're learning assembly. The actual programming should be as simple as possible, to keep focus on the task at hand.

I'd also question those of you suggesting Ada or other niche languages. The other thing to bear in mind is that this is the real world. Kids will need help, the teacher won't always be there to help them and not everyone is as motivated as the captain of the computing club. If you're teaching them in Niche Teaching Language #45, or in Archaic Throwback #8 (and that goes for esoteric libraries of popular languages too!) when our IT-literate students try to solve their problems (which means going to google, not poring over an instruction manual as of old), they'll run into a world of Java-, C#- and Python-educated professionals who won't have the foggiest clue what they're talking about. Same goes for when they go out into the big wide world on their own and find themselves equipped with a language that is utterly useless unless you happen to be employed by BAe.

Introductory computing should avoid low-level concepts: It should teach computing, not how to use a language or architecture. It should teach computation, programming, algorithms and broader computer science, not the inexplicable quirks of C pointer arithmetic or ARM's memory layout. Think how many examples of "C++" hello world you've seen that have included "using namespace std" and "return 0;" for no other reason than because the student has been told to so they don't fall into traps later on. This kind of nonsense is exactly what you want to avoid. If code is there it should, if possible, be understood and be there for a reason.

Introductory computing should avoid being repetitive: Writing boilerplate code to do something simple and previously-covered is tedious. Everyone knows this. Teaching should involve languages with complete and fully-functional libraries. This also allows students to be introduced to the wider programming community by accessing community-produced libraries, and gives a serious sense of satisfaction once they start re-using their own code.

Introductory computing should be instantly gratifying: Powerful things should be easy to do. This links in to the above two. People are far more likely to stick with it if there are constant feel-good moments of "Whoah, I made that happen" without the hours of trawling through errors and manuals and help pages.

Introductory computing should lead on to wherever the student wants to go: If the student wants to learn low-level concepts after cutting their teeth, there should be an easy transition; think constructing simple stack machines in high-level languages. Likewise if they find a high-level area they want to investigate, it should be as simple as downloading a new library and finding a task to complete. The library should be there, as should the support.

For that reason, the choice of language should be obvious. We want something accessible, powerful, simple, flexible, extensible and popular. What we want is Python.

Or Java, but Python is definitely more fun, but those teaching are far more likely to know Java due to its enterprise use.

Obviously, the vast majority of this (except the principles about staying interesting, avoiding repitition, instant gratification etc.) only really applies to software. Robotics and computer engineering bods are another world entirely.
Posts: 5
Joined: Tue Nov 29, 2011 10:08 pm
by obarthelemy » Tue Nov 29, 2011 10:52 pm
I broadly agree with you,especially on the focus on achieving results and the pitfalls of the "I did it that way" school of thought.
One caveat: Google does make even very esoteric languages more approachable: as long as there is *one* active, friendly forum somewhere in the whole wide world, beginners should be able to get a bit of help. I'd even argue that oppressed/belittled/waning minorities (who's thinking "Forth" ? :-p ) might be more inclined to help and proselytize. But you're right, it's probably a much smarter move to try and leverage the brand recognition, hive mind, and documentation,support and tools of a widespread language.
Posts: 1399
Joined: Tue Aug 09, 2011 10:53 pm
by Guthur » Thu Dec 01, 2011 12:02 am
I haven't read through most of this thread, so this may have been mentioned...

In my view it is more beneficial to approach the task from the direction of wanting to teach Computer Programming rather than teaching a particular language. This is of course assuming that goal is to teach young people the fundamentals of this particular aspect of Computer Science. If the goal is to fill CVs with the correct buzzwords that is a different matter.

For what it is worth, my language preferences with this in mind would be Scheme or Python, with a bias towards Scheme. The rational being that both, and Scheme in particular, have very simple syntax and grammar reducing any language impedence to the learning process, while remaining very powerful and fexible languages that provide the means to learn about a wide area of science of computer programming.

Just my 2 cents, plus its hard to resist language debates, must try harder...
Posts: 2
Joined: Wed Nov 30, 2011 11:45 pm
by Jim Manley » Sat Mar 17, 2012 5:30 am
There are other threads on this subject of the "best" programming language for teaching kids, but, I wanted to point a few things out in response to specific previous statements.

The creators of Unix and C are on record saying that, if they had known that those technologies would ever even be considered for use in real-world, mission-critical systems and applications, they never would have let them get beyond the walls of Bell Labs.  They were intended for computer science research, and nothing more.  As some have pointed out, C is just a general-purpose assembly language that is readily ported to any hardware by customizing a few hundred lines of assembly code specific to the target architecture to establish the lowest-level memory and file management functionality.  The compiler compiles itself and the OS after that.  This is not something that should be used for an introduction to computing for adult novices, much less child novices.

Ada is not a niche language, and I'm going to go into some detail here because so few computing professionals actually know much about it.  It currently ensures that most of the tens of thousands of airliners tens of thousands of feet over our thick little skulls every day stay up there, and that military weapons systems get their jobs done in actual life-and-death circumstances.  Companies like Boeing, General Electric, and many others use Ada because it's the only way that they've been able to achieve the Software Engineering Institute's (SEI) Capability Maturity Model (CMM) Level 5 (the highest), which ensures repeatable, reliable, completely understood and fully-documented code that gets jobs done, and fails gracefully, in the rare instances where it ever fails.  It was designed from the beginning with exception handling foremost, among other iron-clad strengths such as the strongest type-enforcement on the beat, bullet-proof synchronization of processes (it was also designed from the ground up for multi-processor systems decades before multiple cores became all the rage), solid memory management, etc.

Its syntax descends from Algol through Pascal, Modula, and other strongly-typed, structured procedural programming languages (it doesn't precede them, as stated above), although it has been extended over the past couple of decades to include very solid object-oriented, real-time, and many other features.  Some have misinterpreted these features as making the language bloated and too big for anyone to master - such people have never tried to actually use Ada - you only need to learn the features required for the task at hand in order to make use of it.  In fact, this was done in order to make the largest number of programmers familiar with other programming languages, architectures, and styles to be productive in Ada with the minimum of ramp-up time.  Perhaps the biggest benefit of Ada is that there is only one correct version of it - compilers, linkers, and all other tools used to develop and build software with it must pass mathematically-rigorous compliance tests.  Ironically, this was pioneered in AT&T Unix System V, but, was never enforced, and the variations of C and C++ compilers/etc., and *n*x OSes that have proliferated is the exact opposite of what has been achieved with Ada.  However, Ada is not suited for introducing kids to computing, either - not because the kids couldn't handle it, but, because the teachers and most software "professionals" couldn't.

I've posted elsewhere in the forum that only about 15% of the effort expended on any project is spent writing code, with the rest split between requirements analysis and specification, high and low level design, test case development and execution, debugging, documentation, and corrective and enhancement maintenance.  The choice of the programming language is therefore not the most important factor in successful software development - there are many others that must be considered.  What these factors demonstrate is that there are a lot of things that kids can (and should) learn and that programming (implementation) is just one of them, and most of them are not even technical in nature.  This is very good news, because it widens the scope of skills and interests needed for software projects to include those needed for success in any kind of project.  Kids can (and should) participate in software development, not just programming/implementation, such that their individual interests and natural skills can each contribute to the synergy of teamwork (the whole is greater than the sum of its parts).

I would also recommend Python and Java as the most likely usual suspects that should be considered to be used for teaching actual programming/implementation.  There are many educational subsets that have been built over the years, which I've listed with brief descriptions at:

http://elinux.org/RPi_Educatio....._languages

As for the disdain that some may have for kids gravitating toward playing games and, by extension, developing game software, it should be recalled that games have served to push the envelope in computing at least as much as anything else.  Military gaming and simulation is just another side of the same coin as gaming and virtual environments used for entertainment purposes, and have been another major force (not to mention significant source of funding) in shaping computing technology research and development.  Let the games begin!
The best things in life aren't things ... but, a Pi comes pretty darned close! :D
"Education is not the filling of a pail, but the lighting of a fire." -- W.B. Yeats
In theory, theory & practice are the same - in practice, they aren't!!!
User avatar
Posts: 1356
Joined: Thu Feb 23, 2012 8:41 pm
Location: SillyCon Valley, California, USA
by whiteshepherd » Sat Mar 17, 2012 7:59 am
This conversation is like saying what kind of fruit is best to get kids started on healthy eating?  It's a preference and point of view on your past experiences.

Myself like others on these forums, I'm going to throw my vote for the best educational language as Pascal.  It was designed from the ground up as a "teaching" language. When learning to program it teaches very good structure, order, and oop.  The Pascal program is written out in a easy to read English format which lets kids/adults who have no past experience learn strictly on the logic, loops, conditionals, and structure vs worrying about the hardware.

In fact I can write most program lessons in Pascal and compile it on Linux, Windows, Mac, Rasp-Pi, Sun, Amiga, OS/2, and on and on without any alterations for OS or hardware.  Kids for example can write a powerful/fun program on their Pi then compile it on their Windows PC to show their parents. In the bigger picture they can take what they learned and apply it to any other platform.  It is powerful enough to make advanced real world applications.

Lastly it can be found open source with a very HUGE community support group.  There are many flavors of Pascal around.  Myself I prefer Free Pascal.  There is a TON of free teaching video and online classes for Pascal/Free Pascal already.  This will supply ample ready made curriculum and online question support to any teachers who chose this language.

Others languages may be good choices as well.  But this is why I think Pascal is the best "starter" language.
Posts: 28
Joined: Thu Nov 03, 2011 7:59 pm
by lemio » Sun Mar 18, 2012 10:06 pm
At our school, the first 'real' language we learn is PHP (before that is HTML CSS and Game Maker), this is the language of the web; and the web is the future. So I like this approach.
Posts: 8
Joined: Sun Mar 18, 2012 9:58 pm
by jamesh » Tue Mar 20, 2012 1:38 pm
lemio said:


At our school, the first 'real' language we learn is PHP (before that is HTML CSS and Game Maker), this is the language of the web; and the web is the future. So I like this approach.


The web is one part of the future. But there are also a LOT of embedded devices out there that need programming. And as more everyday objects becomes 'computerised', the need for people who program in C and similar  increases.
Soon to be unemployed software engineer currently specialising in camera drivers and frameworks, but can put mind to most embedded tasks. Got a job in N.Cambridge or surroundings? I'm interested!
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 11630
Joined: Sat Jul 30, 2011 7:41 pm
by tufty » Tue Mar 20, 2012 2:48 pm
JamesH said:


lemio said:


At our school, the first 'real' language we learn is PHP (before that is HTML CSS and Game Maker), this is the language of the web; and the web is the future. So I like this approach.


The web is one part of the future.


Indeed it is.  I would disagree that PHP is the "language of the web" though.  There are countless web apps out there written in almost every language imaginable, almost all of which are better educational languages (and, indeed, better languages full stop) than PHP :)


But there are also a LOT of embedded devices out there that need programming. And as more everyday objects becomes 'computerised', the need for people who program in C and similar  increases.


C and assembler are the current "de facto" standards for embedded programming, yes.  However, with embedded processors becoming more and more powerful, that's liable to change.

Simon
Posts: 1367
Joined: Sun Sep 11, 2011 2:32 pm
by shirro » Tue Mar 20, 2012 11:50 pm
lemio said:


At our school, the first "real" language we learn is PHP (before that is HTML CSS and Game Maker), this is the language of the web; and the web is the future. So I like this approach.


This seems a popular approach. I know teachers here have a fairly restricted (dare I say out of date) curriculum for IT Studies and viewed a LAMP stack as a more interesting and open alternative to Microsoft tools. I think they have to jump through a set of hoops, web page validation, simple database app that it covers nicely. Unfortunately the whole world agrees (even many PHP users) that it is not a great language.

I always wondered why they didn"t go with Javascript. It is a messy language with some flaws, but as Crockford says there are some good parts. It can be used client side (browser) and server side (node.js) and on the desktop with Qt Quick (very relevant for taking advantage of those Raspberry Pi graphics). As such I reckon it probably deserves second place in the dynamic language choices after Python for the Pi. I would put Lua in third place. I prefer Lua of the three but it doesn"t have as high a profile. I think the grammar of Ruby and Perl makes them too complicated for beginners. Any good teaching language is basically going to be almost a subset of scheme with a  c/algol-like syntax: Python, Javascript, Lua.

For static languages I would suggest Go over C as a beginner language. You can get a lot more done with Go with less effort. Having said that C is a fairly small (not that hard to learn) language by todays standards and is still genuinely useful for many things.

The "industry" languages such as Java, C++, C# are too complicated I think.

The "academic" languages – Haskell, ML, LISP/Scheme are full of goodness but I think if you have a flexible dynamic language with lexical closures and first class anonymous functions you can probably get the ideas across a bit easier than leaping into monads, arrows and complicated type systems.
Posts: 248
Joined: Tue Jan 24, 2012 4:54 am
by andyl » Wed Mar 21, 2012 3:53 pm
shirro said:

I always wondered why they didn"t go with Javascript. It is a messy language with some flaws, but as Crockford says there are some good parts. It can be used client side (browser) and server side (node.js) and on the desktop with Qt Quick (very relevant for taking advantage of those Raspberry Pi graphics).

I'll tell you why I wouldn't recommend Javascript (despite liking Javascript a lot).

1. It is easy to write bad code in Javascript.  There is a lot out there by supposedly experienced developers which is bad.  The language design is far too lax about some things.

2. The prototype based languages seem a little off the beaten track.  The terminology is different.  Few will have had much exposure to idiomatic usage of prototype based languages.

3. Some quite poor books on the language.  Plus quite a poor spec.
Posts: 265
Joined: Tue Jan 10, 2012 11:05 am
by Nich00001 » Thu Mar 22, 2012 12:53 am
I like LabView for the sheer freshness of "Seeing" data flowing through the programs .... great for the visual type person.

bad points..

1. Expensive.

2. You can still write bad programs that can now have a pictorial "Error" as well as functional error.

But I'm still looking for an open source Visual Programming language to use at home.
Posts: 1
Joined: Thu Mar 22, 2012 12:44 am