The problem is that you're asking the wrong question. If you want to "get into" programming you need to do roughly two things to start.
1. Find a reason to care. This can be a pet project,
a particular question, an application domain, a
partner or team you'd like to work with, the desire
to understand someone's work you admire, etc.
2. Learn how to think formally as a programmer. This
is sort of like learning how to code, but it's
different from learning any one language.
The point is that as you discover greater passion for something in (1) you'll discover greater need for (2). Simultaneously, as you improve (2) you'll become more sensitive to (1).The other point is that languages are dumb. There are lots of reasons to learn one or another, but by and large becoming an "X programmer" is a non-goal unless it is somehow required for (1). For instance, joining a team of Ruby programmers may require becoming a Ruby programmer yourself.
So, discarding the philosophy, what do I recommend?
Learn whatever language you can the most quickly. Then learn another. Python may already be installed on your computer, so you can get started quickly. The story is probably the same for C, Ruby, Java, and Perl. If you know how to launch web pages online then PHP is probably available.
Recognize that programming has a large comparative linguistics component. No single language will teach you (2) above, but solving many diverse problems in a single language might get you a lot of it. Studying many languages expands your familiarity with how to represent things and that can be a big boon to (2). Later on in your career, it's often very valuable to explore languages with vastly different background models and assumptions. Early on, I'm not convinced it's such a huge deal... so long as you don't get stuck with a single choice for too long.
And above all, have fun. CS/Programming/Software is a fascinating world for all kinds of reasons.
Also, call me sentimental but I learned C/C++ as my first language and would recommend it. I don't see a codeacademy class for that though, and it's not really perfect for web development.
If you find that codeacademy isn't working out, I've also personally used codeschool.com and had great experiences there.
When it clicked I remember thinking: "Oh, it's like save games for coding."
high school:
basic
6502 assembly
a little FORTRAN
a little pascal, but didn't understand it
mit: scheme (sicp omfg)
symbolics lisp
common lisp
clu
pdp-10 assembly
connection machine
a little C
a little more FORTRAN
grad school / 90's: a lot of C (system programming / unix kernel hacking)
Obj-C / NeXTStep (reappears later as OSX / iOS platform)
MIPS assembly (branch delay slots ftw)
x86 assembly (segment registers wtf)
ALPHA assembly
a little C++, but hated every minute of it
Visual Basic
dotcom years to present: Java
C#
SQL (Oracle, Sybase, MSSQL, DB2, MySQL, etc)
Python (scheme without parens!)
ETL platforms (visual programming environments for data manipulation)
PHP
Obj-C / iOS (oh hi, you're back)
Groovy / Grails
a little Ruby / Rails
I'm a little weird because I did a lot of Lisp early, and then became an OS hacker. Once you can find single-line errors in assembly code, everything else is easy.I learned a lot doing C and assembly; especially the importance of working clean, checking results, and being careful with pointers. Lisp teaches you how good the world can be; C and assembly teach you how to cope with how bad it really gets. However, I'm not sure I would recommend a new person to spend as much time on this since the world has moved to languages with garbage-collected heap storage.
I never cared for the functional languages (ML, etc), mostly because I found the functional programming zealots to be such insufferable bores.
If I were starting today, I would start with Java or Ruby, since they are modern OO languages with good deployment options. Once you know these, it's easier to "downgrade" to simpler languages like Python, PHP, and JS.
But the real takeaway is that you should learn them all.
+1 for introspection! (Or do programmers call that reflection?)
But I've repeatedly found myself wishing I'd gone with Ruby/Rails (it was basically a coin toss.) because I've ended up in an environment where everyone else is working in Ruby for their pet projects - and it would be great to be able to tap their knowledge.
So, have a look around, what are people you know using? It's probably really useful to choose something that your friends know (if any of them code), or that you know there's a decent support for in your area - but beyond that, it doesn't really matter. And Python's really nice.
I'm thinking about switching to Ruby (or at least learning enough I can join in.)
Pick up a copy of K&R [1], read enough to do a hello world and start playing.
[1] https://en.wikipedia.org/wiki/The_C_Programming_Language
I'd recommend Python as it's easy to setup on any platform, has a clean easy to read syntax (newbies don't need to worry about generators or decorators early on), has a REPL and has a ton of good free learning references [1].
The goal of learning to program shouldn't so much be about one language, but learn about the concepts of what variables, control structures, operators, and data structures. So that you can apply them in different languages, and be more flexible.
But: if you have something in mind you want to build, pick a language and environment that fits it. If you want to code on microcontrollers, python and ruby are not a good idea. Want to build a website? python or ruby + javascript are a great idea! Use something that people commonly use to solve such a problem.
Your first implementation will be bad in any case, regardless of language. You will laugh at it in a few years. Rebuild it after a whilse. But thats no problem: everyone of us went through this process.
If you want to start by creating web pages but eventually move to programming, learn HTML. Get really, really good at it - but without CSS. Then learn CSS, and learn how they work together, how they complement each other. Then add Javacript and DOM manipulation. You can do some very cool stuff, you'll learn a lot of logic along the way, make interesting mistakes, etc.
If you want to control a computer, get something that speaks Bourne shell (OSX, Linux, etc.) and get really, really good at defensive-minded shell scripting (by defensive-minded I mean always being alert for errors, always quoting variables, always checking return codes, etc.). You will learn a lot about how computers work, how they are structured, etc.
In both cases, you will also begin to feel the frustrations of working with these tools: Why doesn't this work, why is this so hard, etc., etc.
You could start with something more modern, more powerful, like Python or PHP or Ruby, but will you appreciate their power if you don't have a good understanding of the problems they were created to solve?
But that may not matter, if you want to build web apps using powerful modern frameworks. Where are coming from, where do you want to go?
There are many, many other ways to answer the question, depending on what it is you actually want to accomplish and how much you understand about how computers work.
Some people argue that starting with a functional language will make you a better object oriented programmer later on, while the reverse is less often true. If you believe in this, I would recommend Clojure from personal experience.
In my first programming courses at university, we used Lisp and ML. This was for learning the "art" of programming, i.e., learning to think like a programmer. Once you picked a course that was arguably more about the "craft", you were exposed to a language more native to the domain. As I choose to go towards front end related stuff, I was exposed to JavaScript and (at the time) ActionScript.
I ended up not working as a programmer; I'm UX designer. When I need to, I program most of my interactive prototypes in ClojureScript. Two years ago, that would have been JS, but I found that Clojure conforms to my thoughts rather than the other way around.
So, depending on where you are and where you are going, you might benefit from different advice, I think.
You'll hear people say that exposure to BASIC will rot your mind... But most of today's best programmers started out with BASIC simply because that's what you got when you started up a 1976-86 vintage microcomputer or played with MS-DOS. Clearly they were not permanently damaged by it.
The good thing about learning BASIC is that you won't be accidentally comparing your work to that of professional programmers. If you start with JavaScript, you'll be exposed to amazing JS tricks anywhere you look. Any Google search or "View Source" will show you stuff that you'll be struggling to understand. That can be very discouraging.
Here's a totally retro web-based BASIC environment:
There are of course much better modern BASICs around, e.g. Microsoft's Small Basic (http://en.wikipedia.org/wiki/Microsoft_Small_Basic).
If you had to learn a second language, the question has many great candidates for answers. Python, Ruby, Scala, or a more functional language. Maybe a rapid prototyping language. If you believe in mobile first, then Swift, or Objective-C, or Java. If you need to manipulate data then Python, R or Julia. If you believe that you should learn the "foundations" first (read: legacy language) you could go back to C. If you like the Microsoft ecosystem, C#. If you work with Excel (what a beautiful product) then VBA and so forth.
But if you want the first language, then I think the answer is simple: Javascript.
I think it is an ugly language, and I wish another language had become to dominant, but history is what it is. Its in the browser, and so it is everywhere. You have to work with it for the most interfaces anyway.
A little sooner, and I am sure this would start a mini flame war, but as it is, this comment is safely tucked down the chain.
1) you can program anywhere, 2) it has incredible libraries for multimedia and interaction which makes it fun, 3) you can share the results with one click to anyone 4) it is a highly marketable skill
a lot of other people are recommending python which is fine if you are into the command line and file IO. if you prefer the web, then JS is the way to go.
As actual advice, it depends on your goals. If you want to build websites, then you should start with Java Script and perhaps another language for the backend. If you want to understand computer systems on a fundamental level or hack the Linux kernel, then you should pick C. And if you want to see progress, pick Python. But it is not too important, since a large part of programming is language agnostic. So just pick one, and learn another when the pain becomes unbearable. ( Then return to the first one, once you realize your mistake.)
I'm on a similar path. I've been learning to code now for like 3 years, never really having the time. Now that I'm out of a job, I've got some free time and I've always had some web projects I wanted to work on. So even though I've been trying to learn python for the past 3 years, I've recently started following the reddit learnjavascript course that started last week [1]
I figured that with JS, I can learn Node.js and have some frontend and backend knowledge as well. Maybe someone much more knowledgeable than me can chime in on my approach?
[1]-http://www.reddit.com/r/learnjavascript/comments/2c5aue/lear...
And try to mix families -- each provides different insights. The first few might be something like:
1. One of Python or Ruby 2. JavaScript 3. One of Java or C# 4. Erlang 5. C/C++ 6. One of Haskell, Scala, F#, or OCaml (but I'd lean heavily toward Haskell)
(Also, if you are going to use relational databases, learn SQL -- yes, there are frameworks that abstract it largely away for you, but you really want to understand what's going on behind the scenes. But that doesn't need to be in among the first things, unless heavily RDBMS-dependent stuff is going to be an initial focus...)
Thank god you didn't recommend Perl or PHP.
shivers
Python->C->ASM will have a much larger chance of success than ASM->C->Python; there's a good reason why college programs don't start with assembly first.
Personally, I am a bottom up programmer. I started with C and I found it confusing and ended up really disliking programming (I was in an EE program). Then in a later term we used assembly and once I got that foundation, everything clicked. I suddenly realized why C was necessary and what it provided. High level languages were then built up from there.
Everyone is different. There won't be one path.
You could maybe do Python -> ASM -> C, but Python -> C -> ASM will probably be a waste of time because you won't actually get anything out of C until you've done ASM (and certainly not anything more than you'd have already gotten out of Python). I'm also not suggesting that he (or she) should spend months working in Assembly, but rather start with something simpler, play around with it a bit till you can do basic things like add a couple numbers and display them (things that in anything but assembly would take about 2 seconds), and get a feel for how at the most fundamental level a computer actually works. Once you understand the basics of what a computer really is, then when you move to C or Python you can actually understand what all those abstractions are doing for you. The law of leaky abstractions means sooner or later you're going to need to understand all of that anyway, and the sooner you do, the less time you waste and the firmer your understanding will be.
Personally I'd go with Python to learn the joy of programming, and then some C (or Rust) to understand which problems were lifted by the higher level language. Javascript is too useful in the Web to not learn it, and then go functional to open your mind. Well, it's a long road :-)
Plus I think JS is fun to use because of how fast you can see your work "come to life". JS is also in high demand.
" I tell my students, "the language in which you'll spend most of your working life hasn't been invented yet, so we can't teach it to you. Instead we have to give you the skills you need to learn new languages as they appear." "
With regards to your statement, "It all depends on how you learn JS": That could be said of any language. The fact that you learned the differences between JS and C is what helped you when you were beginning, not that you learned JavaScript instead of Java, Ruby, or Python.
If anything, programming languages are a long term investment and I think that learning a language that is in high demand isn't that bad of a decision, you could learn some obscure super expressive, highly functional, statically typed language, but there is large chance that you'll come in contact with javascript at one point in your career.
In terms of a first language, nearly anything is going to beat JS in terms of learning useful things from it. The fact that we're stuck with JS now and you're going to need to learn it at some point doesn't mean you should expose a newbie to something like that, it will take them years to fix the damage that would do, it's like starting them at net negative in programming knowledge.
It's like saying, I want to learn to drive: If you are going to be a trucker, that's going to mean something different from being a biker.
I'd recommend Python as a first language. It wasn't my first language, but it's general purpose enough that you can do a lot with it, and popular enough that you can interview/get work/meet other people who use it. Oh and it runs from the command line straight off, and you are going to want to learn a bit about the command line.
If you want to understand more low level concepts, you can never go wrong with C, and these days Rust is a good choice for that as well (though steep learning curve if you have no previous experience).
It's also high level enough that you won't waste time in minutia of just making something work.
Extremely low barrier to entry: you already have everything you need.
Results are immediate: you don't have to wait around for an app approval process to share your stuff.
It sucks: teaching a healthy respect for learning a language well and finding all of the pitfalls. Every language has them. Best not to start out assuming they don't.
Most people are in love with Python, Not everyone. You may or may not love it, So try experimenting and choose the one.
Codecademy is good place to learn syntax and language basics, but books are the best choice to improve your skills.
Never stop learning, Try some Open Source Project, You'll learn much more..
Have Fun, Good Luck
It's very easy to learn, at the same time a very good language to be capable of writing code. It's multi paradigm, so you can learn a lot of different things.
If you know how stuff is supposed to work, then you can tolerate a few setup quirks, but if you're just starting then it's important to not lose all your steam on configuring the development workflow before you get to a running Hello World.
Remember there is no one-language-solves-all-problems, you gotta pick the right tool for the job and you shouldn't be afraid to hop between those tools.