

Ask HN: Resources for advanced JS? - ahulak

Hey all, this is my first post the HN, but I was curious if any of you had some resources that would be useful to an individual hoping to learn some more advanced javascript.  I've already mastered the basics (control flow, loops, dom manipulation, etc) and use javascript and jquery quite a bit in my day job for prototyping and data transformations (etl sw w/ js scripting), but I often hear developers talking about the <i>right</i> way of doing things and I was curious as what some resources might be for a aspiring developer who doesn't have an engineering background.  I also have some experience with php, python, mysql so I am not completely technically illiterate but I still feel like there is a large jump that needs to be made before I would consider myself a full fledged developer.<p>Any advice or resources would be greatly appreciated.
======
recurser
'JavaScript: The Good Parts' by Douglas Crockford is a great place to
start[1].

    
    
        This authoritative book scrapes away these bad features
        to reveal a subset of JavaScript that's more reliable, 
        readable, and maintainable than the language as a 
        whole-a subset you can use to create truly extensible 
        and efficient code.
    

The other thing that has had a huge impact on my coding style is learning to
write tests for everything with Jasmine[2]. Forcing myself to write tests has
basically forced me into better design practices, since it's nigh-on
impossible to test javascript callback-spaghetti.

Doing a couple of backbone.js[3] tutorials may be a bit of an eye-opener too.

[1] <http://shop.oreilly.com/product/9780596517748.do>

[2] <http://pivotal.github.com/jasmine/>

[3] <http://backbonejs.org/>

~~~
ahulak
thank you, those all look great - looks like I have a busy weekend (or week)
ahead of me!

------
rodrigoavie
JavaScript: The Good Parts is definitely a good book for what you want. But
there are more:

* JavaScript Patterns by Stoyan Stefanov

* Learning JavaScript Design Patterns - Addy Osmani

* High Performance JavaScript - Nicholas Zakas

After you read these three books you might become apt to write great,
efficient JS code and know the underpinnings of the language, which IMO has a
particularly curious design and might make you confused sometimes.

P.S: Check out the WTFJS website for being introduced to some strange
behaviour of the language <http://wtfjs.com/>

Have a nice and busy week!

------
jfaucett
Grab a cup of coffee, and read the source of these libs till you know what's
going on:

underscore - <http://underscorejs.org/> backbone - <http://backbonejs.org/>
dojo - <http://dojotoolkit.org/>

They all have great comments in the dev versions and the code is very well
written IMO. If you really want to become an advanced js programmer I think
reading and understanding source code is basically the only way to go.

good luck :)

~~~
rodrigoavie
Yes and Backbone has its source annotated to make it easier for you to
understand the code <http://backbonejs.org/docs/backbone.html>

------
tgriesser
As recurser mentioned, backbone.js tutorials might be a good idea. I'd also
recommend reading the source of backbone.js to see how it works internally.
It's around 1500 lines of well written and fully commented javascript, and
will probably cover everything you're hoping to learn in a very concise and
practical way.

~~~
ahulak
thank you, I appreciate the input

------
koopajah
There was multiple discussions here on HN where you might find some answers.
The most recent I found being: <http://news.ycombinator.com/item?id=4673106>

------
rodrigoavie
For advanced performance testing and benchmarking you can use JSPerf
<http://jsperf.com/>

