EdwinJ85
Posts: 270
Joined: Wed Feb 01, 2012 4:44 pm
Contact: Website

Re: Best first language choice

Thu May 24, 2012 9:16 am

I think that for learning, Javascript is the easiest way to start and get results very quickly.

You can run a hello world with absolutely no boilerplate, just one line of code by going here (http://jsfiddle.net) and writing document.write("hello world");

You can also run it on almost ANY machine and you don't need any special software, a browser is all you need and everybody and everything has one, even your TV has one these days.

I'll admit that it's not the best language to do complex things in (the inheritance structure drives me barmy, having to extend prototypes is very odd) but it cuts out a lot of things that would scare beginners, is very easy to use, very easy to get running and runs on almost every machine that exists.

It's not perfect, but I really don't think there is a better beginner language. There are probably better languages of course, but none that are better for newbies when you consider setup time/cost compared to how quickly they will be getting results.
Hello!

carlosfm
Posts: 132
Joined: Fri Oct 21, 2011 3:23 pm
Location: Lisbon, Portugal

Re: Best first language choice

Thu May 24, 2012 3:24 pm

The wife said to the programmer:
- "Please go to the supermarket an bring one pack of milk and if they have eggs, bring six".

The programmer arrives home from the supermarket with six packs of milk and says:
- "They have eggs".
Do you Pi?

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

Re: Best first language choice

Thu May 24, 2012 4:07 pm

carlosfm wrote:The wife said to the programmer:
- "Please go to the supermarket an bring one pack of milk and if they have eggs, bring six".

The programmer arrives home from the supermarket with six packs of milk and says:
- "They have eggs".
Haha! :mrgreen:

daviewales
Posts: 19
Joined: Wed Apr 25, 2012 12:22 am

Re: Best first language choice

Tue May 29, 2012 2:44 pm

If you want to compare a single program in 1442 different languages, try this site.

http://99-bottles-of-beer.net/

zog
Posts: 200
Joined: Sun Nov 20, 2011 5:43 pm
Contact: Website

Re: Best first language choice

Sun Jun 03, 2012 4:45 pm

I have been thinking about this question quite a lot. The nice thing about computers in the old days was you could just turn them on. For example the BBC micro would make the sound "Duh-Du" when it was turned on and it was instantly ready for programming. You just typed AUTO and away you went. The other thing in the old days, was that the manuals were quite small and easy to read. The commands were simple, yet powerful.
If you want to get kids to program then they are very interested in creating games. Although its great to boot into linux it is too complicated for beginners. I think Francis Lionett of AMOS fame got it it right for the Amiga. I also think Dark Basic for windows is a very good learning language.

With the pi it would be nice to create "cartridge based games" using the SD card as a cartridges. The pi is a fixed hardware system so it should be possible to write software that has complete control the machine.

I can program in 4 or 5 languages and I love Delphi best of all, although it does require a good understanding of C to make operating system calls. I like Delphi because it is fast to develop in and it executes quickly.

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

Re: Best first language choice

Sun Jun 03, 2012 8:06 pm

Best language to start with is ASM like this for linux:

Code: Select all

include 'FBasic_L.inc'
CLS
COLOR  11
LOCATE 2,1
PRINT "This app is written in Macro Basic, for Linux "
COLOR  12
LOCATE 2,2
PRINT "With the ease of Basic and the power of ASM "
COLOR  15
LOCATE 2,3
PRINT "It user's the basic commands:"
PRINT " "
PRINT "    CLS"
PRINT "    SCREEN"
PRINT "    COLOR"
PRINT "    LOCATE"
PRINT "    PRINT"
PRINT "    GOSUB"
PRINT "    RETURN"
PRINT "    SLEEP"
PRINT "    END"
PRINT " "
GOSUB TestSub
SLEEP
END

TestSub:
PRINT "  Press any key to quit."
RETURN                                               
Batteries not included, Some assembly required.

User avatar
jackokring
Posts: 816
Joined: Tue Jul 31, 2012 8:27 am
Location: London, UK
Contact: ICQ

Re: Best first language choice

Tue Jul 31, 2012 7:55 pm

Hi

It is important to understand the distinction between script writing and program writing, and the languages used for each.

Script languages such as python, tcl, javascript, and many others, are made so a minimum amount of typing can achieve enough structure, so that actions of the computer can be expressed quick, for interactive testing and experimentation.

Programming languages which are not script languages, have more formal requirements (of differing complexity), for prevention of hard to see errors, efficient use of resources, abstraction from the physical, complicated parallelism and many other design goals. Examples of general languages are Java, C and pascal. More interesting, but sometimes hard to grasp languages include J, forth and VHDL.

The aim is then for a script language, with a wide library support, and very expressive error messages and stack traces. This first language will provide the running to the point of error, and not just some abstract design rule violation list, with no context of how far the code was correct.

ZX81 BASIC was my first, and I'd have been better supplied if it had been python. Although tcl was quite nice.
Pi[NFA]=B256R0USB CL4SD8GB Raspbian Stock.
Pi[Work]=A+256 CL4SD8GB Raspbian Stock.
My favourite constant 1.65056745028

khh
Posts: 49
Joined: Thu Jul 26, 2012 12:16 am

Re: Best first language choice

Tue Jul 31, 2012 10:22 pm

jackokring wrote:More interesting, but sometimes hard to grasp languages include J, forth and VHDL.
This might be a bit nit-picky, but VHDL isn't a programming language, it's hardware descriptive language. When you "compile" VHDL you don't get a program, you get a logical circuit.

jdbennet
Posts: 96
Joined: Sun Jul 22, 2012 2:25 pm

Re: Best first language choice

Tue Jul 31, 2012 11:05 pm

C.

bobc
Posts: 86
Joined: Fri Apr 06, 2012 8:01 am

Re: Best first language choice

Tue Jul 31, 2012 11:44 pm

It really doesn't matter much, but the "best" is whichever one you feel comfortable with. If you enjoy it you will probably go on to learn dozens of languages. If you find it sucks, you are probably not going to be into programming. To be honest, most languages in common use are procedural and share 95% of the same concepts, it just comes down to personal preference. For fun, try Forth or prolog, these have niches but are not mainstream.

The worst one is definitely C though ;)

pbreneman
Posts: 26
Joined: Thu Jun 07, 2012 12:31 pm

Re: Best first language choice

Wed Aug 01, 2012 12:44 am

EdwinJ85 wrote:I think that for learning, Javascript is the easiest way to start and get results very quickly.

You can run a hello world with absolutely no boilerplate, just one line of code by going here (http://jsfiddle.net) and writing document.write("hello world");

You can also run it on almost ANY machine and you don't need any special software, a browser is all you need and everybody and everything has one, even your TV has one these days.

I'll admit that it's not the best language to do complex things in (the inheritance structure drives me barmy, having to extend prototypes is very odd) but it cuts out a lot of things that would scare beginners, is very easy to use, very easy to get running and runs on almost every machine that exists.

It's not perfect, but I really don't think there is a better beginner language. There are probably better languages of course, but none that are better for newbies when you consider setup time/cost compared to how quickly they will be getting results.
Here is a very easy way to try some pascal "hello world" programs:
http://www.turbocontrol.com/helloworld.htm

Wayne W
Posts: 5
Joined: Tue Jul 31, 2012 12:54 am

Re: Best first language choice

Wed Aug 01, 2012 1:54 am

I do believe when debating this subject we must try put ourselves in the shoes of a totally inexperienced student. Also consider what age they may be, and their ability to understand and apply logic.

My opinion for what it's worth is the very young could learn and be entertained in that process with something very simple and sequential such as LOGO.

For slightly older or students slightly more able to comprehend the science maybe a good BASIC, it's intention was as a Beginers language. I still enjoy it myself several decades after my own journey began, and I've experienced some really nice flavours of this language as well as some tiresome ones.

When I reflect back to what happened in the early 80's the above was just about how it happened in my circles. It certainly produced some highly skilled coders especially among the bedroom coders who progressed to various low level assembler skills.

Keep it interesting and don't scare them off I think I'm trying to say.... Some will take to it like ducks to water, some will have a passing interest and many will not take to it at all.

User avatar
GuptaGubbins
Posts: 30
Joined: Fri Jun 22, 2012 9:10 am

Re: Best first language choice

Fri Aug 03, 2012 11:06 am

Well I am a noob when it comes to programming, I ordered a RPI (During my wait I downloaded Python) and set about leaning it on a basic level before it arrived.
I set myself half an hour each day just typing out lines of code from python programs online, and modifying them where I could to make them do something slightly different.
Learn Python.. Your on a Raspberry Pi forum, and thats what run on them!
:?

rooster
Posts: 100
Joined: Thu Aug 02, 2012 8:09 pm

Re: Best first language choice

Wed Oct 03, 2012 5:44 pm

spamel wrote:All of the suggestions mean absolutely nothing to me, it has been that long since I did anything that it was the simple:

10 print "hello world"
20 goto 10
Run!

This may not get me very far these days! Are there any coding for dummies books?!
install gnudatalanguage

for i=0,10 do begin
print,'hello world'
endfor

its what Physicists use

R

slinger
Posts: 1
Joined: Fri Oct 05, 2012 2:38 pm

Re: Best first language choice

Tue Oct 09, 2012 8:32 am

IMHO You should start with Scratch, you don't have to spend a whole lot of time on it, just write a few basic programs and get the feel for how programming works. Since Scratch is an easy object-oriented language you will learn the basics of object-oriented programming while getting a feel for how a computer executes code. Once you feel confident in Scratch move on to something like Pascal, C, Python, or Java.
That's what I did and I found it quite a helpful way to jump into the world of programming.
As others have said there is no "Best" language to learn, it really depends on how you think and what you want to do.
Good luck!

Bulluk
Posts: 3
Joined: Sat Oct 27, 2012 4:32 pm

Re: Best first language choice

Thu Nov 01, 2012 3:50 pm

I do a bit of technical training as part of my job and find that people struggle to learn until you put a project in front of them. It's all very well writing scripts to move files around and switch LEDs on and off but without an achievable (and interesting) end game, they rarely remain engaged. Of course a lot of people buying an RPi will have a project in mind but they then suffer the "can't run before they can walk" problem and end up burning themselves out as seemingly nothing works (I include myself in that bracket by the way.)

Luckily for me, when I first started learning to program ~15 years ago, I stumbled on a game called Ceebot. It has you move a robot around, shooting baddies, using sensors to find things and make decisions based on what is found. As an introduction, I've still to find anything that explains the building blocks better, in fact I still keep a copy of Ceebot-A for people who are really struggling to get a foothold.

Return to “General programming discussion”