I believe that you can't go really wrong with any of the languages offered at Codecademy. If you have to pick one I would suggest JavaScript. It's not uncommon for projects to involve another language + JavaScript, so the syntax knowledge should be useful for years.
I would have to disagree. It all depends on how you learn JS. I really liked the book JavaScript: The Definitive Guide 6th Ed. which at many points talked about the differences between JS and C. As someone who learned JS as a first language, I find the syntax is close enough to C and C-Like languages to make picking them up fairly easy, but I'm still a novice and while I know JS pretty well I've only dabbled in C, D, and Rust as lower level languages. I found these languages to be almost like "extended" JavaScript because I didn't have many issues reading simple functions, and that's why I think it's a good language to start on, you can learn how to actually read and understand code with C-like syntax which, for me, made understanding lower level C-like code seem a lot easier.
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.
Choosing any language because it's in high demand is a bad decision, see "Why SICP matters"[0].
" 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.
That is odd advice, the top programming languages currently used have been around for at least 19 years (python, ruby, javascript, php, java, c, objective c) and while there are new languages being developed I don't see languages like go, rust or swift pushing any of those languages out of the market.
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.
JS is a necessary evil. It's one of the worst languages in terms of design (beaten only by PHP and obscure languages no ones heard of). Learning it as your first language is going to gain you very little since almost none of that knowledge is translatable into other languages, and you're likely to have picked up a bunch of really bad habits from it. Further making matters worse is that there are tons of really really really really really bad JS code snippets floating around the internet, things that make professional programmers want to gouge their eyes out just looking at them, and for a newbie who doesn't know any better they're just as likely to assume that writing code like that is actually an acceptable thing to do.
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.
If you want to learn to program, and not to program for the web, then I'd say Javascript is a bad choice. Apart from his quirks, you can't really just learn Javascript: you would learn HTML and CSS with it, it's overwhelming (compared to other languages).
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 :-)
On Linux and Mac, any platform except .Net will work out of the box; so it doesn't affect your choice; but on Windows some platforms are easy to get a working dev environment and some cause a bit of pain.
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.
Slightly against the flow here: I chose Python (and Django) when I learned to code (and built our MVP for www.gmbl.io, still a few rough edges - plug, plug) Python's GREAT, no doubt, and Django is also very good.
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 agree, the opposite happened to me. I learned Ruby on Rails, but everybody around me was Python/Django, so inevitably I made the switch because friend knowledge makes it easier to pick up.
If you want to jump in and go, I highly recommend Ruby, though I will warn that Rails can be very imposing if you aren't familiar with web development already.
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).
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.
I think Swift is a better ground for the fundamentals of programming than many others... but there are many other reasons to not choose such a young language.
Mobile may be the future, but Swift is limited to one vendors mobile platform, while there are a ton of languages (C#, JS, Python, Ruby, even Haskell) that you can use for mobile that aren't limited to one vendor''s platform. Plus, "mobile" usually has a server component, and those other languages can also be used for the server end.
Where can you run python on Mobile? Also, yes of course it's one vendor. One vendor that also has the world's most profitable app store. OP asked for a language to get started with. In my personal experience, being able to see items move on screen is a lot more intriguing to beginners than doing some server specific tasks like building an API.
That assumes he has a Mac. Many people do not. I could say the same thing about Java and Android, and that dev environment at least runs on all platforms.
Swift is a poor choice because of it's instability (in terms of changes to syntax), and because you really need to be able to read Objective-C to work with the platform.
Pseudocode is a good start unless you already have a project in mind?
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.
Pseudocode is only good for theoretical algorithms as it does not provides immediate result, and can at most do the work of a Ti calculator. Learning a real language provides a lot more interest and satisfaction.
Exactly. Don't learn to write code, learn to program. Even BASIC or PHP will do; learn how to think about problems and how to bare different tools on it.
Whatever you choose, learn git along with it. It helps to answer the question, "This used to work, what did I do to break it?"
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.
Actually, I should have mentioned this in my own post. I can't emphasise the point about git enough. I didn't really get it at first so shied away. Version control is one of THE most important things you'll learn, for a whole variety of reasons.
When it clicked I remember thinking: "Oh, it's like save games for coding."
Pick JavaScript or Ruby. JS because you can go full stack and can move on from some client-side work to full stack pretty easily with node.js. Ruby because it had beautiful data structures and I'm not a fan of forced whitespacing.
It depends what your goal is. Do you want to learn to be a good programmer, or are you looking to, for example, make a website as soon as possible? Is your vision to eventually make apps? Do you want to learn the "art" of programming or the "craft" of programming? You'll end up learning both if you pursue it, but this may impact where you start out.
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.
For serious work, starting with something like Python is probably a good idea (as many people have suggested), but if your goal is to learn about programming, I'd actually suggest you start with assembly. Assembly is really tedious to do anything practical with, but as a way to understand some of the most fundamental concepts in programming it really can't be beat. Doing the equivalent of hello world, in assembly and really understanding exactly what each line of the program is doing will pretty much make you better than most newbie programmers right from the start. If you jump to C next, do a little bit more there, and then finally jump to something like Python (bonus credit for calling C code from Python and vice versa) you'll be well on your way to being a fairly well rounded programmer.
Definitely NO. Assembly is okay as a second or third language, but not as the first one.
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.
Speaking from personal experience, I tried to learn C first and could never understand pointers, then I studied assembly and that was a huge eye opener. I've had very good success teaching people programming starting with Assembly (well, starting with "This is a turing machine", but moving to assembly next), and it makes understanding something like C a lot simpler. The problem with C as a first language is that it's too low level to ignore details like memory management, but it's too high level to really understand how it all functions.
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.
In my experience, there are two kinds of programmers. Top down and bottom up. Top down programmers have good success going from high-level languages to low-level. Though, learning a low-level language for them is not really necessary. Bottom up programmers don't grasp many of the fundamentals of programming until they can build them from basic underlying concepts. Some bottom up programmers may never get to a higher level language and end up as systems programmers or embedded programmers, maxing out with C as a high level language.
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.
What do you want to achieve when you learn how to program? Mobile dev, web dev?
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?
Whichever language you choose, pick a project you want to do with it. I find that having a goal, even a silly or small one, presses me through some of the more frustrating parts of learning a language and the time commitment it brings.
I'd lean slightly toward recommending Python to beginners, but don't get stuck on whatever you learn first. Try to learn at least one new language a year till you have several under your belt -- and even then, its not a bad idea to continue to do that.
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...)
Call me old fashioned, but I'm going to suggest learning C. It's one of the smaller languages around so you'll be quickly able to get past the "learning the language syntax" stage and into the "learning to program" stage. It's also still one of the most widely used and supported languages out there. It's also closer to how computers actually work so you'll learn more of what is actually happening when the computer runs your code.
Pick up a copy of K&R [1], read enough to do a hello world and start playing.
I disagree. The C syntax is small and pretty easy to learn but the a learner will be stumped when it comes to installing the compiler, dealing with cryptic compiler errors, pointers and weak typing.
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 problem with C is that it fills a way smaller niche than, say, python or java. It's an amazing language, and I feel that every developer should know the basics about it, but OP is probably looking more for a practical language than C.
76 comments
[ 2.3 ms ] story [ 99.6 ms ] threadPlus 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.
[0] - http://www.eecs.berkeley.edu/~bh/sicp.html
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.
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 :-)
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.
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.)
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).
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.
http://tel.github.io/2014/07/26/types_of_data_in_swift/
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.
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."
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.
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.
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 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.
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
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].
[1] - http://learnpythonthehardway.org/book/