TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

Learning JavaScript - my experience and advice

326 pointsby ibrahimcesarabout 12 years ago

25 comments

georgemcbayabout 12 years ago
"JavaScript: The Good Parts" is a fantastic book, but anyone telling you to read it if you're coming at JavaScript as your first language is doing you a horrible disservice.<p>It is a fantastic book for learning to avoid being bitten by all of the stupidity in JavaScript if you're used to programming in sane languages, but it isn't a tutorial or "Learn to Program" book by any stretch of the imagination.<p>To be completely honest, I'm a bit horrified people are learning JavaScript as a first language at all. The language does indeed have its "Good Parts" and it is incredibly useful because of its ubiquity, but I just wonder how many young brains are going be hardwired to think some of the design choices (the way block scoping works/doesn't work, equality, lack of modules, etc, etc) in current JavaScript versions are normal, when in fact they are very unfortunate.
评论 #5435145 未加载
评论 #5435206 未加载
评论 #5434937 未加载
评论 #5434980 未加载
评论 #5435253 未加载
评论 #5435521 未加载
评论 #5436230 未加载
评论 #5435944 未加载
shawndrostabout 12 years ago
Javascript's secret weapon[1] -- especially for beginning programmers -- is its dev tools. If you learn JS' debugging toolkit early on, it will accelerate your learning in general. I recommend Code School's "Discover DevTools" course [2] for beginning devs, but I'm not aware of a high-quality introduction for experienced devs.<p>Shameless plug: I teach at a school for JS devs named Hack Reactor. If rewriting Underscore as a learning tool sounds like fun, you should apply. <a href="http://hackreactor.com" rel="nofollow">http://hackreactor.com</a><p>[1] until now. [2] Chapters 3-4. <a href="http://discover-devtools.codeschool.com/chapters/3" rel="nofollow">http://discover-devtools.codeschool.com/chapters/3</a>
评论 #5435620 未加载
评论 #5435856 未加载
评论 #5436520 未加载
philipwaltonabout 12 years ago
JavaScript has three main features that commonly trip up people from other languages. If you understand these three things, you'll be way ahead of the curve:<p>1) What `this` means in a function context <a href="https://developer.mozilla.org/en-US/docs/JavaScript/Reference/Operators/this" rel="nofollow">https://developer.mozilla.org/en-US/docs/JavaScript/Referenc...</a><p>2) The prototype chain and prototypal inheritance <a href="https://developer.mozilla.org/en-US/docs/JavaScript/Introduction_to_Object-Oriented_JavaScript" rel="nofollow">https://developer.mozilla.org/en-US/docs/JavaScript/Introduc...</a><p>3) Function closures and variable scoping <a href="https://developer.mozilla.org/en-US/docs/JavaScript/Guide/Closures" rel="nofollow">https://developer.mozilla.org/en-US/docs/JavaScript/Guide/Cl...</a>
Alex3917about 12 years ago
I definitely agree on JavaScript: The Good Parts -- it's quite possibly the single most over-rated book I've ever read.<p>There is literally a Stack Overflow thread devoted to just about every single code example and paragraph in the book, because no one has any idea what he's talking about. And even the JavaScript gurus on SO can't figure out what he's actually trying to say a good percentage of the time.<p>I'm sure it would be a great book if I were already pretty good at JavaScript, but as a first book it's just awful. I had much better luck with a HeadFirst book that covered JavaScript, even though that is a little too dumbed down at times. I was then able to then go back and have a much better appreciation of what Crockford was trying to say.
评论 #5436336 未加载
评论 #5439079 未加载
评论 #5436856 未加载
pyvekabout 12 years ago
Professional Javascript for Web Developers is really an excellent book. Also, I would like to mention a blog post [1] by Richard Bowell which was front-paged here recently who also recommends the same book.<p>I'm currently learning JavaScript and the thing that sucks is reading about IE incompatibility/workarounds on almost every other page of the book. Any advice on how should I handle it? Is it really necessary to keep in mind all those quirks or can I skip through those material right now and learn what works on most browsers?<p>[1] <a href="http://javascriptissexy.com/how-to-learn-javascript-properly/" rel="nofollow">http://javascriptissexy.com/how-to-learn-javascript-properly...</a>
评论 #5434901 未加载
评论 #5435565 未加载
评论 #5437182 未加载
评论 #5434817 未加载
mark_l_watsonabout 12 years ago
I tried doing a total immersion in JS recently by coding up small learning projects for Ember.js, Ember.js + Node.js, Node.js + Express, and some general experiments while reading "Secrets of the JavaScript Ninja" (I like this book, BTW).<p>All that said, I did a 90 minute sprint with Clojurescript tonight, and as awkward as it may seem to use an intermediate language, the development process is really nice. Whether I am modifying server side or client side code, the edit, try it cycle is very quick (a second or so). I have found that if I make little changes in one cycle, keep a browser JS console open with logging from client side code, and keep repls open for both the server side Clojure code and the client side Clojurescript code then I have a good window into both sides of a web app.<p>However, Node.js with either something like Express or (if you are brave) Ember.js is really nice also. I understand why people like Node.js.
jurassicabout 12 years ago
I wish somebody would write a post like this for Ruby. Trying to craft a personal study plan of the best, most current resources from the large number of apparently high-quality offerings is difficult for a newcomer to the language. I'm operating on the assumption that success is mostly path-independent (just start doing stuff and going through resources, and you'll learn), but it still feels like a random walk approach to learning sometimes.<p>I'd also like a list of critical tools for programmers new to the Ruby langauage. These things don't always get highlighted in beginner resources because of the need to hand-hold on fundamental concepts for people who've never programmed. For instance, I wish when I'd learned Python that somebody would have told me right at the beginning to install ipython, virtualenv, pip, etc.<p>Edit: Wow. Thanks, guys, for all the good recommendations.
评论 #5435546 未加载
评论 #5434926 未加载
评论 #5434799 未加载
评论 #5435224 未加载
评论 #5434995 未加载
评论 #5434870 未加载
strawsabout 12 years ago
Eloquent Javascript is absolutely the right starting point, I'm glad there's been a shift from recommending The Good Parts to that one.<p>It was linked here the other day, but Superhero JS is another great "what is the path to javascript mastery" lists:<p><a href="http://superherojs.com/" rel="nofollow">http://superherojs.com/</a>
nlhabout 12 years ago
Nobody has commented on the suggestion to aid learning with Spaced Repetition Software - specifically the Anki open source program.<p>Anybody try or use this technique? It looks interesting and sounds reasonable and effective. I took a peek at Anki but have to admit it looks messy (and the iOS app is $25, which is def. on the high end of the iOS pricing scale). I'd be curious to hear others' experience in this area...
评论 #5435765 未加载
评论 #5436912 未加载
评论 #5436687 未加载
评论 #5436264 未加载
评论 #5438332 未加载
评论 #5435937 未加载
评论 #5437576 未加载
评论 #5436195 未加载
评论 #5436499 未加载
评论 #5436136 未加载
评论 #5438081 未加载
tantalorabout 12 years ago
&#62; you'll love looking at the code to two very popular and powerful JavaScript projects: Underscore.js, Backbone.js<p>Is that a joke? I can't stand reading the source of those two libraries, even with the pretty two-column documentation. There have got to be better examples of readable JavaScript.
andrusabout 12 years ago
I'll second the author's recommendation of Effective JavaScript by David Herman. I've found it very helpful: <a href="http://effectivejs.com/" rel="nofollow">http://effectivejs.com/</a>
评论 #5435511 未加载
kybernetikosabout 12 years ago
I've recently made something that I hope to use to teach our new hires (who will all have programmed before, but probably not in javascript) the ins and outs.<p>It's called "New to JS" and is available on github at <a href="http://caplin.github.com/new2JS" rel="nofollow">http://caplin.github.com/new2JS</a> and the source is <a href="https://github.com/caplin/new2JS" rel="nofollow">https://github.com/caplin/new2JS</a>.<p>Keen to get any feedback / pull requests.
akurilinabout 12 years ago
I've had to learn JS pretty fast just a couple of months ago and from what I can read I managed to do almost exactly what Derek did, same exact books and all. Professional JS is indeed fantastic and is highly recommended. Same thing as far as reading Underscore and Backbone source.<p>For fun, try implementing something in Backbone. It's certainly one way of assessing if you're at all proficient in the language.
nickporterabout 12 years ago
It's like people don't understand that JavaScript is a language. The browser is just giving you a JavaScript API.
gavinfludabout 12 years ago
I read "JavaScript: The Good Parts" after having been using JavaScript for a couple of months and still found it overwhelming. Douglas Crockford moves through the topics at a very fast pace.<p>However, after a few more months of learning the language I went back to the book and was immediately thankful for how quickly he moved from topic to topic. I understood the references and was receiving quick tips on what to do and what to avoid doing with all the different elements that make up the language.<p>Also, I agree with the author, Professional JavaScript is the ultimate JavaScript book in my opinion.
评论 #5435055 未加载
Millenniumabout 12 years ago
TGP isn't a good book for learning JavaScript the first time, it's true.<p>The time to read it is when you've been doing this for a while, and it's time to "unlearn what you have learned" before you can move on to the next level of expertise. There's a lot of dogma in the book, but that's not bad in the appropriate context: most people will find something to follow in its pages, but most people will also find something to question. Both experiences are valuable, especially for someone preparing to "take the next step," as it were.
fredyrabout 12 years ago
This is really a good set of resources for learning Javascript. In addition I want to add the "Learning to love Javascript" presentation by Alex Russell from Google Code 2011, <a href="http://www.youtube.com/watch?v=seX7jYI96GE" rel="nofollow">http://www.youtube.com/watch?v=seX7jYI96GE</a> that I felt really boosted my learning curve (or at the very least kept me passionate about JS to continue learning as much as I possible could)
blacksqrabout 12 years ago
The world would be a much better place if there were more straightforwardly helpful posts like this. +1,000,000 internets.
reyanabout 12 years ago
Another book which I really liked is JavaScript Patterns by Stoyan Stefanov.
评论 #5436137 未加载
taurathabout 12 years ago
Thanks a lot for this post. As a relatively new web dev mostly working in jQuery (I get stuff to work right and be relatively fast, but thats about it), I've been very curious about where to go next.
ryanSrichabout 12 years ago
I tried a similar approach and kept going back to jQuery first. For some reason it was learning jQuery that aloud me to really understand Javascript.<p>I really like the way codeschool teachers their javascript track.
pdm55about 12 years ago
Wilton "Beginning Javascript" is the essential bits of JS.<p>Zakas "Prof JS for Web Developers" is comprehensive.<p>Strom "3D Game Programming for Kids: Create Interactive Worlds with Javascript" teaches JS by creating games.
mtgxabout 12 years ago
CodeCademy's course is very good, I thought.
Helianthusabout 12 years ago
The attached Learn Backbone.js Completely article is also very good.<p>Angular has _huge_ obstacles for dev usability when Backbone's source is so accessible you can use it to help learn js.
评论 #5436664 未加载
评论 #5434909 未加载
luketychabout 12 years ago
I think the first spaced-learning algorithm was actually SuperMemo, developed by Piotr Wozniak. The rest just copy his algorithm.