When I was a child I learned programming with BASIC, but Computer Science courses taught Pascal. When I went to university the first language taught was C (or Fortran for some non-IT courses). Today it is Java (and still Fortran).

Besides academia, which language should learn someone who want to learn programming?

link|improve this question

75% accept rate
feedback

closed as not constructive by Anna Lear Feb 8 at 23:24

This question is not a good fit to our Q&A format. We expect answers to generally involve facts, references, or specific expertise; this question will likely solicit opinion, debate, arguments, polling, or extended discussion. See the FAQ for guidance on how to improve it.

16 Answers

up vote 7 down vote accepted

I believe C# will be a good choice as it allows one to build some simple applications with nice looking GUI relatively easily. Further, it introduces them to the world of OOP and also teaches .Net framework.

link|improve this answer
1  
Yes, much better than people that has learned "programming" on VB6... – Lorenzo Sep 15 '10 at 8:17
4  
I agree, but C# now has so many new features that you need to make sure you take it one step at a time and cement your knowledge of the basics before moving on to newer features. – nlawalker Oct 27 '10 at 17:41
show 3 more comments
feedback

It depends to what extent you want to learn programming. If you want to build a solid foundation from the beginning, go for C or C++ (C++ might be a little frustrating to start off with). Introduction to the concepts of pointers and raw memory management will be invaluable later in your career.

If you just want to start hacking and build something now, a higher level language would be sufficient. Maybe Ruby would be a good investment?

link|improve this answer
2  
Completely agree. Learning C is an investment in knowing the in-deeps of the computers – Khelben Sep 15 '10 at 7:38
1  
Agreeing with this as well. C was the first language I learned and the steep learning curve it offers really pays off in the future. – Terence Ponce Sep 15 '10 at 7:44
1  
@back2dos: I agree, in fact the question was for the advocates of C as first language to learn. I want to know from them why learning C as first language is better than learning Java. – Lorenzo Sep 15 '10 at 8:39
3  
I disagree. I learned some C first and had trouble making the creative connection between simple math apps to full GUIs (losing interest in programming and not picking it up again until 8 years later). It took starting with really high level (web development) to first get interested then eventually work my way down to systems stuff later. Learning top down is a lot more like incremental exploration and is a hell of a lot more fun than learning by chasing pointers. – Evan Plaice Sep 15 '10 at 12:25
3  
I disagree. C is a good way to scare people away from programming. Learning is much more meaningful if you can actually do something useful fairly quickly and don't have to care about every single little detail. Yes, C teaches you a lot about the inner workings of a computer. But learning everything at once is usually a bad idea. – Carlos Sep 15 '10 at 18:18
show 11 more comments
feedback

I find Java and Python to be great languages to start out with because of their friendly syntax.

link|improve this answer
3  
Python yes, but Java? Friendly? Have you ever seen how much ceremony goes into a simple "Hello, world!" program? – Graham Lee Oct 27 '10 at 18:12
show 2 more comments
feedback

If you want to truly learn programming, read SICP and do all the exercises in scheme. Scheme will certainly never be the language you'll use to program software. But for learning it is a good choice as you can pretty much use every kind of programming paradigm with it (procedural, functional, oo, macros, closures, tail recursion, first-order functions...)

Then learn C (not C++) to create programs for non-classic architectures like, for example, for fun projects on the nintendo DS (2 ARM CPU (ARM7 and ARM9), different memory banks, volatile i/o registers, many input methods, adhoc wifi, touch screen, scarce resources) Through this kind of exercises, you can learn details of the compilation process with programs running on real machines, not virtual ones (gcc specs files, linking process, ABI) and debug in difficult situations. It forces to understand the machine logic, buses, memories, malloc, freeing of memory, etc in real environments.

After that you have lots of subjects to learn that are not directly dependent on the language (networking, gui programming, databases, web programming...).

Read the article Teach Yourself Programming in Ten Years for more ideas on mastering the art of programming : on appendix, you'll have criterias for choosing a programming language :

Here is what Peter Norvig have said :

Several people have asked what programming language they should learn first. There is no one answer, but consider these points:

  • Use your friends. When asked "what operating system should I use, Windows, Unix, or Mac?", my answer is usually: "use whatever your friends use." The advantage you get from learning from your friends will offset any intrinsic difference between OS, or between programming languages. Also consider your future friends: the community of programmers that you will be a part of if you continue. Does your chosen language have a large growing community or a small dying one? Are there books, web sites, and online forums to get answers from? Do you like the people in those forums?
  • Keep it simple. Programming languages such as C++ and Java are designed for professional development by large teams of experienced programmers who are concerned about the run-time efficiency of their code. As a result, these languages have complicated parts designed for these circumstances. You're concerned with learning to program. You don't need that complication. You want a language that was designed to be easy to learn and remember by a single new programmer.
  • Play. Which way would you rather learn to play the piano: the normal, interactive way, in which you hear each note as soon as you hit a key, or "batch" mode, in which you only hear the notes after you finish a whole song? Clearly, interactive mode makes learning easier for the piano, and also for programming. Insist on a language with an interactive mode and use it.

Given these criteria, my recommendations for a first programming language would be Python or Scheme. But your circumstances may vary, and there are other good choices. If your age is a single-digit, you might prefer Alice or Squeak (older learners might also enjoy these). The important thing is that you choose and get started.

link|improve this answer
show 5 more comments
feedback

My personal opinion is that it does not matter very much which language you learn first. The most important thing is to be exposed to different programming paradigms early on, so that your brain does not freeze into a single way of thinking.

A good way to do that, IMHO, is to learn a "pure" language in each paradigm, e. g. a purely imperative language, like BASIC, Pascal, Fortran, or C, a purely functional language like Scheme, a purely object-oriented language, like Smalltalk, or a purely logical language like Prolog. This way you would be forced to actually use the corresponding paradigm. This is as opposed to using a hybrid language in which you can get away with just using the paradigm you already know. An example would be coding in C++ using only the imperative paradigm, as though it were C.

It is probably also good to learn several languages in the same paradigm, just to see that once you understand a paradigm, learning another language that supports that paradigm is largely a matter of learning the syntax and the idioms.

link|improve this answer
feedback

Having learned Python recently I'd recommend that people gave that some consideration. It's clean and tidy, relatively simple, gives you results quickly (which students like) and works for a range of platforms.

Yes there are lots of things it doesn't have but I think the simplicity and quick results outweigh those limitations.

link|improve this answer
feedback

I think, Ruby's "principle of least astonishment" could be helpful. Processing could be interesting for multimedia.

link|improve this answer
feedback

I started off using QBASIC (haha).

But I think if someone has no prior programming experience, then maybe SMALLBASIC is the way to go?

(Not for projects etc, but to learn how programming works).

^_^

link|improve this answer
show 3 more comments
feedback

I started off in Pascal way back when. I'd go for C -- it doesn't coddle you in any way (so you'll be happily surprised when Python doesn't eat your soul after a mistyped bit of pointer math), and it smacks you in the face with really important, low-level concepts.

I feel like learning C is like learning to drive on a manual transmission -- once you get the hang of it it really isn't that hard, and once you're good at it you'll be confident in your ability to drive any car any time.

link|improve this answer
feedback

JavaScript

For a "first language", it's hard to beat JS today. The language itself is extremely simple, can be used interactively, and is available on just about any computer with a web browser (so, just about any computer). That puts it squarely in the position that BASIC once filled...

Better yet, unlike Pascal or the various BASIC dialects still floating around, you can actually use JS for simple but functional projects. Most folks are familiar with web browsers, but consoles are far less familiar to young users...

C, and to a much greater extent, Java and C#, all require a fair amount of boilerplate just to get out the door. And the latter two require at least some knowledge of their massive libraries in order to actually do anything useful. Nothing wrong with learning them as a second language once you have the concepts down...

link|improve this answer
6  
But with a first languages like JavaScript the new programmer wouldn't learn too many bad habits? Shouldn't the first language be a school for "good programming"? – Lorenzo Sep 15 '10 at 13:37
show 2 more comments
feedback

I'd say python, since it covers the basics while being easy and featuring a lot of pre-made functions.

I know python is very different, but it avoids having you to learn stuff which is specific to a language in particular, like compilation, includes, headers, compilers, IDEs, etc.

Of course there are differences you will have to understand when switching to another language, but I think it is the best you can try if you want a quick start.

But anyhow you have to understand that it is also a very good idea to start learning C/C++, only if you keep focusing on the very basics (the part which works approximately as well in C as in C++), but don't forget your progress will be slower, while python offers great libraries like pygame which allows to quickly build a 2D game.

link|improve this answer
feedback

I started with QBasic in school. Then I did self learning on Pascal and from university started off with C/C++.

It seems many people started off with Pascal, but for contemporary wanna be programmers they can directly start with C/C++ since most modern popular programming language(Java, C#, PHP etc.) are similar in structure to C and likewise they are called, "C like language".

link|improve this answer
feedback

awk

C++ is way too complicated!

link|improve this answer
feedback

I would recommend Perl. With it you can . . .

(1) teach procedural programming. (2) teach object-oriented programming (3) teach testing. It is easy to do with Perl scripts (c.f. Automated Testing with Perl). Thus teaching Test-Driven Development from the start is not difficult.

Also, I have noticed that even projects that primarily use other languages, Perl is often still used for some of the essential parts. It reminds me of a quote I read recently: "Perl began with the assumption that it would not be the only tool in your toolbox: it set out from the beginning to play well with others."

link|improve this answer
show 1 more comment
feedback

SQL Structured Query Language

link|improve this answer
feedback

For OOP and nice application which can be build in a fast way I can suggest you Delphi.

best regards,

link|improve this answer
feedback

Not the answer you're looking for? Browse other questions tagged or ask your own question.