Best first language

Drop in for a chat and a cup of tea

158 posts   Page 1 of 7   1, 2, 3, 4, 5 ... 7
by dyashkir » Tue Nov 15, 2011 8:48 pm
I was considering this question for a while, what is the best first language to introduce to kids?

I am partial to lua, small clean powerful. Python probably is good as well. What does everyone think?
Posts: 2
Joined: Tue Nov 15, 2011 8:38 pm
by Val67 » Tue Nov 15, 2011 8:54 pm
I think Lua is a good idea too because it has a small footprint and can run Love (a cool game development library)
Posts: 10
Joined: Thu Jul 28, 2011 8:07 am
by rjw57 » Tue Nov 15, 2011 9:01 pm
Quote from dyashkir on November 15, 2011, 20:48
I am partial to lua, small clean powerful. Python probably is good as well. What does everyone think?


Either is sensible. Learning both at the same time would be highly instructive. Noticing what they do the same and what they do differently is invaluable.
Posts: 33
Joined: Wed Sep 07, 2011 1:21 pm
by abishur » Tue Nov 15, 2011 9:33 pm
If you ask 4 people what language to start kids on you'll probably wind up with 6 answers :P

I started off on Java, then went to C, and learned C++/C# concurrently.

I think that kids are able to learn modern programming at a younger age then we give them credit for, but if you're talking young young kinds then Ruby looks fairly good, it gives a nice immediate gratification sort of environment.
Dear forum: Play nice ;-)
User avatar
Forum Moderator
Forum Moderator
Posts: 4278
Joined: Thu Jul 28, 2011 4:10 am
Location: USA
by Davespice » Wed Nov 16, 2011 10:56 am
LOGO is also quite good, as it is very visual - they can see the results of the commands immediately. Although they would probably hit a glass ceiling with it after a while as you can only do drawings and patterns with it. But it's a good introduction to procedural programming, functions and recursion.
User avatar
Raspberry Pi Foundation Employee & Forum Moderator
Raspberry Pi Foundation Employee & Forum Moderator
Posts: 1441
Joined: Fri Oct 14, 2011 8:06 pm
Location: London, United Kingdom
by markb » Thu Nov 17, 2011 8:31 am
I would suggest some sort of assembler, it's closest to the actual hardware and can help people understand how computers actualy work - "a very fast idiot" is still a good similarly.
User avatar
Posts: 124
Joined: Thu Nov 17, 2011 8:09 am
by obarthelemy » Thu Nov 17, 2011 9:06 am
I would think the language per se is not that important. People have learned with pretty much anything. For wide-scale success, The syllabus, the IDE/Front end, and the teacher's comfort zone are probably more important ?
From what I remember of when I was a kid, it's not so much what you do, or how you do it, it more a matter of getting excited about it.
Posts: 1399
Joined: Tue Aug 09, 2011 10:53 pm
by Nobody » Thu Nov 17, 2011 2:38 pm
I think in theory it would be best if they learned a "proper", structured programming language first. My choice would be Pascal. In any case not c/c++, because it allows or enforces to much "dirty" stuff.

However, what really important is something that gives feedback, evokes interest in programming without much effort. That's what Basic did for me. You write 1 Line and it does something. You add more lines and learn a few more commands and can really do something, without having to worry about some strange header or makefile.
Posts: 16
Joined: Tue Nov 01, 2011 8:07 pm
by jamesh » Thu Nov 17, 2011 2:39 pm
Quote from markb on November 17, 2011, 08:31
I would suggest some sort of assembler, it's closest to the actual hardware and can help people understand how computers actualy work - "a very fast idiot" is still a good similarly.


I think that might put off more people than it attracts! Modern Arm assembler is pretty complicated.
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: 11728
Joined: Sat Jul 30, 2011 7:41 pm
by Heppie » Thu Nov 17, 2011 3:17 pm
I went from vb.net in college (pointless or what), onto java and now C++.

so java or C++ id say
Posts: 17
Joined: Wed Nov 16, 2011 4:25 pm
by johnbeetem » Thu Nov 17, 2011 3:29 pm
Quote from jamesh on November 17, 2011, 14:39
I think that might put off more people than it attracts! Modern ARM assembler is pretty complicated.


Yes, ARM assembly language gets more complicated each version. And the machine language is quite messy: the instructions for each new version are squeezed into the gaps left over from the previous version. They've done a clever job of evolving the instruction set, but it's a far cry from the regularity of PowerPC, for example.

There's also the problem that you have to register to get the documentation. I didn't have any problem, but I don't know what's going to happen when 10,000 eleven-year-olds try to register and electronically sign the use agreement.

My first assembly language was the 12-bit PDP-8, which is marvelously simple: 6 memory reference instructions and one micro-coded ALU instruction. Then came MIX, Don Knuth's simulated machine for teaching assembly language. Then the PDP-11, which was an absolute joy. Very easy to hand assemble and disassemble. Then many tears when cheap memory made the PDP-11 obsolete.

Although I've never worked with it personally, today I'd look into the Texas Instrument MSP430 for learning assembly language. It's a 16-bit computer clearly influenced by the PDP-11. According to TI's website you can get a development board for US$4.30. No, you can't run GNU/Linux on it and you need to run the tools on another computer -- perhaps RasPi some day?
User avatar
Posts: 942
Joined: Mon Oct 17, 2011 11:18 pm
Location: The Coast
by AlienStCNX » Thu Nov 17, 2011 4:30 pm
I don't think the language matters much. I started when I was 10 years old with ZX81 Basic, followed by z80 assembly. What matters more is the tools: Basic was there when I plugged the computer in. Assembly on the other hand wasn't since the assembler crashed constantly. (So I learnt the opcodes off by heart, one messy asymmetric assembly language now that I think about it). The BBC B was much nicer in this regard (inline assembly), as was the Atari ST (Turbo Assembler). Anyway, nice tools matter.

Ideally, there would be "starter packs" for a number of languages -- a bit like the ROMS on the BBC:

* Here's a book about the language
* Here's the actual tool
* And here's how to make something

So for instance, C, C++, Python, Forth, Haskell, and ARM assembly might be a good set:
* ARM: how the computer works
* C: a low level portable language
* C++: object-oriented programming / template programming
* Python: scripting
* Forth: thinking backwards ;-)
* Haskell: a pure lazy functional programming language.

There are already some books out there for teaching kids to program. Perhaps one only needs to create an insert to explain how to use the book with a raspberry pi.
Posts: 6
Joined: Thu Nov 10, 2011 7:44 pm
by markb » Fri Nov 18, 2011 12:48 pm
Quote from jamesh on November 17, 2011, 14:39

I think that might put off more people than it attracts! Modern Arm assembler is pretty complicated.
There are teaching assembler languages
User avatar
Posts: 124
Joined: Thu Nov 17, 2011 8:09 am
by Burngate » Fri Nov 18, 2011 1:18 pm
It's going back a long way now, but when I did a bit of assembly (on a strongarm) I found it quite reasonable.
But then again, maybe I'm a bit of a mathematician, i.e. odd. When I was 20 I thought quantum mechanics made sense. And floating point arithmetic was rational :-)
Wyszkowski's Second Law: Anything can be made to work if you fiddle with it long enough.
Brain surgery is easier than psychoanalysis
User avatar
Posts: 2798
Joined: Thu Sep 29, 2011 4:34 pm
Location: Berkshire UK
by hippy » Fri Nov 18, 2011 1:27 pm
Quote from AlienStCNX on November 17, 2011, 16:30
I don't think the language matters much. I started when I was 10 years old with ZX81 Basic, followed by z80 assembly.


A lot of programmers started the same way, using some kind of Basic. The question is, would you and they have progressed so well if starting off with some other language such as C/C++ or assembler first ?

I expect many started with their first two programs being ...

10 PRINT "I rulez"
20 GOTO 10

then

10 LET A$ = "I really rulez"
20 PRINT A$
30 GOTO 20

There's a whole lot more to be done for other possible "first languages" so I think choice of language is important.

Getting a quick return on effort is important for capturing the interest of some people and can be far more important than doing it properly or elegantly when they first encounter a computer and the notion of programming.

There are going to be people who want to program, people who don't yet realise they want to program, and those who don't think they are interested in programming. How easy it is for them to engage and actually program may be make or break time; you could lose a lot of people instantly with the wrong choice of language. I believe a lot of us wouldn't be programming now if we didn't have an aptitude for that, didn't find it was easy, fun and exciting when we first discovered the prospect.
Posts: 801
Joined: Fri Sep 09, 2011 10:34 pm
by Asgo » Fri Nov 18, 2011 2:08 pm
Quote from obarthelemy on November 17, 2011, 09:06
I would think the language per se is not that important. People have learned with pretty much anything. For wide-scale success, The syllabus, the IDE/Front end, and the teacher's comfort zone are probably more important ?
From what I remember of when I was a kid, it's not so much what you do, or how you do it, it more a matter of getting excited about it.

It agree, it depends largely on who teacher and the target audience are.
If the teacher doesn't like or his skills lack for the language choice, it doesn't matter if in principle it should be the best language for learning.

And the choice between using IDE and command line/separate tools is more or less the same. Both has advantages for the teaching effort and in the end the one a teacher can use best and present will ultimately be the best choice.

Any language can be used for teaching, probably better if it is a more structured one than not. ;) (http://en.wikipedia.org/wiki/W.....g_language)

Side note: I would love to ensure that every Fortran course is held by a C/C++ programmer, who hates Fortran. That would be the surest way to guaranty Fortran's extinction. Otherwise only fans of Fortran teach Fortran and generate more fans <shudder>. ;)
Posts: 20
Joined: Sun Oct 30, 2011 6:10 pm
by Reg Whitton » Sat Nov 19, 2011 12:13 am
Quote from hippy on November 18, 2011, 13:27
10 PRINT "I rulez"
20 GOTO 10


You are right, a good many of us older programmers have been saying this for years ... http://slashdot.org/comments.p.....d=16103375

I worry that with R-Pi there is still going to be quite a hurdle for a young kid between getting one of these out of the box and getting his or her first interesting program running. As a long time developer (assembler, C, C++, Java, Perl, Jython, Bash, sed, awk, and others I can't remember), I'm sure I can help a kid get any pretty much any language up and running with a bit of effort, but this isn't supposed to be for people like me.

It would be good if from powering up it booted straight into some easy IDE for a simple language that didn't require understanding of formal types or rigid formatting. Then like with Basic, as they progress further they will find how to break out of that environment and do other things.

I like writing code, but I don't like reading manuals and I only really do it because I have to as it is my job. If I can get away with copying simple examples to get started I will.

So what language?

Well Bash is going to be there like Basic was, but really Bash isn't as useful as Basic was years ago. Syntactically it is quite difficult to add two numbers together.

I'm not a big fan of Perl for lots of reasons, but at least you don't have to distinguish between strings and numbers and you really can start with:
print "I Rulez\n";

but there won't be any easy way to do graphics.

I do like Java but I don't think that a kid who does not yet know he wants to be a developer is going to take to it as a first language. There a bit of boiler plate required just to start your program.

I don't know Logo - but it sounds like it might be a good starting point.
Posts: 4
Joined: Fri Nov 18, 2011 11:16 pm
by jonv » Sat Nov 19, 2011 12:39 pm
Quote from Reg Whitton on November 19, 2011, 00:13

It would be good if from powering up it booted straight into some easy IDE for a simple language that didn't require understanding of formal types or rigid formatting. Then like with Basic, as they progress further they will find how to break out of that environment and do other things.


Making the simple language also be the launcher for other included apps would also guarantee exposure to the language and start the process of 'entering command to do stuff'.
What is the python equivalent of:
LOAD "openoffice"
RUN

?
Posts: 24
Joined: Wed Nov 09, 2011 9:02 pm
by spock » Sat Nov 19, 2011 4:57 pm
i didn't look it up but if i remeber correctly it's something like that in python:

import os
os.spawnlp(os.P_NOWAIT, "openoffice")

(could be that i forgot some parameter.)

i am not sure if this makes sense though. the raspberry pi doesn't have to work exactly like a home computer from the 80s. :)
Posts: 50
Joined: Sun Oct 02, 2011 10:33 am
by tufty » Sat Nov 19, 2011 5:03 pm
Quote from Reg Whitton on November 19, 2011, 00:13
It would be good if from powering up it booted straight into some easy IDE for a simple language that didn't require understanding of formal types or rigid formatting.

scsh

illbegettingmecoatthen
Posts: 1368
Joined: Sun Sep 11, 2011 2:32 pm
by Reg Whitton » Sat Nov 19, 2011 7:13 pm
Quote from spock on November 19, 2011, 16:57
i am not sure if this makes sense though. the raspberry pi doesn't have to work exactly like a home computer from the 80s. :)


Perhaps you are right. I would hope it is better, with a GUI and with the ability to do some smart things :-)

I don't like Python's indentation but it is another great language that lets you start typing at the prompt like Perl.

Perhaps with PyQt built-in to do graphics and GUI it would make a good starting language. http://www.commandprompt.com/c.....nity/pyqt/
Posts: 4
Joined: Fri Nov 18, 2011 11:16 pm
by Asgo » Sat Nov 19, 2011 8:53 pm
Perhaps it's a matter of personal taste, but I for one wouldn't want to use an IDE as a default setup.
I think in a light weight environment like the pi I would start with the command line and it's wide range of tools. This would speed things up in the long run even if it costs a few sessions in the beginning. Since many light IDEs are more or less frontends for those tools, that wouldn't hurt either.

A too limited focus on the programming language means to miss a chance to teach the basic system behind it in an useful case.
(ok, depending on age and foreknowledge of the audience and the given time)
Posts: 20
Joined: Sun Oct 30, 2011 6:10 pm
by bradburts » Sat Nov 19, 2011 10:47 pm
I think you would learn a lot more with an IDE and get a lot more done in the long run.
There are those who believe that 'make' is the only way, bare to the metal, understanding all.
Make has some advantages in build automation, production environments, sure.
But why would you type when you can develop introspectively within an IDE?
Go with an introspective language and IDE & see how easy it is to add a cool GUI to your app.
Imagine sitting in Eclipse, integrated to Subversion, hooked up with Mylyn to your feature requests and problem reports stored in Redmine. Open your task reminder, edit the Wiki, make the code changes and commit to repository all with clicks. You can learn a lot on the command line if you type it often enough but if, like me, you cannot remember half the commands without a search then go with an IDE!
The lightweight RPI would have been a heavyweight 10 years ago. Visual Basic is about 20 years old. So I would not let views of lightweight drive you to the command line.
EDIT: Should say that there is nothing wrong with command line development or scripts. Most will be interested in quick results rather than tooling. My interest is in development engineering/process and that is often better supported within an IDE and its ability to integrate contemporary processes.
Posts: 341
Joined: Sun Oct 02, 2011 7:07 am
by johnbeetem » Sat Nov 19, 2011 11:11 pm
"In the high and far-off time..."

I was introduced to the PDP-11 with an assignment which was designed to get you as close to the machine as possible without opening the chassis. The assignment was simple: wait for the user to press a key on a teletype and then echo that character ten times. In the assignment, you were required to write the program in assembly language, hand-translate it into PDP-11 machine language (i.e., octal), and then enter the program into the PDP-11 front panel through the toggle switches.

The teachers found that there was a problem with this assignment: for a tiny program like this, it was actually easier to hand-translate into assembly language than learn to use the card reader, assembler and link editor. By having students hand-translate their first program they didn't learn to use software that they would need later in the course for real projects.

This doesn't apply to RasPi, where you need oodles of software to do anything, but I think it's an interesting perspective.
User avatar
Posts: 942
Joined: Mon Oct 17, 2011 11:18 pm
Location: The Coast
by Asgo » Sat Nov 19, 2011 11:22 pm
the connotation 'lighweight' was just given as an additional motivator.
I'm no preacher for make in all cases, but I prefer when people know a system a bit when using it, even for specific tasks and if this produces the opportunity to learn one with the other I'm all for it.
Using an IDE has its advantages and its place but not to exclusion of other ways. My comment was meant for the 'boot to IDE' suggestion.
I might be a bit prejudiced because I have to use remote systems often enough to sometimes prefer command line stuff to sluggish X forwarding.
Posts: 20
Joined: Sun Oct 30, 2011 6:10 pm