User avatar
RaTTuS
Posts: 10460
Joined: Tue Nov 29, 2011 11:12 am
Location: North West UK

Re: Best first language

Tue Jan 31, 2012 11:36 am

dicktonyboy said:


Benedict White said:


dicktonyboy said:


Why not start with SQL?  High level instantly testable?

Richard Wenner


How many games can you write in SQL?


Few agreed but for grabbing the attention of new students the command line interface to SQL can almost be discursive.  Make the semicolon stand for "Please" - otherwise nothing happens and it could be the Turin test all over again (well close).   Once the 'newbie' is delighted by the instant feedback you can then throw all these commands into PHP and you are away down the slide of coding.

Yum (group) install  PHP, MySQL and http - and there is a playpen for life.


reminds me of

http://xkcd.com/327/
How To ask Questions :- http://www.catb.org/esr/faqs/smart-questions.html
WARNING - some parts of this post may be erroneous YMMV

1QC43qbL5FySu2Pi51vGqKqxy3UiJgukSX
Covfefe

mgn1
Posts: 1
Joined: Tue Jan 31, 2012 11:20 am

Re: Best first language

Tue Jan 31, 2012 2:26 pm

Hi All,

I started ( far too long ago )  learning basic on a BBC B when it came out and then quickly progressed to 6502 assembly language . I learned the structure of good programming, what direct/indirect addressing was, reverse polish notation , what an A<->D converter was and how to control it and all the other fundamentals which have not changed that much since then.

This was predominantly down to a combination of my Dad and the most excellent books that were published alongside the machine itself and I hope that their equivalents are available too. Learning all that at a young age meant that pascal/C/C++/java etcetc are all easy to learn.

Now having the Dad role myself all I need are the books to help my children

Martin

User avatar
rurwin
Forum Moderator
Forum Moderator
Posts: 4258
Joined: Mon Jan 09, 2012 3:16 pm
Contact: Website

Re: Best first language

Fri Feb 03, 2012 12:17 pm

I've just come across this again, and since it's downloadable from the publisher, and on topic (sort of) here's a link to the MP3, and the link to the album that it's on.

packetship
Posts: 2
Joined: Fri Oct 21, 2011 9:04 am
Contact: Website

Re: Best first language

Fri Feb 03, 2012 6:30 pm

I think Greenfoot (Java) was briefly mentioned way back up there but not since, so I thought I'd throw it in again.  To my mind it has several advantages for a first "Real Programming" language (as opposed to Scratch, which is great for first concept building):

1) A really nice clean IDE where you can make sprites move about in about a minute and a playable game in 5 minutes, using real code and proper OO techniques

2) Loads of resources and examples from other people

3) It's a real-world language with a common surface syntax with C, C++, Javascript

4) There's a reasonable chance that teachers might know a bit of it

Dr.Alun
Posts: 3
Joined: Mon Jan 30, 2012 2:54 pm

Re: Best first language

Mon Feb 06, 2012 3:57 pm

Hello all (my two peneth )

There isn't a single "best" language for starting.  I've learnt through the experience of teaching undergrads that there is a trap in teaching them 'java' 'c' or whatever, is that you get trapped in syntax, rather than teaching programming.

Programming is about solving problems and translating them into making the computer do something.  An the fun, joy and excitement in seeing what was once a construct of your mind, made real in the flashing lights, moving image or game, on the computer.

On a practical level, start with bash (or bourne shell).  The syntax is not great, but very useable.  Since these will be Unix/Linux pcs, the shell is the principle way of interacting with it.  From a teaching point of view, there's no baggage about typing, it is interpreted, or run as programs.  It has the usual sequence-selection-iteration constructs that are quite clean.

I'm using the Arduino and Processing both with my kids and students.  This introduces them to C and Java.  The processing ide is a good case study, it puts any needed boiler plate round your code.  Your program can be a single line, something looking like a scripting language, filling in functions, or a fully fledged multi class java application.  The simplicity and ease of use in the key here, colleagues have complained about the over complicated ides (eclipse) used elsewhere.

Python is a good choice too.  Not too much baggage of the curly parenthesis and semi-colon.  But odd indentation if you're not used to it being enforced (ugrads, who for some reason never indent code!).

I can think of half a dozen other languages that all have reasons to commend themselves.

What am I trying to teach?  Programming as a general creative skill, which is language neutral.  I've had to learn and use something like 20 languages and dialects over the years, some have been and gone and others are still about (C is over 40 now).  Also the principles of computer systems, how to use them and work with them (shells again).  Then the whole fun of wiring in stuff and making it go.

Which language? (why not Postscript!) Any and all that allow interesting, exciting and useful things to be done.  For my money, it is the environment and tools that matter.  A simple start, very little syntactic baggage exposed, and the ability to rapidly progress onto bigger and better things.

But that's the great thing about open source and these projects, there's always at least 5 ways to do anything.

Alun

User avatar
DavidS
Posts: 4334
Joined: Thu Dec 15, 2011 6:39 am
Location: USA
Contact: Website

Re: Best first language

Tue Feb 07, 2012 3:51 am

Ok this is a dificult question.  I would say for children between 3 and 5 years old start with LOGO, for those 4 to to 8 Pascal in a form that can be compiled to memory and ran imediately (eg complete Pascal/TML Pascal on the Apple IIgs), or something very similar, for 7 to 12 year old kids go with Assembly.  Though this is only one mans opinion.

I guess that I just proved the old axiom 'Ask 100 programmers what the best language is for task x and you will get 2 to the 16th (65536) answers'.
RPi = The best ARM based RISC OS computer around
More than 95% of posts made from RISC OS on RPi 1B/1B+ computers. Most of the rest from RISC OS on RPi 2B/3B/3B+ computers

dave_s
Posts: 13
Joined: Wed Feb 08, 2012 7:23 pm

Re: Best first language

Wed Feb 08, 2012 9:20 pm

Hi All,
This is my first posting after reading all the arguments about different languages it seems everyone has their own favorite. Not all languages are easy to learn, but in an early learning evironment where the concepts to learn are more important then the semantics of any language. Then a language with with the least semantics but capable of showing all the concepts required, plus as far as some students are concerned, quick productivity then Python fits the requirement. 
The Foreword of 'How to Think Like a Computer Scientist: Learning with Python' by David Beazley gives a good argument for its use, and the book gives good coverage of the concepts of Computer Science.
http://www.openbookproject.net/thinkcs//
This site also has other educational material that teachers of CS may find useful.
Dave

garyk1968
Posts: 16
Joined: Thu Feb 09, 2012 8:50 am
Location: Bedfordshire
Contact: Website

Re: Best first language

Thu Feb 09, 2012 11:40 am

I find it really strange that anyone would mention assembler, its hardly a beginners language and I struggle to see what benefit it really delivers.

Like others here I started with a ZX81, learnt BASIC and then got a Vic20 then a C64 and then progressed to 6502 assembler. My first job was then doing 6800 assembler, only made easier as it was a 2 pass macro assembler and the company had delivered a ton of macros. In those days 6800 didnt even support multiplication or division operations so a) it wasnt that productive and b) its not that straight-forward and certainly not for someone learning a language.

For learning surely its about the instant gratification of learning a little, doing some coding and seeing results. That what made BASIC fun, you could easily do a few lines of code and have some output. I'm surprised that no-one has mentioned from a learning point of view the commerciality of a language. All being well learning erlang, haskell or the like but is it going to help you get a job when the skills in demand are Java/C# and SQL?

I think IDEs are very important. I went from assembler back to BASIC then a 4GL (dBase III). From there I went to foxpro (originally Foxbase) and there was a massive leap between v1 and v2 because of the introduction of a report designer and form designer. From there I went to Delphi in 95, never done pascal before then but the IDE was, and perhaps still is, massively productive.

My daughter is about to go to middle school and their computer department is well funded and they use scratch to teach programming. Is that the best thing? not sure but it comes down to instant results, do something and get feedback on where it works. Thats perhaps where a scripted language over a compiled one is better for educational purposes.

Gary

ta2025
Posts: 19
Joined: Wed Jan 25, 2012 6:29 pm

Re: Best first language

Thu Feb 16, 2012 3:04 pm

I took the time (2 hours) to read this entire thread.  There are many good reasons to teach many fine concepts to children, but the one overwhelming obstacle is that you will have to convince Johnny that writing his how "game" is better than waiting for EA or UbiSoft to come out with yet  another title that costs double the cost of a R-Pi.

Getting children engaged will be difficult is this enviroment where children are raised to  expect magical entertainment from these devices with no input from themselves.  I have seen suggestions from BASIC, through Python, C++, even SQL, COBOL and ADA (Seriously, do you think any kid is going to last 10 minutes in an Ada class?  Or in a non-graphical environment for that matter?)  Probably not.  You also don"t want them in a class that will bore them the other way either.  LOGO might be great for 4 year olds, but not many 4yo potential programmers are going to be connecting their first DIY R-Pi to their TV.

Think 10-14 year olds.

I was looking at the programming tools available in Android and Iphone / Ipad worlds also to get ideas (face it, where this is being marketed to is not an ADA, Algol, COBOL world)  and there are some really good programming environments out there with libraries and SDKs to do just about anything one could want creatively.

One caught my attention.  CODEA for Ipad http://twolivesleft.com/Codea/  is IDE/Interpreter and Compiler for kids just starting out with LUA.  Check it out.  In concept, it looks like something that would be ideal for R-Pi.  It really wouldn"t matter if the underlying language were BASIC, LUA or Python, but I think it should be one of those three.  the Codea project looks nice enough that I think it would suffice perfectly to clone that effort into the R-Pi.

Also, look at http://www.appgamekit.com It seems to be a system similar to Codea, but centered on BASIC.  One of the possible draws to children today are not trying to code the next Battlefield 3, but rather the next Angry Birds or "Chuck the Monkey" or anything.  If I were 12 and thought I had a chance to make a SIMPLE game that I could sell for $1.00 that would sell 25 million copies... (or as many R-Pi's are sold ), I would have spend 18 hours a day coding.. Unfortunately, in my day, the best you could program when I was 12 was Lunar Lander, Zork or Star Trek on a TRS-80.  Any of these new tools are more than capable of making the next Bird game.

I was also looking at FREEBasic.net  and it has a really nice interpreter / compiler / IDE as well though the interface is not as captivating as Codea.  I realize neither of these options are immediately available in their current form for the R-Pi, but from the discussions that some have given on this thread, it sounds well within their abilities to write a package like Codea.

Just my 2 cents.

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

Re: Best first language

Sat Feb 18, 2012 1:14 am

Will depend on the age of the pupil to a certain extent - if we are talking about young children then the more visual the better - for the 7-10 age range I would start them on LOGO.  For 9 to 11 age range I would move them on to Python - probably starting with simple shapes and animations via Pygame then some actual games.

allcardI
Posts: 4
Joined: Sat Feb 18, 2012 1:01 am

Re: Best first language

Sat Feb 18, 2012 1:21 am

First programming language, well my first language was Pascal.

If I was to suggest to someone new to the concepts of programming....Python or Ruby, although the philosophy of Python is a much better tool.

The only problem with Dynamic languages such as the above, is that they will not hold your hand if something goes wrong. Static Typing is such a boon when learning something new and the compiler helps you to find out what is wrong.

I would stay clear of anything where you drag and drop, I would say a good 3g Language with a static type system.

C based languages including java and C# can be daunting to the first programmer, because it looks so alien.

With this in mind, I would say Pascal, or maybe Basic.....if only Python could have static type checking, its pseudo code look would work a treat

TheManWhoWas
Posts: 50
Joined: Thu Feb 09, 2012 9:11 pm

Re: Best first language

Sat Feb 18, 2012 12:27 pm

Lots of interesting opinions on here. One thing that many people miss is that what kept a lot of us programming in the 80s was the fact we could make interesting graphical stuff happen. That's not so easy with modern computers, which is why I've been suggesting environments like RobotC Virtual Worlds and Alice are the 2012 equivalent. Not sure the language is so important as what you can make happen with it.

Which leads me to the thought that another great learning environment would be the so called LAMP technologies for creating web sites. First you learn a bit of HTML, then start learning PHP. And then MySQL. And JavaScript. But all the while you are creating your own web pages, and can make these as graphically rich and dynamic or not as you want. Pretty much every taste is catered for, and these are genuinely useful skills for 2012 kids to learn - the future is online web apps running in the cloud after all.

And regardless of what you think of PHP, it is near enough Java / C# / C++ to allow pretty easy transition to those languages later.

fusatia
Posts: 2
Joined: Sun Feb 19, 2012 5:25 am

Re: Best first language

Sun Feb 19, 2012 5:35 am

Just my 2 cents:

I started out by trying to learn Perl. I gave up, and learned HTML & CFML (ColdFusion). After realizing the limitations of CFML, I switched to PHP. I was able to do so many things with PHP because it is so well developed (i.e. high-level) and easy to manipulate. Obviously, not very efficient but it got me familiar with things like data types, functions, databases, etc.

Then when I started studying Geomatics Engineering at a university, I had a very easy time of getting into C, which is what they used. For almost every student who goes through the program, the programming classes we have are their first experience with programming. Within 3 semesters (1 class each semester) the students are able to write interactive and dynamic programs which can process data and perform fairly complex matrix manipulations (least squares adjustments, 3D coordinate transformations, computing GPS solutions from raw data, etc.) Not only are they learning the math, but the computer programming concurrently, all with C.

I think it's quite impressive how many students can be turned into programmers so quickly, and I think it has a lot to do with the C language being so robust and capable. Daunting, yes, but very powerful.

Having said that, I know that I had a much easier time of it since I come from a programming background... and it all started with very high level, very "loose" and easy to prototype languages with simple mechanisms for interactivity (i.e. web platform).

Mattylad
Posts: 98
Joined: Tue Jan 17, 2012 9:59 pm

Re: Best first language

Thu Feb 23, 2012 12:08 am

Have you folks decided yet?

I'll start with Python so it warms the brain cells and move onto whatever is decided is the best to learn for the pi

Let me know when you have lol.

error404
Posts: 351
Joined: Wed Dec 21, 2011 11:49 pm

Re: Best first language

Thu Feb 23, 2012 1:56 am

TheManWhoWas said:


Which leads me to the thought that another great learning environment would be the so called LAMP technologies for creating web sites. First you learn a bit of HTML, then start learning PHP. And then MySQL. And JavaScript. But all the while you are creating your own web pages, and can make these as graphically rich and dynamic or not as you want. Pretty much every taste is catered for, and these are genuinely useful skills for 2012 kids to learn – the future is online web apps running in the cloud after all.

And regardless of what you think of PHP, it is near enough Java / C# / C++ to allow pretty easy transition to those languages later.


I find your two statements here are rather dissonant. Programming web pages in PHP and (ick, god no, ANY other DBMS if you're teaching, PLEASE for the love of god, it's an abomination, and now the community is in shambles) MySQL is very different from programming normal applications. It requires a completely different mindset and skill set, and honestly, web apps are damn boring. They are almost always 80% user interface code (boring boilerplate) and 19% database access code (boring boilerplate). This isn't computer science, it's what they'd have called 'information systems' when I was in college, and it's mind-numbing.

Also, PHP is about as inconsistent and disorganized as a language can be.

JavaScript is rather an interesting language, and as a language I actually think it's fairly well suited, but I think the baggage of HTML, CSS and all the rest in the 'normal' environment presents too many scattered concepts for getting things done in the early stages, and what you can do with it plateaus rather quickly once you get skilled – there are some decent command line interpreters, but it's nowhere near as mature as something like Python for doing anything other than web.

Interesting to see mention of tcl. Learned it years ago for writing eggdrop scripts, and it's really quite a unique and interesting language. I think it's too different in its paradigm to be a good choice, but I do like the simplicity of it, and it's fun to remember.

Someone upthread mentioned marketability of the skills. At a high-school level, I don't think it's about that yet. We're talking about stimulating interest and instilling some good basis for future learning, not yet training for a career. Those that are fascinated will go on to a CompSci degree, or start contributing to an open-source project or just branch off and learn more advanced topics that they are interested in on their own. If what's taught is too weird (different) compared to what the industry is doing, it might be hard to apply the skills learned, but really the basic skills are the same no matter what language you use.

For that reason I do think that a modern language that *is* used for real code, and that can be used for most modern techniques should be chosen. That allows for teaching all the basic concepts in a consistent framework (Python for example can handle pretty much any programming paradigm fluently), and also allows for more advanced students to either move on to substantive development or at least examine and modify large-scale existing projects to see how it's done in the real world. A niche, archaic or purely teaching language doesn't offer that, and students will end up with a decent learning curve (once you know the concepts learning a new language is pretty easy – but the first one is the hardest) to actually do anything with what they've learned.

TheManWhoWas
Posts: 50
Joined: Thu Feb 09, 2012 9:11 pm

Re: Best first language

Thu Feb 23, 2012 8:22 pm

error404 said:

It requires a completely different mindset and skill set, and honestly, web apps are damn boring.
Sweeping generalisations aside, I wasn't suggesting that people had to start by creating proper web sites. What I meant was that you can write PHP scripts to do whatever (hello world etc) and run them by refreshing your browser and see the result displayed in your browser.

But the cool bit is that if you learn a bit of HTML you can make the output look more interesting. And if you want to take user input then you have a ready made GUI system to start dropping in buttons and input fields.

And all the while you're learning how the web works, so suddenly you realise the internet isn't quite such a mystery, and perhaps that inspires you to start making a "proper" site to do something you want to do.

Meanwhile people who don't really get on with the whole programming thing might find they do enjoy the HTML and CSS and graphic design aspect. And others might discover the funky stuff they can do with JavaScript on the client side esp. with HTML5 things like WebGL.

Getting people interested and stripping away some of the mystery I think is the key. Once you've got the gist of coding, then you can move onto any language in whatever context you want. But web stuff gives a few instant wins and is very very relevant to the future.

User avatar
abishur
Posts: 4477
Joined: Thu Jul 28, 2011 4:10 am
Location: USA
Contact: Website

Re: Best first language

Thu Feb 23, 2012 10:22 pm

One thing I'm hoping to put together is an unbiased look at a handful of programming languages.  It would show the traditional "Hello World" script and then a short list of pros/cons and then let the individual choose whichever language they felt looked best to them.
Dear forum: Play nice ;-)

khulat
Posts: 105
Joined: Sun Feb 12, 2012 9:43 pm

Re: Best first language

Thu Feb 23, 2012 10:26 pm

An unbiased comparison of programming languages? That doesn't sound right. Did you mean "Unbiased Holy War"? Because that's what usually happens, with these kinds of things. Unless there is no option to comment whatsoever of course.

User avatar
abishur
Posts: 4477
Joined: Thu Jul 28, 2011 4:10 am
Location: USA
Contact: Website

Re: Best first language

Thu Feb 23, 2012 10:33 pm

Actually I made that very thread here way back in October.  There was some people missing the point (linking to examples of languages or simply saying "X is the best! without providing proof), but all in all people were very respectful
Dear forum: Play nice ;-)

bobba_dwj
Posts: 14
Joined: Sat Jan 21, 2012 6:06 pm

Re: Best first language

Fri Feb 24, 2012 10:20 am

Abishur said:


One thing I'm hoping to put together is an unbiased look at a handful of programming languages.  It would show the traditional "Hello World" script and then a short list of pros/cons and then let the individual choose whichever language they felt looked best to them.


You could use this wikipedia article as a starting point...

http://en.wikipedia.org/wiki/H.....m_examples

although you'll have to cut down on the number of languages to what raspi will itself support.

Le_Quack
Posts: 4
Joined: Tue Jan 10, 2012 10:49 am

Re: Best first language

Fri Feb 24, 2012 10:31 am

dave_s said:

Hi All,
This is my first posting after reading all the arguments about different languages it seems everyone has their own favorite. Not all languages are easy to learn, but in an early learning evironment where the concepts to learn are more important then the semantics of any language. Then a language with with the least semantics but capable of showing all the concepts required, plus as far as some students are concerned, quick productivity then Python fits the requirement. The Foreword of 'How to Think Like a Computer Scientist: Learning with Python' by David Beazley gives a good argument for its use, and the book gives good coverage of the concepts of Computer Science.http://www.openbookproject.net/thinkcs//This site also has other educational material that teachers of CS may find useful.
Dave

Just a +1 from me How to think like a computer scientist (a book a read quite recently and honestly the only reason I am now learning to program) is freaking brilliant.

A few years back I left school, went to college and did a BTEC nat dip for IT practitioners and honestly thought I would be put off of programming for life. I just didn't get it I couldn't get my head around anything and honestly just thought I was a bit dim because of it. Now I know I'm sounding like some bad commercial but thanks to this book I get it well some of it at least, I don't know if its because I'm a bit older, my previous teaching was poor or what but it gave me an insight into how programs work.

I would recommend it to anyone.

thank you for reading my gushy, grammatically poor review

error404
Posts: 351
Joined: Wed Dec 21, 2011 11:49 pm

Re: Best first language

Fri Feb 24, 2012 10:52 am

TheManWhoWas said:

Sweeping generalisations aside, I wasn't suggesting that people had to start by creating proper web sites. What I meant was that you can write PHP scripts to do whatever (hello world etc) and run them by refreshing your browser and see the result displayed in your browser.
Yeah, I kinda got where you were going, but I see two problems. First of all to do anything you need to know at least 3 distinct and very different technologies, probably 4: PHP (or something better), HTML, Javascript+DOM, and before long at all, CSS. The way these things all connect and fit together is complicated, ill-defined and has lots of different moving parts that you're in control of, the distinction between which is, I think, somewhat hard to grok for someone who doesn't already understand how software works. Do I need to search for how to do something in the PHP docs? Javascript maybe? Perhaps in the somewhat sparsely documented DOM somewhere. Or maybe I need a CSS element name to change the colour of something. Or likely a combination of all of those things that I don't know where to look for.

You might use the web as a tool to teach outside of a web context - for example I could see a web-based editor giving a Javascript code listing, and a canvas, and basically just restricting yourself to using the canvas and its API, perhaps abstracted a bit, and core Javascript. That could be quite good for LOGO++ sort of things, and you can do easy graphics-y gizmos and play around with them like we used to type from the magazines. But going beyond that sandbox approach, web is really a quagmire of interrelated stuff that is quite complicated, always in flux, often not well documented or specified, and really quite limited.

It's something that should definitely be present, but as a first exposure to programming/comp sci, I really don't think it's appropriate.

Chris.Rowland
Posts: 239
Joined: Thu Jan 12, 2012 5:45 pm

Re: Best first language

Fri Feb 24, 2012 10:52 am

I think that the idea of an unbiased review of the programming languages options is a reall good idea but suggest that something a little more complex than Hello World is used for comparison. It's a little too simple; just a small amount of fixed text output.  A text file can do this.

My opinion is that what's needed is something that will take some input, process it and output it.  The sort of thing I'm thinking of is a Centigrade to Farenheight temperature converter - preferably both ways.

Chris

antiloquax
Posts: 406
Joined: Sun Nov 20, 2011 11:37 am
Contact: Website

Re: Best first language

Fri Feb 24, 2012 10:53 am

Thanks Le_Quack - I've heard of that book before, but now I have actually got around to having a look.

I know this is a really difficult question, but I am going with Python. Partly because Python is the "official" langauge that R-Pi will support (as it says in the FAQs).

I like Scratch for getting started on some basic concepts.

I have set up a programming club in which we are learning Python 3 (and Pygame).

I've done a fair bit of reading around and it seems that quite a number of Computer Science degree courses get their students to learn Python and then Java -  that's also influenced me.

I apologise for double-posting this link, but I have set up a version of Puppy Linux which has Python 3 with Pygame pre-installed. On the discussion forum thread you can also find some easily installed packages for Scratch, Ruby and Lua. It might be of interest if you want to introduce Students to Linux and get coding without having to install stuff. It also has Geany, which is a nice IDE and which will work on the R-Pi.

http://murga-linux.com/puppy/v.....hp?t=76049

Introducing RacyPy

mogui
Posts: 14
Joined: Tue Jan 03, 2012 1:31 pm

Re: Best first language

Sun Mar 04, 2012 2:01 pm

Andre said:


With the Raspberry Pi"s price tag, I can now actually imagine a kids programming book on display in a bookstore with a Raspberry Pi shrink-wrapped in and the words "NOW INCLUDES THE COMPUTER!" printed on it.


Just brilliant!

I hope somebody runs with this idea soon!

Return to “Staffroom, classroom and projects”