views:

7609

answers:

81

What is the language with the lowest barriers to entry, simplest syntax, easiest setup. I'm aware that there's not a best language but I am sure that there will be one that's got a good score in all three areas.

It's for teaching friends how to program, I like PHP and Python but I don't want to be narrow minded and limit myself when there is a better option out there.

Common suggestions

  1. Ruby
  2. Python
  3. Basic
  4. C
  5. Java
  6. C#


Useful links

  1. Best Ways To Teach A Beginner to Program
  2. Why's (Poignant) Guide to Ruby
  3. Think Python
+50  A: 

I'd vote for Ruby.

You should read Why's (Poignant) Guide to Ruby to see what i mean :)

Prakash
This is a nice one !
Geo
I disagree. Learning Ruby first will make you hate all other languages by comparison!
Joey Robert
I thought learning Python made me wary of learning Ruby. The language doesn't seem cleanly designed, in terms of syntax and consistency. I thought there were too many exceptions to the rules and special cases. Conceptually Ruby is great, but just reading about it made my head hurt. Keeping the same semantics, it seems like the syntax could be so much better (cf. Python).But compared to C, C++, or Java, or even JavaScript, Ruby looks pretty great.
Jared Updike
Yes, Ruby is nice compared to C/C++, Java because it is a scripting language. Hence why I learned it, so that I could write faster code for small things and use Java for larger projects + performance requirements and threads (haven't really played with jruby + it doesn't even support 1.9).
Zombies
+1  A: 

If you want to start really REALLY basically then I would choose BASIC.

It has all the basic programming elements, easy to learn.

GateKiller
+36  A: 

I recommend C. Even though it may be slightly harder to start with than BASIC, it has much more real world application. If you know C, you can learn Java, C++, C#, etc very easily. Also, many things you learn in C will be the same in other languages, unlike the many different versions of BASIC.

Ed
C will scare a lot of people away, since it is overly "stupid". (Don't get me wrong, i started with C and still love it more than anything else.)
Hugo
I think that the C syntax is overly terse for a beginner.
Richard Ev
C ideal for beginners? Sorry, not buying it. Strings as arrays (plus end-marker)? Arrays as pointers? Pointers?!?! Need to call functions for basic string operations? Too steep a road for a beginner!
Joe Pineda
Recommending C for beginners? That's just malicious :S
Oorang
"real world applications" have nothing to do with the "easiest to start with". Pneumatic hammers have real world applications, but to most kids I'd still recommend plastic hammer and screwdriver toys.
ldigas
@Joe - Much better to get pointers out of the way early when one is still expecting new concepts than to get set in one's ways before learning them. Same for recursion.
Charles Duffy
C wont teach you anything but how to be abstract over the ever diverging range of processor architecture styles, in which case you might as well just use a high level language and learn actual useful paradigms... If you want to learn how the machine works, just learn assembly on a RISC architecture, don't waste time trying to be abstract about it, as you wont have any solid understanding of any architecture.
Longpoke
+16  A: 

There are probably more obscure languages out there with easier syntax, but I think C# has very low barriers to entry.

The Visual Studio Express editions are free and easy to set up, and C# is definitely more beginner friendly than some other C-style languages. It's also very popular and well documented (including several interesting startup kits/demo projects), so there will be plenty of support out there for when they get stuck.

It's also easy to build desktop and web-based apps, which may be considered an advantage over PHP depending on their areas of interest.

palmsey
I think that the Visual Studio IDE, as well as the .NET framework are way too broad for a beginner developer.
Richard Ev
I think Visual Studio IDE is probably the perfect place to start. You don't need any real setup... The compiler is already part of it. The intellisense is incredible. The choice of languages is nice, and the fact that they all follow the CLR is even better (Write C# or VC++ libraries when your ready, and read them from C# or even VB without difficulty). The C# language is clean, doesn't teach bad coding habits, is strongly typed (I like Python, but can't stand not typing my variables, and I miss braces...), and is immensely useful... Even for advanced programmers.
Sivvy
+4  A: 

Something with a nice REPL would be a plus, as a REPL provides learners with a very nice immediate feedback loop. Many languages (e.g. Python, Ruby, Lisp, OCaml, Erlang) come with REPLs in their standard distributions; others have add-ons or third party REPLs (e.g. PHP, Java).

Greg Case
+1  A: 

You could try Groovy.

One could say that it's Java under a sweet coat of syntactic sugar

Groovy...

  • is an agile and dynamic language for the Java Virtual Machine
  • builds upon the strengths of Java but has additional power features inspired by languages like Python, Ruby and Smalltalk
  • makes modern programming features available to Java developers with almost-zero learning curve
  • supports Domain-Specific Languages and other compact syntax so your code becomes easy to read and maintain
  • makes writing shell and build scripts easy with its powerful processing primitives, OO abilities and an Ant DSL
  • increases developer productivity by reducing scaffolding code when developing web, GUI, database or console applications
  • simplifies testing by supporting unit testing and mocking out-of-the-box
  • seamlessly integrates with all existing Java objects and libraries
  • compiles straight to Java bytecode so you can use it anywhere you can use Java
saniul
Is kinda hard for a first language . Maybe because of all the syntactic sugar . I wouldn't recommend it as a first language . It becomes very easy to understand/use , if you have worked with ruby/python before , so , by my standards , not a good idea for a first language .
Geo
+3  A: 

I would say javascript, very low in each of those areas. Could also have the person use ruby in your browser and you have ruby ready for tinkering instantaneously.

Not sure why this got a -1, both recommendations fit into what he was asking. I am not trying to say he is going to teach a person amazing programming principles with javascript, but to get someone's feet wet with some of the simple crap, all they need is notepad and IE and they can send out what they did to anyone to see. Oh well, I guess you say the word javascript and people come hating.

Kevin Sheffield
+5  A: 

Since Randy Pausch just recently passed away it would be sad if this question went without the suggestion of Alice as a the teaching language for friends and family to start with.

RedWolves
+2  A: 

I'd cast a vote for Ruby as well. I cut my teeth on Perl and it was very easy to write small amounts of code to make things happen and try out new ideas. If your friend is learning about methods, it's only a few lines to write out a proof of concept. Ruby has that convenience and much better OO syntax.

Plus, there's a nice immediacy and simplicity with just be able changing some syntax and running the interpreter. You don't need an IDE (although the MS Express editions are really good if you are learning C#, etc.), just a command line and a text editor.

Rich Reuter
+3  A: 

I just began to learn python a few days ago and am really liking it. The reason I started learning it was because I came a cross a free book called 'Think Python' which was originally made with an emphasis more on teaching program rather then the language.

I like learning from books that teach programming because I believe it always gives a unique perspective based on the language's style.

Mike
A: 

My vote would be for Python. REPL allows you to explore the language without having to worry about saving files and switching to command windows etc.

BrianLy
+2  A: 

There are a lot of ways to approach this question. Personally I believe it's best to start with as simple a language as possible and learn the basics of variables, operations, functions, loops, conditions, etc. No GUI, no OO, no frameworks. I think that you could do this with C, Basic, Pascal, or Perl (and others I'm sure). Heck, you could do it in bash if you just wanted to focus on the basics. I think all the other stuff should be built on a solid foundation of understanding the concepts of programming.

Another argument might be that you should drop them directly into what they might be most likely to use (which is apparently .NET from reading here =). Frameworks, GUIs, OO, getters/setters. I'm not a big fan of this because I've never been comfortable with the idea that drawing a GUI and then using three lines of code to write a web browser is really programming, yeah it's a neat technology demonstration but it teaches you how to use an IDE/framework, not how to actually think logically about the practice of coding.

You could always go the academic route, which combines the worst of both of these. Teach 'em SNOBOL =).

jj33
+2  A: 

Boo. It's an open source .NET programming language influenced by Python. The syntax is quite easy to read and the structure is fairly intuitive. If after a while you wanted to try something else you could easily slip into C# or VB.NET whilst recycling all of the knowledge and power you gain from using the .NET Framework (although you are likely to miss a few things). Or if you're so inclined you could skip over to F# (for some functional stuff), IronRuby or IronPython (for Dynamicsim) all with roughly the same benefits.

Wolfbyte
Boo also has one of the simplest "Hello World!" apps of any language. It is purely:print "Hello World!"
justin.m.chase
+112  A: 

In Eric S. Raymond's quite amusing text How To Become A Hacker, he writes

If you don't know any computer languages, I recommend starting with Python. It is cleanly designed, well documented, and relatively kind to beginners. Despite being a good first language, it is not just a toy; it is very powerful and flexible and well suited for large projects. I have written a more detailed evaluation of Python. Good tutorials are available at the Python web site.

I used to recommend Java as a good language to learn early, but this critique has changed my mind (search for “The Pitfalls of Java as a First Programming Language” within it). A hacker cannot, as they devastatingly put it “approach problem-solving like a plumber in a hardware store”; you have to know what the components actually do. Now I think it is probably best to learn C and Lisp first, then Java.

So in short; Python is a good first language, but you should eventually learn C to learn low-level stuff. If your question was targeted for an adolescent, then Alice would be a nice suggestion.

mreggen
I found the tutorials here: http://docs.python.org/tutorial/
JoshFinnie
How is python different from java when it comes to plumbing?
hasen j
@Hasen: It doesn't clog the toilet.
Goose Bumper
python is far from C like languages, so I recommend pascal/delphi.
samir105
@samir105: it's arguable which is more C-like, Pascal or Python. Perhaps conceptually Pascal is more C-like but in some ways Python is more syntactically similar.
Jared Updike
Please no Alice :) I was 8yo (below adolescent) when I started with Applesoft Basic from a book. Don't give your kid some crippled toy, give him the real thing (today that would be Ruby/Python, IMO).
Stefan Monov
+16  A: 

Start with C or C++

No, really, I'm serious. If you learn one of those, you can pick up anything from there.

shsteimer
Young person would not like to do console programming for long and doing visual window is more easy for beginner with C# or Java.
Daok
I absolutely disagree. Starting with C or C++ gives you a great foundation in what is happening under the covers when you rprogram in higher level languages. once you have that basis of knowledge, you can write more effective programs in languages with good gui design tools like java and C#
shsteimer
At Daok: I started C++ at 12 and haven't looked back since :)
nlaq
I'm not disagreeing with your view, but saying that "If you learn one of those, you can pick up anything from there." is akin to saying to a budding pianist, "Start with Rachmaninoff, and if you can learn that, you'll be fine with anything"
nickf
C++ is the hardest language I've ever learned. I would not recommend it as a first language. C is fine though.
finnw
+1  A: 

Java

Kevin
+9  A: 

The question I would ask someone who wants to learn a programming language is what do they want to do with it?

We have scientists at work who use Access and Excel a lot, so they are learning Visual Basic for Applications because it helps them do their work. Entry and setup are trivial (as long as you have laid out the $$$ for Microsoft Office), and the syntax is pretty easy once you get the hang of it.

We have other scientists who want to learn how to manage data and interact with "real" databases, so I have recommended that they learn Perl (and I am following up that recommendation in September by teaching a Perl course). Entry and setup are again trivial and platform independent. It is easy to get Perl for Windows from activestate.com; Perl is usually already installed on Linux and Unix systems; and Perl is already installed on Mac OS X systems. The Perl syntax is easy to learn, and the Learning Perl book published by O'Reilly is an excellent guide for getting started.

If the person wants to do software development for a GUI with windows and controls, then that person has to decide if they want to write platform-independent software (Java) or platform-dependent software (.NET languages for Windows, Objective-C for Mac OS X).

Conrad Halling
Many people believe that .NET languages are platform dependent. Not true. Java turns to Bytecode, .NET to MSIL... There are many ways out there to convert MSIL to Bytecode, making any .NET language run fine on other platforms.
Sivvy
+32  A: 

Javascript is 100% the easiest language to start with. I know it's not anyone's favorite language, but let's face it. It's the most bang for your buck the quickest. Sure it's not "cool", sure it's not a "good" language, but in what other language do you not have to install a single thing, or have anything special on your computer? Every operating system has a browser and a plain text editor, and you can have someone in their first "hello world" program in less than a minute without installing or configuring a darn thing.

cmcculloh
But it sucks for developing. Sure notepad.exe is easy to start up, but after about 15 minutes they'll want something better with indenting, code coloring, etc etc. Also don't underestimate the importance of having a good debugger that can watch variables, step through code, show call stacks, etc.
davr
Interestingly, JavaScript is probably the one programming language that all non-programmers with computers already have set up. Windows, Mac and Linux all support it out of the box!
Liam
@davr - notepad++, notepad2, gedit, kate... you're not limited to vanilla notepad. Also, there are many debugging tools as firefox extensions or other tools - just Google "javascript debugger", and "javascript profiler".
HoboBen
If someone wants to learn to be a software developer I would suggest that JavaScript is a wretched, vile beginners choice.It should at least be a language that will teach them concepts like "compiler", "strong typing". And OO.
Richard Ev
@Richard: if you believe javascript has no OO, then you know nothing about it and shouldn't disregard it so cavalierly! Besides, strong typing isn't that great...
Joe Pineda
Though I love JavaScript, i wouldn't recommend it as a beginner's language: unless you're using server-side JS (or restrict yourself to a single browser) implementation incompatibilities plain suck. Appart that, it's a beautiful and powerful language!
Joe Pineda
Javascript is more of a punishment or a form of torture than a language.
cletus
Couldn't agree more with cletus. The language itself isn't a problem, but compatibility is a nightmare. If you are building an in-house application where you know it only has to run on IE or Firefox then it's great, otherwise, stay away.
BacMan
Javascript is not a good first language in my opinion. I do love javascript though
Ronnie Overby
If you hate Javascript, it's because you aren't using a library to avoid most of the cross-platform nonsense. I recommend JQuery, but there are other good options.
Imagist
+1 for not having to install a thing
hasen j
Javascript error messages can be quite bad... (line: 0 char:0)
Kalmi
Definitely not the right approach to programming!!
Bragboy
Sorry, downvote from me. A script language dwells inside browser and relies on it should not be considered as a proper beginner language to learn programming... I am a front end web developer but I would say go for Python or Ruby first as a general-purpose language at the beginning.
Michael Mao
+2  A: 

Python is a good place to start for the basic concepts of an imperative language. For solid grounding for a career, of course C and some reasonable assembler is good (to get a feel for how machines really work), and perhaps some kind of powerful functional language (scheme is popular in teaching) - you can go through the SICP lectures online and learn scheme in that way, its great fun.

Michael Neale
+18  A: 

To those recommending BASIC, and variants thereof:

Edsger W. Dijkstra wrote:

It is practically impossible to teach good programming to students that have had a prior exposure to BASIC: as potential programmers they are mentally mutilated beyond hope of regeneration.

It's a bit of an exaggeration. I started with Visual Basic myself, but that knowledge is largely useless now.

As for my recommendation... Scheme.

Ryan Fox
Thanks, I felt like arguing the same. While BASIC is an easy enough language to pick up, it's really hard too move from basic to a "proper" language, at least that was my observation about myself.
Kit Sunde
Agreed, moving from VB to C# was 'interesting'.
Jonathan C Dickinson
That is just plain platform snobbery. My CS professors were saying this as far back as 1989 as a way to distinguish themselves from mensch who fancied themselves as a hacker-wunderkind without so much as a single college level class. Rubbish.
JohnFx
Edsger W Dijkstra is human like the rest of us, but just because he said so (appeal to authority) does not mean he is correct. The factual matter is a bad programmer will always be a bad programmer. Like the saying goes, give an artist a pantbrush...-1 down voteIn my experience I started with BASIC (briefly) on the C64, then Z80 Assembly, then FORTRAN, then EURORIA, then Python, then Java, then C++, then C# and vb.net.So I can't relate to what Dijkstra is saying.
Darknight
should have typed EUPHORIA
Darknight
The BASIC that Dijkstra was referring to was almost completely unlike the modern BASIC based languages : many version didn't even have an ELSE clause for the IF statement - you had to use gotos. There were no parameterized subroutines. All variables were global and could only have 1 letter + sigil names (A$, I%). It WAS awful. BTW, I'm not a VB programmer. I just object to misuse of ancient quotes.
Gerry
Completely agree with Dijkstra. I hate BASIC. I started with VB and later found it bit difficult to learn C++.
Jahanzeb Farooq
+26  A: 

I think Python's your best bet. It's the language we start with in the computer science courses where I teach. Python has a number of advantages, particularly for the beginner programmer:

  • print("Hello World") # updated for Python 3
  • Very simple syntax without excess punctuation.
  • An intuitive concept of variables as names rather than representations of memory storage locations.
  • Extremely easy file access (esp. when compared to Java).
  • Straightforward built-in list and dictionary types that work the way you'd expect.
  • Transitions into an object-oriented and/or functional language as soon as the student is ready.

Sure, it doesn't have pointers like C, and closures are slightly more wordy than in Ruby, but unless you're going on to a CS degree, these topics aren't very interesting anyway.

yukondude
But 'print "Hello World"' is not valid in Python 3.
oylenshpeegul
Okey-doke, I fixed it. Doesn't make the point as well though.
yukondude
+1  A: 

My Vote would go for python as well - and with IronPython you get all the goodness of .net :)

JSN
A: 

The easiest language to learn that is available on most computers is VBScript (Windows only). Notepad is all you need. You can download the help here: Windows Script 5.6 Documentation

Quickie Example:

  1. Create a file in Notepad called HelloWorld.vbs and enter the following line:

    MsgBox "Hello World"

  2. Save it.

  3. Run it from windows explorer by double-clicking on it. It's hard to get much simpler.

Where you go from there is based on the person's desire. The skills learned in VBScript will help transition to Macro writing in Microsoft Office. Once a person has their feet wet, what they need to learn is based on what they want to accomplish.

Microsoft makes available several excellent development tools with the Visual Studio 2008 Express Editions.

For the non Microsoft crowd there is an excellent IDE for several languages called Eclipse. Just as amazing as Visual Studio and free. What language you use in it is really dependent on what you want to do.

Getting your feet wet with VBScript on a windows box is not going to hurt your future programming skills.

realbasic.com has an excellent and free basic development environment for Linux users.

bruceatk
+2  A: 

I'd recommend anything of the following - in any order:

  • C
  • C#
  • Java
  • Python

Get yourself a good book (you really have to ask/search a lot for good books) and then sit down and try the language all day&night.

It's not too important which language you pick first, but in which detail you approach it. After you read the book (or maybe more than one), try to do everything you can imaging. And try as long as it is working.

cringe
+4  A: 

C

At 274 pages, with a breezy style, K&R is the perfect starting point. Compile tools are easy to come by.

Then learn Ruby.

Terry Lorber
+2  A: 

Start with C or C++. As an earlier poster said, if you get your head around the way they work you can pick up anything. Remember to teach people to program, not how to write software in a particular language.

Andrew
+8  A: 

Personally, I'd say your choice boils down to either .NET or PHP.

Whether you use VB or C#, .NET is the easiest option to get you started. The Express editions of Visual Studio are all free and very easy to install, and there are also some great quick starts and tutorials out there. It has its advanced (read: difficult) bits, but generally the easy stuff is very easy. You can do web development, Windows development, web services and mobile development with it, and the IDE and visual designers are second to none. There are other .NET languages out there such as IronPython, Boo, etc., but they require additional downloads and don't have quite as much support in the IDE.

PHP is also very easy to set up and get up and running, and its learning curve is probably a bit gentler than .NET, but it's seldom used for anything other than web development. You can download and install XAMPP to get Apache, MySQL and PHP installed on a Windows machine all in one. There are also plenty of tutorials and it's very well documented. However, you need to get hold of a separate IDE -- I generally use Eclipse with either Aptana or PHPEclipse, though it's harder to find your way round these environments than Visual Studio. PHP is also ubiquitous with web hosts.

Python and Ruby are easy to learn and use for general scripting, but they require a bit more leg-work if you want to use them for web development. Python's documentation is fair though less user friendly than either PHP or .NET. Ruby is a great language, but its Achilles heel is its documentation, which is just plain awful.

Java is a bit more tricky to get up and running, mainly because there are loads and loads of different options to consider, you need several different downloads, it confronts you with a bewildering amount of jargon, and IMO it over-emphasises object-oriented techniques and XML, which beginners often find difficult to understand and/or cumbersome to use. Having said that, it's fairly well documented, well supported with tools, and frequently it's the first language that you get taught in a computer science degree.

Don't go for Perl as a first language -- both the language itself and its documentation look like transmission line noise.

jammycakes
+16  A: 

The easiest language to start with would probably be Python.

The best language(s) might be C, Smalltalk, and Lisp. All at once, or at least within a year of each other. I started with Java and I hate using lower level languages. Much better to start with static typing, pointers, etc. and then move up. On the other hand, it's difficult to accept new concepts like OO, closures, unit tests (yes, I'll count those as language features) etc. after several years of thinking procedurally.

Nikhil Chelliah
+2  A: 

I'd suggest Microsoft's XNA with C# because from my point of view it's really important to keep motivation high in the beginning stage. Download XNA, install it, play around with some of the examples, make things move, change colors and graphics, add to it, ...

Every little change gives visual feedback: You can grasp what you have changed -> really helps learning.

BlaM
+1  A: 

Processing. You'll be able to see results even after learning very little, and develop intuition for what things do visually.

John the Statistician
+6  A: 

_why (of Ruby fame) had been working on his HacketyHack starter's kit (now defunct) - it's ruby of course, and a nice introduction to it, I guess. Haven't tried it myself, but I assume it's good for learning basic programming constructs (loops, flow, variables, etc).

Also see processing.org - it's somewhat Java-syntax based language, and it's graphics-oriented. Fun to play with, and a lot of samples to tweak, too.

Valters Vingolds
+2  A: 

Squeak, a smalltalkish environment with a lot of visual objects and things to make it fun. Developed by one of my heros Alan Kay :)

http://www.squeak.org/

epatel
+2  A: 

This may recap many opinions already expressed here, I will just add some details (and lemon)

Python has (its oddities aside) a low barrier. If you are working on a unixy type OS, its dead simple to get started with as well. Furthermore, python is available on all (major) platforms. Which is also the reason I would not recommend Boo. Although Boo is a nice language, it is for advanced users. And it prerequisites either microsoft .net or mono. Either of which are not in themselves easy to get started with. If you do start off with python, do it in the python interactive interpreter (the "python shell"). Preferably in ipython (http://ipython.scipy.org). http://thehazeltree.org will provide you with some good starting points.

You could also go old school and learn LISP (or one of the derivatives, see wikipedia). It may not be the easiest of languages to learn, but if you get through the barrier you will in turn receive a language that will help you think clearer on programming problems.

I have little to no experience with ruby. So someone with more experience/better persuasive skills than me may be of more help here.

Good luck & happy hacking.

Steen
+5  A: 

I would recommend C.Can give u a nice insight into how exactly the code you write works.After C its better to take up a pure object oriented language like Java rather than C++. People learning C++ after C typically try to write structured code using objects and have trouble getting the hang of object orientation

Gokul
+1  A: 

Ruby is the cleanest language I've used. But the problem is that it's command-line, and summing lists of numbers gets old fast. It's something that's appreciated by people who already know programming.

PHP is a great "run anywhere" language that teaches you the basics of Web programming. Most of the "fun stuff" is happening online and can help keep a student motivated. You can easily branch to javascript for more interactivity and learning OO/functional concepts.

kurious
+1  A: 

Many people have mentioned it, and I agree that C is your best choice. What I really would suggest though is something that is not a scripting language, so Java works just as well. I've found that for a beginning programmer the ability to "compile" (or something similar) is an amazing reward. Be careful with whatever you do though, and don't jump right into OOP right away, because that will probably just confuse the heck out of you. Finally, use Linux. It just makes programming so much easier and fun.

icco
+3  A: 

JavaScript is a great starting point for learning the basics - you don't need an interpreter or compiler - just a decent web browser and an editor with some pretty syntax highlighting (I recommend Aptana for JS work).

Also one of the largest benefits of starting with JS is that although you might switch server side languages you'll most likely still be using JavaScript!

James Marshall
+1  A: 

lowest barriers to entry, simplest syntax, easiest setup

If you are really starting from the beginning use Logo to introduce basics of variables,functions, block-structure, looping and recursion. (see http://www.stager.org/logo.html for some resources)

edit: I'd also like to add Scratch, Squeak & Squeak E-Toys and Alice as real options for learning about programming starting with the basics.

Once they have that, then move onto Scheme[1], Python, Java or any other language with sufficent learning support materials. Since you are teaching then choose a language you like, what matters most is an engaged teacher - not the language.

If you like PHP then go with that, but only if they already understand HTML - I'm sure teaching two things at once is a bad idea. (of course most languages have minilanguages embedded in them - conditional expression construction for instance - so you will eventually have to deal with that - I suppose you can put it off for a while if you use Scheme[2])

[1] PLT-Scheme http://www.plt-scheme.org/ comes with a great IDE and excellent supporting materials [2] but I'd only choose it for someone starting down the path of compsci.

Stephen
+1  A: 

Hrm ... its becoming more and more obsolete but I cut my professional teeth on Delphi . Its object pascal which was designed as a teaching aid. Its syntax is more verbose than a c based one so it is less frightening to read at first (for english speakers anyway). It doesn't auto garbage collect so students will have to learn about that. You don't have to use pointers but they are there. The framework (VCL) source is accessible unlike .net 2.0. The developer community is active and willing to help and they have a great free IDE.

It is best used win32 only though, the linux port Kylix never took off and the last time I tried Delphi.net it was only using .net 1.1.

I honestly think that this language should be much more poplular than it is.

John Nolan
+2  A: 

First of all, this depends on what you want to be in the end.
If you want to show basic programming concepts to an adolescent (or an adult who is not computer-friendly), chose any of simple educational programming languages. They are useless in real-life programming, but they are really easy to start with. I would recomment Alice in this case.
If you want to become a professional programmer, you should choose any of real-life low-level programming languages. Object-oriented/script languages are easier to start with, but they will not give basic understanding of computer architecture and you will eventually end being code monkey. C (not C++!) would be ideal option in this case. However, this language doesn't have a smooth learning curve and you may find that it is too complex for you. In this case I would recommend Pascal - it is easier to start with. But you will anyway need to learn C after this.
And don't learn Basic! Othwerwise you will need to unlearn it later...

+4  A: 

C/C++. Might not be quite the easiest but you have good development tools, a lot of documentation and source code. Besides C has a similar syntax Java, C#, PHP.

iulianchira
A: 

I would recommend a language that has a garbage collector for a first language, to lower the barrier to entry. I would also recommend a C-like language, because they generally have more support from syntax highlighters, which will help the beginner separate out different ideas. It should also have fewer strange edge-cases.

So taking all of that into consideration I would recommend the D language. It also has the benefit of having unit-tests and contract programming built into the language.

The revised classic "Hello World" example: ( copied from here )

#!/usr/bin/dmd -run
/* sh style script syntax is supported */

/* Hello World in D
   To compile:
     dmd hello.d
   or to optimize:
     dmd -O -inline -release hello.d
*/

import std.stdio;

void main(string[] args)
{
  writefln("Hello World, Reloaded");

  // auto type inference and built-in foreach
  foreach (argc, argv; args)
  {

    // Object Oriented Programming
    auto cl = new CmdLin(argc, argv);

    // Improved typesafe printf
    writefln(cl.argnum, cl.suffix, " arg: %s", cl.argv);

    // Automatic or explicit memory management
    delete cl;
  }

  // Nested structs and classes
  struct specs
  {
    // all members automatically initialized
    int count, allocated;
  }

  // Nested functions can refer to outer
  // variables like args
  specs argspecs()
  {
    specs* s = new specs;

    // no need for '->'
    s.count = args.length;      // get length of array with .length
    s.allocated = typeof(args).sizeof; // built-in native type properties

    foreach (argv; args)
      s.allocated += argv.length * typeof(argv[0]).sizeof;
    return *s;
  }

  // built-in string and common string operations
  writefln("argc = %d, " ~ "allocated = %d",
  argspecs().count, argspecs().allocated);
}

class CmdLin
{
  private int _argc;
  private string _argv;

  public:
  this(int argc, string argv)   // constructor
  {
      _argc = argc;
      _argv = argv;
  }

  int argnum()
  {
      return _argc + 1;
  }

  string argv()
  {
      return _argv;
  }

  string suffix()
  {
      string suffix = "th";
    switch (_argc)
    {
        case 0:
          suffix = "st";
          break;

        case 1:
          suffix = "nd";
          break;

        case 2:
          suffix = "rd";
          break;

        default:
            break;
    }
      return suffix;
  }

}

If you do choose to go with D check out DSource.org

Brad Gilbert
+1  A: 

If you are new to computer programming, start off with python. Things can't go easier than that. Also python would teach you a lot about indentation in code. Learning python would teach you to properly indent your code in whatever language you write.

Beware though that after learning python I haven't been able to get to program in any other language easily. My mind always wants to go back to python.

If you want to get into more detail, you must learn C. If python is your first programming language, then you can try writing C extensions in python for really simple functions. That would be a good start.

cnu
+2  A: 

My opinion on this is influenced by reading "Design by Numbers." I think having an interpreted language is easiest on the beginner. Issues of syntax and style aside, my opinion is that text-in text-out program bore a youth very very quickly. As has been mentioned HackityHack is a proposed solution to this. However I feel this to be true: ActionScript has a really nice amount of interactivity and feedback to it in the context of flash. Yes the IDE leaves most persons wanting, but it just draws pretty things and abstracts away a lot of other issues.

People literally throw their first language or two away; I will never write in AppleSoft Basic again, probably not Pascal either.

I'd recommend the subject start with ActionScript with a couple of rules:

  1. Everything must be in the first frame of your stage
  2. Start without defining functions, output stuff to trace()
  3. Move on to drawing stuff to the stage.
  4. Take input from mouse position.
  5. Take input from text fields.
  6. Learn to manipulate movieclips for fun and profit
  7. Play with this for days.
  8. learn to use functions.
  9. use functions to handle events like mouse clicks.
  10. do something recursive like draw a tree.

At this point I'd say you're done with ActionScript; it only gets messy from here. You'd try to move on by actually using the stage, and start sprinkling your ActionScript into multiple places... Both of these are wrong headed and eventually impossible to debug. You could do dynamic loading of CSV and XML files and then even use web services... but you should move on to JavaScript with jQuery or something that works on XHTML and CSS. As a plus, there's an ActionScript and JavaScript bridge.

Alternatively, if a 12 year old can write an excellent text adventure game in scheme, then maybe scheme is a fine next language.

Note that I would say Proce55ing has a similarly strong feedback loop for beginners, but I'm not sure it's quite as friendly.

dlamblin
+2  A: 

I'm going to agree with the Python crowd here. Python has a low barrier to entry and is used all over the place.

It has been compared to BASIC in this respect (which is where I got my start, incidentally), but with the footnote that it's taken more seriously than BASIC and, as such, could potentially create a revenue stream for you faster while you hone your skills (which is a lifelong process, of course).

AgentConundrum
+2  A: 

Shells!

MS has recognized the learning path from shells to other languages. I have personally done all of my exploring into .NET via powershell. For a sysadmin I highly recommend it; as with any of the *nix shells, the initial reward value is high enough to demonstrate the need to learn to program. By introducing a pipeline a level of programming is already required to do day-to-day administrative tasks and creating a simple one-liner gives immediate reward and encourages a deeper-dive.

As seen on the Powershell blog:

Developers love about PowerShell because it is both a shell and a scripting language but more because it creates a virtuous cycle with their systems programming. PowerShell is .NET based. As such, when you use PowerShell as a shell, you are actually learning the .NET object model – what the objects are, what their properties are, etc. When you run a command and format the results as a table, the columns are the .NET properties of the .net object that was emitted (modulo that fact that PowerShell sometimes extends these for greater consistency).

Well that's how it's gone for me at least :)

slipsec
+1  A: 

I cut my teeth programming on Basic on a C64 and had never really had an opinion on how to learn programming until recently when helping someone learn programming with Python. I suddenly realized that you can't get much better than Python as a first language simply because it is interactive.

It had never twigged with me before, but being able to see what state the system is in after you're run each line of code really helps with the fundamental ideas. I guess the analogy would be that when you learn other things in life you're not forced to plan everything out to start with and then just have to sit back and watch what happens. When things start to go wrong you can correct and change, just like in Python.

So I'd say either Python or, if they're feeling particularly brave with a sound grounding in maths, ML.

Free Wildebeest
+38  A: 

I'd recommend Delphi.

I can't tell you how many people say to me "I started programming with Turbo Pascal" --

Delphi is still has the same basic ease of use and power that Turbo Pascal did.

But I'm a bit biased, as I'm the Delphi Product Manager. ;-)

Nick

Nick Hodges
I grew up on Delphi and still like the idea of coming back to it one day... For now I am stuck in the Java World :(
Peter Perháč
+1  A: 

C was the "right" starting point for me, after failing to grasp BASIC and VB effectively. Don't let the C's reputation for being "hard" deter you from using C to teach programming. It's hard to get big programs done quickly/easily in C as it lacks many features of the higher level languages, but it's limited set of functionality makes it well suited to learning to program. Learning the machine is a very nice added bonus.

I strongly recommend against teaching GUI programming before teaching command line programming first. I/O in command line environment is very easy and doesn't distract the beginning programmer from learning the fundamentals of programming. It also serves as a good basis for understanding web programming later.

Imran
+1  A: 

Hai! Why no mention of LOLCODE? KTHX, BAI.

Ian Patrick Hughes
+7  A: 

The best language is {insert-your-favorite-language-here} :)

My advice is to learn a language that someone you know + like knows, so you at least have a mentor.

If you're doing web development, there are dozens of languages/frameworks that you could choose and ultimately be successful using.

ryw
+1  A: 

for python check out Dive into Python. It's available for free download on the site, and it's available in a bunch of languages too.

I've found it very useful so far.

Jiaaro
+2  A: 

lowest barriers to entry, simplest syntax, easiest setup?

Hypertalk. I had learned Basic, assembly and some Pascal when I was exposed to it, and I was stunned by its sensibility. I'm not sure about compatability, but it probably runs in Classic mode on any pre-Intel Mac.

Logo. I never used it much, but if I was teaching someone young, I would start with it.

Or maybe a macro language / formula system in a spreadsheet or word processing application.

In my experience as a QA tester, the biggest problems programmers have is that they failed to learn the "what" of the program, not the "how". Anything that teaches someone to take a concept and express it precisely, verbally, is a good start.

(heck...)I guess music theory is probably another good starting point.

benc
+6  A: 

OK, I guess my suggestion is going to sound weird to lots of you, but it would be a functional language like Caml.

Caml was the language I started with (at school), and I thought it had quite a few nice features (some are shared with other suggestions from other answers):

  • has an interactive (interpreted) mode, which is really nice for a beginner;
  • you don't have to handle anything memory-related (pointers,...);
  • code is usually quite concise (compared with C, C++, Java,...);
  • it's very easy to create/manipulate complicated data structures (you usually encounter trees, lists, graphs,... very early on), so it's great to learn about algorithms at the same time!;
  • if you get serious about programming, you will anyways (surely!) learn a procedural language later on, so beginning with a functional one, at least you'll have been exposed to one;
  • you can program in imperative (and even OO) style with Caml;
  • IO is easier that with some 'purer' functional languages, like Haskell for example, that use monads (which are not the easiest thing to understand for beginners!).

This worked really fine for me (though I did come from a maths background). If the goal is to be 'as close to the hardware as possible', then I'd follow Joel and say C.

OysterD
+1  A: 

Personally, I think ANYTHING will be fine. Let's face it: Programming is not something you can pick up in five minutes and start throw out good code. The only way to do that is to have a huge huge library and a good search program, period. If you are to learn programming, you will have to face difficulty, so an easy language will turn out to be a hard one.

With that said, I also think that C#, actually, anything with Visual Studio should be kept away from beginner. No, not only Visual Studio, but anything with a good IDE and interface designer and you can create a program after a number of clicks. Yes, I grew out of Turbo Pascal (into Borland Pascal, how's that :D). However, Pascal had no design manager, nor did I have the luxury of avoiding the main program. Look at what MS does to programmers: it reduces the art of programming, an difficult and abstract art, into concrete clicks. I cannot describe to you the shock I receive when I switch out of Visual Studio. Within it, I did not programming per se, but rather using VS to create some .exe file that run and satisfy my ego.

Hence, a good programming language for beginner is NotePad (actually, NotePad++ or Emacs or vi would be better) and a compiler. Alternatively, a command line interpreter. That's it. Any language will be fine. Most popular programming languages become popular for a reason: they are usable (except Money-Oriented-Languages, even those are nice enough). By the way, as little internet as possible (so if you use Java/C#/VB.NET, you cannot search for a particular class. You must implement your own with what your tutorial or book gives you).

That is, I believe, the best start. Remember, "Real Programmers don't use Pascal."

magice
+1  A: 

Of course, there is also an unanswered question of which would be the worst language to learn...

toolkit
+5  A: 

Like mentioned by epatel, Squeak Smalltalk is a really cool language to start with.

  • Smalltalk has a very simple syntax, designed to be understood by children
  • Squeak has a very easy setup: download it and run it.
  • Select some code anywhere in Squeak, and do it (executes the code) or print it (executes the code and prints the result)! It's a great way to explore programming.

It has two small problems though.

First, to start coding you must familiarize with:

  • the Object Browser = where you browse and define new classes
  • the Workspace = where you can type and run snippets of code.
  • the Transcript = where you can print some text output.

But there is a very responsive and experimentend Squeak beginners mailing list, that can help you start.

Then, if in a later stage you want to do native GUI, you have to use wxSqueak.

Another advantage is that most Smalltalk implementations, including Squeak, are also excellent intermediate / advanced programmers IDEs, including automated refactorings, integrated unit testing, a mature Collection framework, and... on the fly inspect / debug / modify the whole system while it is running!

Hope this helps. Cheers!

Sébastien RoccaSerra
A: 

I think absolute beginners would like to write programs which look like "real" programs as soon as possible. It doesn't really matter if the program doesn't really do that much if it looks good. So Visual Basic.Net Express edition (free) would be my suggestion. Otherwise someone trying to learn programming might be discouraged by the difficulty of creating good looking programs and might stop trying to learn... I don't think it really matters too much which language one starts with. After one language learning another one is much easier.

That Dijkstra quote mentioned above is from 1975, Basic has evolved quite a bit since then. He also said

Object-oriented programming is an exceptionally bad idea which could only have originated in California.

Kaniu
i countered the downvote on this question; your answer might not be popular but it is accurate and helpful
Steven A. Lowe
Dijkstra was wrong too. Object-oriented programming originated almost within walking distance from his country.
Windows programmer
+1  A: 

It depends on what type of programming.

Web-based? Desktop apps? Multi-processing? Each will have a different answer.

I think to be a good programmer, you should learn C, a scripting language (pick one from perl, ruby, php, etc), and one "non-traditional" language like lisp, APL, etc. If you can get comfortable in C, perl, and lisp, you can pick up pretty much any other language, and more importantly you'll have enough of a background to (hopefully) be able to pick the right tool for the job at hand.

chris
+1  A: 

It doesn't matter too much which language you start with, as long as it's Ruby. :-)

No, seriously, there are a number of good languages to start with (and as many bad ones); at least as important as which language, though, is which tutorial or book to use. I wrote a tutorial that... well, honestly it sucked at first (as most do). But I got lots of great feedback and tried my darndest to fix the parts people got stuck on, and several years later it actually got pretty good (if you don't mind my saying so... and if you do, well other people say so, too, so there). Check out the tutorial if you want, or the even more complete/up-to-date book version.

And yes, it uses Ruby.

Chris Pine
+2  A: 

Don't forget Perl. These days Python has taken over, but Perl is still a very valuable tool.

Hugh Buchanan
+1  A: 

TCL -- simplest bar none

Simple != useful for teaching concepts to a beginner
Richard Ev
+2  A: 

+1 for Smalltalk.

Simple syntax, clean & obvious behavior, everything is an object, every action is a message sent.

Jerry Cornelius
+1  A: 

I am not a good programmer by far (at least not yet). I did Turbo Pascal & BASIC in HS, some PHP, ASP, JS, and Java back about 8 years ago. Just recently started getting back into programming for personal development and what not. I decided to try out C# and VS 2008 Express. On top of that I picked up the O'Reilly Head First Labs C# book and have really been enjoying the learning experience.

My limited experience with C# is that it's easy, fast (at least what I'm doing), and great tutorial resources available.

I might pick up Ruby to do some fun web stuff though. Not sure yet.

HTH.

~Allen

Valien
+2  A: 

I actually think that the best beginners language you can teach is Visual Basic. The good thing about this language is that you can actually start creating a user interface the very second you begin. Opposed to other languages like C, C++, Java which makes a bit difficult to create friendly user interfaces.

Jose Vega
+1  A: 

I learn with VB5 and VB6. I think it was a good start because application was very easy to build and to have a result. In the same time I learn component, basic looping and other basic thing that other language like C or C++ would have been taking more time and maybe have discouraged me.

But in 2008, I would suggest VB.NET or C#.Net because they have a clean IDE that is easy to understand too for young new beginner. You press play and it works!

Daok
+1  A: 

No-one's mentioned Lua, yet.

  • small language, reading 20 first pages of the manual is enough to get you going
  • fits all in your brain at once
  • has a nice way to "deep dive" into ANSI C if one so wishes

If running on Windows, check Lua for Windows. It has also some neat add-on modules built in.

akauppi
+2  A: 

Depends on what you want to do; if you want do something in language X, learn language X. If you just want to learn how to program in general, either Python or Scheme will do very nicely. Python is more practical, but Scheme will teach you more basics.

David Thornley
A: 

I started with Modula 2!

  • Non-intimidating syntax (none of {this stuff})
  • Strongly typed
  • OO
Richard Ev
+1  A: 

Lua. Installation is a dream. There is an excellent book available free online. The language syntax was designed for non-programmers. It is the simplest of all the scripting languages, so you can master and understand the whole thing. It has powerful data structures. It has an interactive loop. Its string processing is a brilliant piece of engineering: almost as powerful as regular expressions, and one hell of a lot simpler. It is very stable over time and is expected to remain so.

As a bonus, Lua can be a 'gateway language' to C or to Scheme. And Lua has the smallest, fastest implementation of all the scripting languages. These guys are great engineers.

Norman Ramsey
A: 

I put it a bit different. It depens on what you especially want to learn. 1) let's say it's object oriented programmming. Then I suggest a "pure" OO language. that excludes C, D, Ocaml, Common Lisp, Fortran, Cobol, but includes languages like Ruby, Smalltalk, Self, Beta, Io

2) let's say it's to understand how machines work. Than the first choice is Assembler, probably C, C++ or D next

3) let us assume you are looking for languages with largest set of libraries. Then C#, the .NET languages, Java, and maybe Smalltalk would be a good idea

4) if you like to learn functional programming. You have to choose languages like Haskell, Ocaml, ML, Qi, maybe Scheme

5) if you like "practical languages" then you might like to check out Common Lisp, Scheme, the diverse .NET languages Ocaml

6) if you want speed than you probablly want to learn Assembler, C, C++, or OCAML

7) if you like languages which cover more "approaches" then you like to learn Scheme, Common Lisp, Ocaml, Mozart/Oz

8) if you want to formulate your goals and let the machine find it's way to it then you like to learn Prolog

9) if you like concise languages than Forth, and derivates will come in handy.

10) if you like to do much text manipulation you like to learn something like Perl, Tcl/Tk, Ruby, Python the so called scripting languages mainly

11) if you like to have your language on as many OSes as possible then, C, Smalltalk, Java and many scripting languages

12) if you want good tools support than the .NET langauges, Java, Smalltalk and the IDES of some Commmon Lisps will be good choices

So the answer is: "It depends"

Friedrich
A: 

My wife is a (web) designer. She doesn't need to know more about programming than make some basic Javascript/Actionscript controls.

Well, I started teaching her about Javascript. All we need is a text editor (highlight preferred) and a web browser and I got amazed with her progress.

I started talking about constants, variables, conditionals, loops and functions. Now she is going further with JQuery and Flash/Actionscript components.

So, depending on the needs of the person you are going to teach, Javascript may be a great start point.

Regards

Jose Ricardo Ziviani
A: 

To me, language syntax itself may not be the largest problem.

I'd say a language is easy to learn base on the following:

  1. Community, friendly forum & complete documentation
  2. A nice IDE what have the "LIVE STEP BY STEP DEBUGGING" feature, that I can show and watch that happening behind the code.
Dennis Cheung
A: 

You should first learn basics of C. Because it is a programming language you'll see on most of the colleges around the world as a first step. Most of low-level programmes is written in C. Most academic institutions have some classes about C as first step.
After learning basics of C you should as fast as you can go to Java or C#. Because syntax is very similar so you can switch between them fast. I would go to them because they are fully object oriented. C++ is the grandpa of both of them but you'll probably spend hours finding some stupid mistakes that you made and that are allowed to do but it's not actually what you wanted. I would avoid Visual Basic, no refactoring, unit testing... and that are things that help you a lot. I don't know about Python.

gljivar
+1  A: 

I'll second the suggestion above to learn Processing. It is easy to get up and running doing interesting things with graphics and animation, has lots of examples readily at hand, and when you're ready to move on, it can lead you right into programming with Java. If you're interested, flip through a copy of Ben Fry's book "Visualizing Data".

JMurphy
A: 

I think you want a language with a good IDE, so I vote for C# in VS2008.

iterationx
A: 

I recommend a language with some outdated features. For example line numbers. Or semicolons. :)

A: 

I would say:

  1. Python
  2. PHP
Rachel
A: 

Amazingly Scala might be the easiest if u try Kojo

Łukasz Lew
A: 

Python. And it looks like I am not saying anything new with this, just one vote more.

corydalus