Lint your Javascript with Rake
Then use this Rake task to lint your Javascripts in your Rails project. Can be used as a git pre-commit hook as well.
http://coffeesounds.com
Webdev, coffee drinker and all that
Andrea Giammarchi has created PyramiDOM a “Spectrum DOM Analyzer”. When I first saw it, and read “Spectrum” I thought I was looking at an old 48k video game, but in fact it is showing you info on the DOM:
The generated spectrum will contain every single nodeType 1 present in the document and will show via tooltip info about that node (nodeName, id if present, className if present). Moreover, it highlights somehow that node temporary changing the background (yellow one). The most wicked effect was in jQuery website itself, since it is dark, and since it is linear enough (you scroll and the spectrum is almost there where you scroll).
On the other hand, the most interesting spectrum was in Gmail, where you can spot a proper pyramid of nested divs. Each nodeName will have the same color, but for practical reasons each time this color will be different (random).
You can grab this PyramiDOM link to play.

Nicholas Zakas thinks he has the best way to load JavaScript.
Steve Souders has a bunch of best practices, and it seems that there is definitely nuance that makes advice very much tailored to your circumstance.
Nicholas though, has an opinion:
I’ve come to the conclusion that there’s just one best practice for loading JavaScript without blocking:
- Create two JavaScript files. The first contains just the code necessary to load JavaScript dynamically, the second contains everything else that’s necessary for the initial level of interactivity on the page.
- Include the first JavaScript file with a
<script>tag at the bottom of the page, just inside the</body>.- Create a second
<script>tag that calls the function to load the second JavaScript file and contains any additional initialization code.
A helper to make this happen could look like:
In related news, the LABjs folk have updated their API from this:
to the simpler:
I seem to remember that Steve had some opinions on this API too :)