Install Sonar Locally on OSX and Analyze a JavaScript Project

Sonar really shines with statically typed languages like Java and has some very useful analysis it can run for JavaScript projects: critical errors in syntax, code duplication, even test coverage. You can play with all these reports by installing Sonar locally. Thanks to Homebrew it’s not that hard.

Continue reading Install Sonar Locally on OSX and Analyze a JavaScript Project

Universal JavaScript

Presented to a small but packed room on “Isometric JavaScript.” Apparently I put a typo in my proposal and it made it all the way to presentation day.

It’s actually about isomorphic JavaScript. I like the name universal JavaScript even better.

For what it’s worth, here are the slides, and a link to the demo code at


Whole Root Challenge

Interviewed another candidate today.  A colleague used a challenge based on computing square roots.  It’s a very simple problem and still gives a quick feel for a candidate’s comfort with JavaScript and solving problems with code.

I’ve added it to the (tiny) suite of interview code challenges. See paper-code/whole-root. I hope you find this useful conducting interviews and preparing for interviews.

Here’s a copy of the challenge for your convenience: Continue reading Whole Root Challenge

JSCS lints and shines your JavaScript

If you use Sublime Text you may want to try the JSCS plugin for SublimeLinter. JSCS stands for JavaScript Code Style. What makes it even more useful than JSHint? With this plugin it will even fix small style errors for you!

Once you have the plugin working you’ll definitely want to  tailor the rules .jscsrc file.

One good gotcha: It ships with a lot of presets and has a lot of mirroring rule options. It might be tricky for you to override the preset.

For example, I opted for the Google preset and wanted to add the requireSpacesInAnonymousFunctionExpression rule. It wasn’t working until I realized the Google preset came with a mirroring option set: disallowSpacesInAnonymousFunctionExpression. I had to set that to null explicitly before my own settings would work.

Thank you to Addy Osmani for your post on the sublime plugin, and thank you to Josh at for mentioning it in your newsletter.