sonickev
Posts: 8
Joined: Wed Jan 11, 2012 3:00 pm
Contact: Website

Re: Best first language choice

Fri Jan 13, 2012 4:15 pm

Pirx Danford said:


There really is no "best" language to start learning with.

If you have the comfort to learn in school,
then just use the language picked by the teacher.

If you are in the uncomfortable situation to have to learn from scratch all by your own, then I would recommend to find good reading materials. For me it was always great to have a specific project to attempt to get solved.

The basic concepts in any language are nearly the same, after one learned the basic concepts its really about the goals you want or have to reach.

Oh and I just found this site here: http://www.codecademy.com this is a pretty creative and hands on approach to learn coding. (Albeit I despise JavaScript)


Your last point and recommendation is key. I also recommend the codecademy website as a free and portable resource to learn programming. Do it at school, do it at home, nice environment, and you can even do it on your phone. No need to replicate that on the RPi board.

But if the students want to learn a little more about what it is exactly that their program might be doing then the RPi is perfect. The real strength of the RPi as an educational tool is that it scales in both directions.

Once a student has learned to program at a high level, they can start to peel off the layers of the onion and start to understand what is happening to make that program actually run. Wonderful in my opinion, but not if the language is not cross compiled.

I don't think the discussion is about whether all students want to see the processor/electronic details or not, but I stand by the statement that if it is just a high level interpreted language that is being taught then the RPi makes no sense for that lesson because there are much easier and better ways of learning BASIC, Python, JavScript, etc.

The need for a display and keyboard means that an old school PC that boots into Linux will be fine and/or a web site like codecademy.

This discussion of which language to use is presumably aimed at the teacher, therefore it is fundamentally important that the teacher does choose the correct language and platform for the students. This platform would be a mistake in my opinion for a teacher that wants to teach JavaScript for example.

thesynapseuk
Posts: 55
Joined: Thu Jul 28, 2011 11:21 am

Re: Best first language choice

Fri Jan 13, 2012 8:37 pm

The key thing is that the R-Pi offers a safe environment for people to experiment on. It's not a terminal that's shared with the rest of the family - so they're scared of doing anything to make it act different (whether this fear is real or imagined is irrelevant). It's not a computer at school to which they will normally have restricted access and restricted use of.

normanp
Posts: 8
Joined: Sat Jan 14, 2012 7:23 pm

Re: Best first language choice

Sat Jan 14, 2012 8:25 pm

In terms of importance I would put algorithm design (done simply eg structured English) ahead of the choice of language. Students need to know that language choice depends on many factors. However as a first language I would say that it is an opportunity to get students into good habits: declare variables, structured (gotoless), consistent style (not the optional ; of Javascript - aaargh! - on that topic witness the Javascript style checking sites - jslint - that are useful to avoid the sometimes subtle pitfalls...) etc.

Pascal is great & we have used this in my college for many years (Lazarus). It general has taken students about 2-3 weeks to get familiar with C after a year of Pascal. I'm inclined to reccommend C though as it allows swift familiarity with C++, Java (script), PHP, C# later on & is good for low-level stuff if needed.

The first program quoted earlier could hardly be simpler:

#include <stdio.h>
main() {

printf("Hello World!\n");

}

roelfrenkema
Posts: 105
Joined: Sat Jan 07, 2012 5:17 pm

Re: Best first language choice

Sat Jan 14, 2012 9:05 pm

normanp said:

Pascal is great & we have used this in my college for many years (Lazarus). It general has taken students about 2-3 weeks to get familiar with C after a year of Pascal. I'm inclined to reccommend C though as it allows swift familiarity with C++, Java (script), PHP, C# later on & is good for low-level stuff if needed.
The first program quoted earlier could hardly be simpler:

#include <stdio.h>
main() {

printf("Hello World!\n");

}


Thats almost like:

<?php

echo "Hello world!";

?>

normanp
Posts: 8
Joined: Sat Jan 14, 2012 7:23 pm

Re: Best first language choice

Sun Jan 15, 2012 8:57 am

roelfrenkema said:


Thats almost like:

<?php

echo "Hello world!";

?>


A couple of problems: undeclared variables are allowed producing subtle errors, needs a web server & php interpreter (I use EasyPHP when teaching this stuff - portable & works well), not simple to explain how/where this executes to a beginner (I do appreciate that to explain the C program you need to gloss over details!).

roelfrenkema
Posts: 105
Joined: Sat Jan 07, 2012 5:17 pm

Re: Best first language choice

Sun Jan 15, 2012 9:27 am

normanp said:


roelfrenkema said:


Thats almost like:

<?php

echo "Hello world!";

?>


A couple of problems: undeclared variables are allowed producing subtle errors, needs a web server & php interpreter (I use EasyPHP when teaching this stuff - portable & works well), not simple to explain how/where this executes to a beginner (I do appreciate that to explain the C program you need to gloss over details!).


Why would you need a web server? I use it mostly as a console scripting language myself. And you always need either an interpreter or a compiler.

iDaemon
Posts: 8
Joined: Sat Jan 14, 2012 12:10 pm

Re: Best first language choice

Sun Jan 15, 2012 11:10 pm

Researching as a complete noob, I've decided to begin by learning Python.

If I start now I might even be a few steps ahead of the kids for six months 'till they overtake me.

For any of you who are similarly interested in the help-kids-understand&appreciate-what-happens-under-the-hood angle to Rasberry Pi I found a cracking free resource online called Invent Your Own Computer Games with Python (2nd ed).  http://inventwithpython.com/  Hats off to Al Sweigart.

normanp
Posts: 8
Joined: Sat Jan 14, 2012 7:23 pm

Re: Best first language choice

Mon Jan 16, 2012 9:07 am

Great choice! Though no variable declarations it has many other excellent features for learners. Also there is the portable version which runs fine off USB flash drives. Nice little article here:

http://how-to.linuxcareer.com/.....x-platform

ellis.birt
Posts: 4
Joined: Tue Jan 17, 2012 10:01 am

Re: Best first language choice

Tue Jan 17, 2012 10:28 am

For teaching, I would suggest starting with Logo.

It can be used to draw on a screen and, a small robot could be developed that would allow a 'program' to also move the robot and, possibly use a pen to draw the figure on a large piece of paper.

The concept of move, turn is easy to grasp, yet the language has all the constructs you would expect from a programming language.

This might do for an introduction to some of the fundamental aspects of programming, followed by a more mainstream language once the students are comfortable with the abstract concepts of programming.

UCBLogo is available for Linux.

roelfrenkema
Posts: 105
Joined: Sat Jan 07, 2012 5:17 pm

Re: Best first language choice

Tue Jan 17, 2012 11:39 am

ellis.birt said:


For teaching, I would suggest starting with Logo.

Squeak Etoys was inspired by LOGO, PARC-Smalltalk, Hypercard,
and starLOGO. It is a media-rich authoring environment with a
simple powerful scripted object model for many kinds of objects
created by end-users that runs on many platforms, and is free
and open source. It includes 2D and 3D graphics, images, text,
particles, pres-entations, web-pages, videos, sound and MIDI, etc.
It includes the ability to share desktops with other Etoy users
in real-time, so many forms of immersive mentoring and play can
be done over the Internet.


BioHazard
Posts: 2
Joined: Wed Mar 07, 2012 3:54 pm

Re: Best first language choice

Wed Mar 07, 2012 8:16 pm

Learned Pascal when I was 10.

My friend learned Basic.

After I developed apps in Delphi.

My friend used Visual Basic.

After Borland shutdown I used Lazarus as Delphi alternative.

He introduced himself with .NET and C#.

I was working on private offers.

He was working for Government on complex projects.

Learned PHP for web development.

My friend learned Phyton.

I still work on private orders.

My friend works at Google.

: (

manolohpm
Posts: 2
Joined: Wed Mar 07, 2012 7:56 pm

Re: Best first language choice

Thu Mar 08, 2012 1:50 pm





BioHazard said:


Learned Pascal when I was 10.

My friend learned Basic.

After I developed apps in Delphi.

My friend used Visual Basic.

After Borland shutdown I used Lazarus as Delphi alternative.

He introduced himself with .NET and C#.

I was working on private offers.

He was working for Government on complex projects.

Learned PHP for web development.

My friend learned Phyton.

I still work on private orders.

My friend works at Google.

: (

Just wondering, would be a way to compile a program from Delphi to RPI? Today this program runs on Win transferring data from PCs on a network to control cards connected to these PCs. This cards are used on flight sims homecokpits.

Regards. Manolo.


User avatar
Jim Manley
Posts: 1600
Joined: Thu Feb 23, 2012 8:41 pm
Location: SillyCon Valley, California, and Powell, Wyoming, USA, plus The Universe
Contact: Website

Re: Best first language choice

Fri Mar 09, 2012 7:26 pm

Of course, there is no one "best" language, or "best" first language – the former depends on the task to be performed and the platforms and environments available, and the latter depends on the student, and the platforms and environments available.

I would suggest that kids be pointed at http://99-bottles-of-beer.net to look at the examples of the 1,442 different programming languages and variations represented there that all perform the same task of generating the lyrics to the song "99 Bottles of Beer on the Wall".  Then, let _them_ decide what they are comfortable with and can understand.  Except for the geniuses that have already been programming for five years, the other kids aren't likely to pick anything that you can't teach.  This will also expose the smarter kids to challenges they might otherwise not encounter before they get bored and get into trouble doing something nefarious.

OK, I can see how some parents might not find the subject of a beer-drinking song appropriate for their kids in a classroom situation (or any other situation) and, no, I'm not going to bail you out of jail and give you a job after the one-minute disciplinary hearing where you will be fired and barely avoid a life sentence in a penitentiary.  So, perhaps we need to take some of the more likely suspect language examples from this site and rework them for the classroom (languages that teachers can actually teach might make the best first candidates).  99-bottles-of-water.net is probably sufficiently politically correct, since 99-bottles-of-soda.net and even 99-bottles-of-juice.net are out due to excessive sugar causing obesity, and all (although I guarantee it won't be nearly as interesting as the beer ).

Well, it seemed like a good idea at the time … is it Friday yet?
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
johnbeetem
Posts: 945
Joined: Mon Oct 17, 2011 11:18 pm
Location: The Mountains
Contact: Website

Re: Best first language choice

Fri Mar 09, 2012 8:04 pm

Jim Manley said:

OK, I can see how some parents might not find the subject of a beer-drinking song appropriate for their kids ...
So just use the computer science version of the song


99 little bugs in the code,

99 bugs in the code...

Take one out, compile again,

100 little bugs in the code.

[Repeat until zero bugs left.]


User avatar
Jim Manley
Posts: 1600
Joined: Thu Feb 23, 2012 8:41 pm
Location: SillyCon Valley, California, and Powell, Wyoming, USA, plus The Universe
Contact: Website

Re: Best first language choice

Sat Mar 10, 2012 7:24 am

John Beetem said:


Jim Manley said:


OK, I can see how some parents might not find the subject of a beer-drinking song appropriate for their kids ...


So just use the computer science version of the song


99 little bugs in the code,

99 bugs in the code...

Take one out, compile again,

100 little bugs in the code.

[Repeat until zero bugs left.]



Oh, now _THAT'S_BRILLIANT!_  What rock was I hiding under when that variant was published?  Oh, yeah, I was actually writing a variation of that theme song with a not-so-slightly-increased order of magnitude of bugs to squash.  How does the joke go?  How many programmers does it take to create software with no errors?  Zero!
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!!!

evilkidder
Posts: 3
Joined: Thu Jan 12, 2012 12:52 am

Re: Best first language choice

Sat Mar 10, 2012 5:20 pm

Hi,

There seem to be very many opinions floating around on this subject, so let me add my own.

My first thought is that the choice of language doesn't matter at all!  Programming is not really about what language you do it in, but rather a structured way of thinking.  Once you are comfortable with the basic concepts, switching between languages is relatively easy.

Now to my second thought.  To become a programmer you are going to have to practice.  Alot.  So try to pick something that interests you.  I would argue that finding good learning resources with material that will keep your interest through those challenging first months is massively more important than the actual language used.

Finally a few words of encouragement; programming is both my job and my hobby and I absolutely love it.  It's also highly detailed work, and at times somewhat frustrating.  Patience is a definite virtue.  The rewards, however, are huge.

-Andy

MattCook
Posts: 16
Joined: Tue Feb 21, 2012 1:46 pm
Location: S. Manchester

Re: Best first language choice

Sat Mar 10, 2012 8:14 pm

Thinking along these lines, I started a thread for suggestions of good learning tasks, which would be done in whatever language was chosen, as I firmly believe that outside of a classroom, the main reason for stopping is runnign out of ideas.

That thread got one reply. (Thank you John Beetem).

People are much happier explaining why their choice is the best (and massaging their egos a little in the process perhaps).  There *is* no best language.  If there was, we wouldn't have so many different ones.

The thing to do, is just pick one, and use it.  You get stuck.  You find your way past the problem.  You learn.  Simple as that.

Matt

User avatar
jwdietrich
Posts: 13
Joined: Wed Nov 30, 2011 11:52 am
Contact: Website

Re: Best first language choice

Sun Mar 25, 2012 7:25 pm

BarryK said:


A Hello World GUI standalone executable created with Lazarus is about 9MB with debugging symbols


You can strip down a not too large application to about 2 MB without debugging information. This is still too much, but nevertheless close to nothing with today's memory capacities, even on the Pi.

umptious
Posts: 1
Joined: Sun Apr 15, 2012 3:58 pm

Re: Best first language choice

Sun Apr 15, 2012 5:16 pm

Speaking as a professional programmer who has learned well over a dozen different languages, this thread is of appallingly low quality.

1. Pascal people: yes, Pascal was the standard teaching language. Back in the 1980s. Technology has moved on. Also: you should probably lose that mullet you're wearing.

2. Basic people: Basic was a horrible kludge for computers not powerful enough to run Pascal.

3. Flowchart people: no one uses these any more because they are useless. They were an appealing crutch back when verbose languages like Basic were common.

4. The person who thinks that interpreted languages are aren't real programming: the Internet runs on PHP, Perl, Python, etc. Interpreted languages are used everyday to solve seriously hard problems - decoding the human genome, running space flight control centers and oil rigs. In general interpreted languages are better learning tools because of the shorter gap between thinking of something and being able to try it. Compiled languages are also designed to be less friendly because they are tilted more towards performance.

Javascript and Python are probably reasonable choices. There are other equally good languages (Lua, Ruby and Groovy come to mind) but they have fewer books and helpful websites. I'd advise against PHP because, frankly, it repels good programmers - it's a pile of inconsistent kludges that have to be overcome to create good code.

There is also Processing:

http://en.wikipedia.org/wiki/P.....anguage%29

- this is an educational version of Java, with simplified syntax and nice graphics libraries. Graphics programming is MUCH more appealing to kids than any other kind, so this is worth considering.

LastSilmaril
Posts: 167
Joined: Wed May 09, 2012 8:16 pm
Location: New York, USA

Re: Best first language choice

Sun May 20, 2012 6:09 am

normanp wrote:
Pascal is great & we have used this in my college for many years (Lazarus). It general has taken students about 2-3 weeks to get familiar with C after a year of Pascal. I'm inclined to reccommend C though as it allows swift familiarity with C++, Java (script), PHP, C# later on & is good for low-level stuff if needed.
+1 for C. It's really a no-brainer...still gotta love the conciseness of the 1st ed K&R book too. Though frankly I did not understand or make use of pointers until I learnt x86 asm and think it would be beneficial if the two (not necessarily x86) were taught concurrently and deliberately. I also didn't use structs until after having been exposed to objects via Java, so that was confusing at first - all the more reason to start with C, IMHO. At the end it's the *concepts* that matter, and I don't think you'll be exposed to some important ones too effectively with js/php and such...at least I wasn't, but I'm a bit of a rube.
Oh, and my first bit of programming, though I didn't know it, appreciate it, or enjoy it at the time, was with logos/turtleshapes on win 3.1 long ago. It was taught horribly and we didn't really get to do anything that required loops (maybe once) or anything terribly complex....but I guess I'll chalk that up to being taught horribly

User avatar
DexOS
Posts: 876
Joined: Wed May 16, 2012 6:32 pm
Contact: Website

Re: Best first language choice

Sun May 20, 2012 2:38 pm

The Best first language depend on the person, it depends how you learn.
I have taught a number coders to program in assembly, has there first language.
So the language needs to suit the person, thats why its best to try many different languages, before sticking to one.
Batteries not included, Some assembly required.

AlArenal
Posts: 141
Joined: Sun Feb 26, 2012 6:58 pm
Location: Germany
Contact: Website

Re: Best first language choice

Tue May 22, 2012 1:00 pm

Back in the days you didn't have much of a choice. You powered on your Speccy or C-64 and found yourself in a Basic environment. Today it's a bit more difficult, because some language are domain specific (or at least they tend to get used more in certain environments, e.g. PHP for web development).

But as someone said before, programming is a way of solving problems. The very basics, like variables and control structures are present in all languages. Even the syntax is often very very similar or the same.

So try not to think about too much about what language to choose. It's more importing to code at all, understand the basics and go from there. Sonner or later you'll want to look down other roads, see what other languages have to offer. The more you learn the more your will favor languages for certain purposes.

E.g. I started with Basic on Commodore. You typed something and the machine did as you told it. Wow! In my first job I taught myself PHP and SQL. I spent a few yearsin the Java world and I'm thankful as that taught me about OOP and design patterns which I never quite understood when I bought me a Borland Tubo C++ Compiler at age 14. But you have to take into account that back then there was no google, no community, no being online at all...

Now I'm back with PHP. I don't like the language itself too much, as I think it's not very well designed and shows its age. But programming is about solving problems and for me PHP coding solves the problem of getting bills paid ;-)

These days I think Python is a good start. It looks and feels great, you can code all kinds of applications from command line tools, to programs with graphical user interfaces and games, you'll find plenty of good ressources on the web and a lot of very good books.
Even if you don't stick with it it will let you learn all kinds of stuff that will make the transition to other languages more easy.

M4rtze
Posts: 1
Joined: Wed May 23, 2012 3:40 pm

Re: Best first language choice

Wed May 23, 2012 3:54 pm

Hey,

since you want to code Phone apps later, choose:
Java: if you're planning to code for Android devices.
C/C++: if you're planning to go for iOS (its using Objective-C and its a pain, but C/C++ are most similar to it imo)
C#: if your planning to write apps for win mobile. It's also possible to write apps for iOS and Android in C# with MonoTouch/MonoForAndroid. But you have to cope with Mono to use the cool .NET features.

I started with C/C++ (structural only) and stepped then to Java (Objectoriented). Atm I'm writing Apps for Android with MonoForAndroid in C#. Imo this is awesome, because u can develop in VisualStudio, but well this isnt applicable to the Pi.

If you wan't to have it easy, choose Python, imo it's the fastest way to get visible results. But if you take the hard way, it builds your character and gives you a better understanding how everything works.

AlArenal
Posts: 141
Joined: Sun Feb 26, 2012 6:58 pm
Location: Germany
Contact: Website

Re: Best first language choice

Wed May 23, 2012 4:08 pm

C++ is not very similar to Objective-C. ObjC ist simple, lean and elegant. C++ is a beast ;)

Besides both sitting on top of Ansi-C their designs don't look too similar. It's like comparing Java to Smalltalk, though Gosling borrowed some ideas from Smalltalk when he created Java.

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

Re: Best first language choice

Wed May 23, 2012 4:32 pm

AlArenal wrote:C++ is not very similar to Objective-C. ObjC ist simple, lean and elegant. C++ is a beast ;)
There's significantly more to it than that. Obj-C (particularly when using the apple or gnustep frameworks) encourages clean code with shallow inheritance hierarchies -the combination of dynamically expandable classes, 'has a' rather than 'is a' specialisation, delegation and untyped collections makes for this. C++ usually (this comes from someone who has spent the better part of 20 years doing c++ commercially) makes for deep inheritance hierarchies, usually inexorably and rigidly tied to design decisions, strong bindings between classes, and a whole host of other atrocities.

Yeah, I like ObjC. I particularly like it combined with NeXT/Apple's frameworks.

Simon

Return to “General programming discussion”