listic comments on What is the best programming language? - Less Wrong
You are viewing a comment permalink. View the original post to see all comments and the full post content.
You are viewing a comment permalink. View the original post to see all comments and the full post content.
Comments (98)
I would like to ask the commentators: what do you think about learning JavaScript as a "first" programming language? I would like to learn to use modern programming technologies and utilize best practices, but learn something quickly usable in the real world and applicable to web programming.
I was going to learn JavaScript for a while (but haven't got around to it) because:
But I have heard so much advice to learn Python lately that I am thinking: am I missing something and being difficult?
It looks like lsparrish has been around and tried learning different languages before, so did I: I was paid to program in C and Forth. But I am a real beginner actually.
JavaScript is fine as a first language. I consider it to be a better first language than the TRS-80 BASIC I started on.
JS has a powerful advantage as far as usefulness in that it comes with all the browsers already, so you're going to have to learn it for client side if you are doing web apps. My suggestion to newbies trying to find a quick 10-minute intro is coffeescript.
I'm still leaning towards Python and Haskell as things I should be learning for various reasons. (Python seems useful and career-friendly, and I already know enough to be dangerous. Haskell seems to teach a different kind of math/thinking, which is attractive long term even if I never use the language.)
However Javascript is pretty friendly, especially with CoffeeScript and NodeJS. It might actually be a better language for the web-entrepreneur track since the hottest apps will be optimized for the client side.
One thing I've noticed about the NodeJS community is they seem really good about removing trivial inconveniences. For example with Meteor I was able to get an example set up in about 30 seconds.
Javascript shares a problem with C++: it is hard to find non-crap documentation and tutorials that won't lead new coders subtly (or not so subtly) into bad habits that are hard to break later. With C++ or Javascript, the first few google results for any newbie question are likely to be pretty bad.
If you have access to a really good Javascript programmer who uses modern techniques and libraries (use of jQuery, prototype, coffescript and/or node.js are all good signs), and can get them to supply you with help or at least review the help you're gtting from others, then that's cool. If not, then stay away from JS until you're a good programmer and you have a direct practical need for it.
Personally, I would recommend learning Python first and then learning JS. Udacity has great free courses in Python. Python has fewer caveats than JS. And there is very little in Python style that will steer you wrong when learning JS.
Python has very nice tracebacks that help a ton with debugging. JavaScript doesn't come close. But yes, JavaScript is not a terrible choice for a first language.