TE
科技回声
首页24小时热榜最新最佳问答展示工作
GitHubTwitter
首页

科技回声

基于 Next.js 构建的科技新闻平台,提供全球科技新闻和讨论内容。

GitHubTwitter

首页

首页最新最佳问答展示工作

资源链接

HackerNews API原版 HackerNewsNext.js

© 2025 科技回声. 版权所有。

Learning JavaScript - my experience and advice

326 点作者 ibrahimcesar大约 12 年前

25 条评论

georgemcbay大约 12 年前
"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 未加载
shawndrost大约 12 年前
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 未加载
philipwalton大约 12 年前
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>
Alex3917大约 12 年前
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 未加载
pyvek大约 12 年前
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_watson大约 12 年前
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.
jurassic大约 12 年前
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 未加载
straws大约 12 年前
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>
nlh大约 12 年前
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 未加载
tantalor大约 12 年前
&#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.
andrus大约 12 年前
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 未加载
kybernetikos大约 12 年前
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.
akurilin大约 12 年前
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.
nickporter大约 12 年前
It's like people don't understand that JavaScript is a language. The browser is just giving you a JavaScript API.
gavinflud大约 12 年前
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 未加载
Millennium大约 12 年前
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.
fredyr大约 12 年前
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)
blacksqr大约 12 年前
The world would be a much better place if there were more straightforwardly helpful posts like this. +1,000,000 internets.
reyan大约 12 年前
Another book which I really liked is JavaScript Patterns by Stoyan Stefanov.
评论 #5436137 未加载
taurath大约 12 年前
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.
ryanSrich大约 12 年前
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.
pdm55大约 12 年前
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.
mtgx大约 12 年前
CodeCademy's course is very good, I thought.
Helianthus大约 12 年前
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 未加载
luketych大约 12 年前
I think the first spaced-learning algorithm was actually SuperMemo, developed by Piotr Wozniak. The rest just copy his algorithm.