Which programming language is best to learn first?

No readers like this yet.
No readers like this yet.
Lines of code, orange background

Opensource.com

Part of being a good open source citizen is contributing to the projects and programs you use and care about most—and learning how to code can be a big part of that. But with so many programming languages out there, picking the right entry point into coding can be a challenge.

That's why we want you, our readers, to share your thoughts. Should new coders start with an "old reliable" language like C, or something lighter and perhaps easier to learn, like Javascript or Python? Let us know what you think in our poll, and be sure to join the discussion in the comments section below.

2487 votes tallied
C/C++
24% (606 votes)
JavaScript
10% (242 votes)
Python
46% (1134 votes)
Ruby
4% (109 votes)
Go
2% (42 votes)
Rust
1% (13 votes)
Other
14% (341 votes)

Results

Comments

33 Comments

HTML / CSS with some javascript to go in to your HTML.

For professional/serious programmers Python, Ruby, C#, C++, etc
but
for learning programming then Pascal is the best. It force you to do structure programming and that's the best thing to learn for first timers. After learn structure programming then learn objective programming (most of the top programming languages handle objective programming and Java is the most famous), then functional programming (Haskel, ML, OCAML, F#, Scala)

sorry, I was thinking on Objective C when I wrote "objective programming" what I mean is "object-oriented programming"

What about Scratch as a choice? Lots of good reasons for that to be included.

As with ANY question about "beginning" something, it's so dependent on the kind of learner someone is, what sort of goals they might have with learning to program (a hobby? a real project? a new job duty? a career change?, etc.). I think any language that has a gentle introduction, is interactive, and offers immediate results would be my choice. The learner would get hooked sooner, and be ready for greater challenges. So, for me scripting languages with graphical output are the way to go. Therefore, Python (maybe a Javascript/HTML wrapper of some sort) is a better choice.

It depends entirely on what your purpose is in learning a language. Do you want to expand your mind? Get a job as a developer (and if so, what kind)? Program home-built devices?

If you are interested in writing applications for multiple platforms, may I suggest "8th" (I'm its creator: 8th-dev.com)?

If you want to write "web-apps" then HTML+CSS+JS is the easiest path to that at present.

Very nice project! Just sent the registration for the non-commercial download. I'll take a look as I've been looking for a cross-platform tool like this.

Perl no longer qualifies as a top language? Has it really come to this?

Perl, as a language, has much going for it. However, when learning a new language, Perl's 'many ways to do one thing' can be a hinderance when learning a new language.

However, like Cobol, Perl will still have a strong presence in the open source environment for a long time.

I have no doubts! If you get into serious programming you will have to learn C!!!

C++, only because C is difficult, and it also offers OOP (in case you wanted to get into the gaming industry). Once you have learnt a programming language, most other languages would become very easy to learn though.

C because everything else including C++ is based on it in some way or another. C allows you to learn the basics of memory types, structure, loops, decisions without all the confusion of OOP. Once you learn C solidly, and can think as a programmer, THEN introduce OOP concepts. I learned Java first, but never really LOVED programming until I learned C.

I was first taught to C (1985) then C++ (1993), but all in vain. Even if I could code using them, I did not really enjoy programming. Then Java was out and I really fall in love with programming. But this story should not be a surprise, Universities and Colleges in in the US soon switched from teaching C/C++ to Java. So, had changed the AP Computer Science Exam https://apstudent.collegeboard.org/apcourse/ap-computer-science-a/exam-practice
I love Python but do not think switching from Python to C/C++ or C# .NET would be as easy as from Java to those latter languages similar in syntax. But today, I would definitely add Java Script, HTML5 as part of any programming curriculum.

A relucktant YES only because it is a real language and is taught everywhere and leaves you with a usable skill when you have finished the course. I use Kylix, and so I like Pascal as a training language, but the world doesn't, so you must go with the majority on this one.

It's also important to have a good IDE that is simple and basic that gets out of your way and just does its job effectively. If you're going to program in C, or C++ I highly recommend CODE::BLOCKS http://www.codeblocks.org One of the best ways of learning is having a simple problem to solve and writing a program to do it. There are plenty of sites that will give you simple walkthroughs and instruction. The more you code, the better you will get. I look back at some of the first programs I wrote and am like "WHAT THE HECK WAS I THINKING!" There is nothing like being taught a language though, so if you can go to a class or school to learn, do it.

Firstly, use Linux as rthe dev platform, because anything else is sadistic to the kids.

Start with basic shell scripts, then Perl, then C.

From there, you can do anything you want to.

I say stick with Java. I love Python and have taught classes in it but Java gives you a good introduction to programming principles. It's not truly better than C++ when it comes to that but it's more "reachable" to a beginning programmer. They say you only get the full potential of Python when you learn it first (thus why MIT and Berkeley teach it before any other language) but I think it's a lot harder to transition from dynamic to static typing than the other way around.

There are, of course, a number of questions that are worth answering with this question. Do you have an opportunity to work with a mentor, or to make progress with a project that is important to you personally or professionally if you go with a particular language? What do you want to do with your programming skills, and is there a good community around doing that particular thing with your chosen language? Are libraries and bindings for these tasks readily available and well supported?

I learned QBasic, and then Turbo Pascal, when I was first getting started (probably disclosing something about my age there, or at least something about the age of the system I learned to program on). I tried picking up C very early, but for what I was doing, C didn't offer any advantages in speed or ease or use, so I didn't stick with it. I wish I had made more of an effort with it, because when I went off to college, classes generally used Java.

If I were starting out today, I'd probably tell the thirteen year old version of myself to learn Python and/or JavaScript, since these two make up 80% of the small amount of programming I do these days. Both were available when I was getting started (being 24 and 20 years old, respectively), but at the time, I had no idea that either would remain so prominent for so long. The real driver, the shift from desktop applications to the internet as a platform for application delivery, just wasn't fathomable to a teenage me in the 90s.

Javascript is very accessible and fun e.g. instant results in the browser, with browser console, even drawing using HTML5 canvas. Tools like jsfiddle can be used, so all learners need is the browser.

There is nothing wrong with old-fashioned (but structured) Basic to get started, simply because it illustrates the use of variables, input, output, branching and looping in a comprehensible, uncluttered way. Much cleaner than others with lots of "noise" like semi-colons, curly braces, etc. If you REALLY want to know and understand what programming is all about, take Forth - because you can understand what a Forth compiler does and how it works. C is much more complex in that regard, hiding its inner working below layers of abstractions. Certainly don't start with an OO language. The concept itself is seriously flawed (people who claim otherwise are just playing the parrot) and incomprehensible to beginners. The inner workings of OO are viciously dirty and inelegant, so that's no good begin either.

While this conversation is nice to have, what has been provided really can't be used in any conclusive way--it's all anecdotal at best. Yes, some of this feedback may be useful in some context but it cannot conclusively be used to determine the best intro language. If you want to know the best intro language, then you need to conduct experiments--i.e., use the scientific method. Then, based upon the results you can state what does and does not work in the context of the experimental environment. While I mean no disrespect to the language designers or users, Perl has already been shown to not be a very friendly intro language by researchers such as Andreas Stefik. Java also poses difficulties.

Python is the clear winner. People should read the given poll questions. "What is best programming language for beginners to learn?" . Obviously Python. Java is not there in list. LOL.

One thing about beginners, they don't know anything else. My first language way back was of course BASIC. Since I was primarily interested in databases, I learned dBase.

This I think is what is most important, what is it that the a person new to programming is interested in ?

I doubt that those who are interested in programming don't have something in mind that they want to do.

If one is interested in systems programming, C would have to be the go to language.
If one is interested in web site development then Javascript, HTML, CSS etc. is the logical choice.
If one is interested in system administration, learn how to use BASH and then a scripting language like Python or Perl.
If one wants to write desktop type applications or enterprise applications, Java.
If one is interested in databases learn SQL first.

Programming is not an end in itself. It is a method for doing something else.

If one is looking at a career in programming, then the popularity index has something to say about that. C, C++, Java, Python, Perl. One needs to know a language that has a large installed base because in nearly all cases one will be doing maintenance and upgrading of existing applications.

Beginning programming is about the primitives: data types, variables, functions, conditional branching, loops. These are common to all languages.
A beginner can start with any language for these items and once comfortable with them will probably have little difficulty moving on to the more complex areas regardless of the language.

The most important element is what is the interest of the person ?

And not all programming is about the above. For some people, they can do everything they need to do in a spreadsheet using the various functions available to them. I remember when there used to be a whole slew of Lotus 123 and Excel macros floating around because people would use their spreadsheets for everything.

One great thing that is available is the ton of tutorials available for just about everything.

Let's not also forget that after a while, most programmers use libraries, frameworks, IDE's for their work. Sometimes as in a foreign language, one gets better at reading it than one does at speaking it which is sort of what happens when other code is used. One may not have been able to write it but one is able to understand what it does and use it.

Combining C and C++ into the same entry is a strange choice for a poll like this one.
My vote is for "Other" (Pascal).

How is it that PHP was left off

http://phpthegoodparts.tumblr.com/

I have been asking myself this question a lot recently. In my relatively long career I've used dozens of programming languages. I taught myself Fortran (pre IV) from my Dad's night school books when I was 10. Used Fortran IV in high school. Also, took extra Comp Sci in high school and learned IBM 360 assembler and APL/360. Oddly, looking back, that was a good grounding in some different aspects of programming. FORTRAN for doing "regular ol' programming" back in those days. Assembler to teach me how the machine really worked. And APL/360 for an odd, functional-like, non-Von Neumann language. I didn't intend to get such a broad view of languages before I turned 18 (remember this was back in the dark ages). In college I used FORTRAN quite a bit, PASCAL, and even did a bit of B (pre-C), LISP, COBOL, and a smattering of other things. Much of my professional career involved low level OS and driver type programming in assembler and C. Though I mixed in a variety of other languages along the way. Also, I became a bit of a database specialist later in my career and learned SQL pretty thoroughly. In the last few months I've circled back to the technical side and have learned some about C++11 and 14, HTML/CSS3/JavaScript, and now am working on Python. I have mixed feelings about what we should teach beginning programmers. We operate at much higher levels of abstraction than we did 40 years ago as professional programmers (duh). FORTRAN, COBOL, Algol, and C were just structured and readable ways of thinking like a computer. However, with modern OOP and generic programming (not to mention functional programming and almost universal implementation of lamdas in most modern languages), programming has moved even closer to mathematical type thinking. Which suits someone like me, but...... is it what we want to use to start out beginning programmers? Is the "tech gap" I keep reading about more about the difficulty of starting out with a programming language that requires a couple of 1200 page books to understand rather than Wirth's old thin (and complete) PASCAL book or the classic Kernigan and Ritchie? Those were tractable things you could get your arms around and learn in a semester or 2 quite thoroughly even as a relative beginner. I taught PASCAL back in the early 80's for a couple of years at a local JuCo. I saw people go from complete newbies to moderately competent programmers before my eyes. Not sure I could do the same justice in a semester class nowadays for Python, as an example. Certainly not with C++11/14. We've abstracted ourselves to a point now where people of average intelligence and mathematical ability would almost HAVE to struggle to program well in these new languages out of the gate. I guess, in simpler terms, I am saying "You kids get off my program language lawn!!!" :)

C/C++ specially for knowledge of memory management and data structure.

Assembly language. Preferably for some architecture other than Intel. Too many so-called software engineers seem to think a computer is intelligent. People need to know what is under the covers. They don't need to get good at assembly language programming, but need to understand it. Then they can be successful with a compiled language. C should be second, followed by any good object-oriented language. Python and Java are good. If you want to earn a living at programming, then learn the language that most used in your specialty.

no ruby, please! One first needs to learn how to program before being able to use ruby in a sane way. It's full of ruby advices to use dangerous features that make code unmaintainable.

Rexx, very easy to learn and runs on a variety of operating systems. http://t.co/zO6TNj5q4s

No functional language choices, really? Open Source has its roots in GNU which has been advising C for low level stuff and Scheme (or Lisp) for the rest, but we all know that right?

I don't count scripting languages as programming languages and how the hell is C++ below Python on any given day? WTH is even wrong with this site?

A much better examination: http://www.tiobe.com/index.php/content/paperinfo/tpci/index.html