Velocity, Kinematics, and Cover Flow

.

Last week, one of my favorites conferences, Velocity Conference, took place in Santa Clara. Beside the joy of meeting old friends and making new acquaintances, Velocity was exciting for me due to its crazy amount of excellent materials to digested post-conference. In addition to that, this was also for the fourth time I gave a… Read more »

The Curious Case of JavaScript NaN

.

NaN, not a number, is a special type value used to denote an unrepresentable value. With JavaScript, NaN can cause some confusion, starting from its typeof and all to the way the comparison is handled. Several operations can lead to NaN as the result. Here are some examples (follow along on JSBin: jsbin.com/yulef): Math.sqrt(-2) Math.log(-1)… Read more »

Autodetect JavaScript TDD/BDD Library

.

A unique feature of Venus.js, a JavaScript test runner from LinkedIn, is that the test configuration can be in the form of source annotation. This is useful, e.g. to choose which test library (Mocha, Jasmine, QUnit) should be used to execute the tests. Now, wouldn’t it be fantastic if the test runner can deduce the… Read more »

JavaScript Unit Tests and Code Coverage Tracking using Venus.js

.

These days, having enough unit tests for a JavaScript-based web application/library is the bare minimum. Ideally, the code coverage of those tests is also monitored in a day-to-day development situation. Fortunately, this is easy to do with a modern test runner such as Venus.js. Named after the famous Venus flytrap, Venus.js was originated at LinkedIn… Read more »

Supersonic JavaScript

.

A few days ago, I gave a talk at the most recent Web Tech Talk meetup hosted by Samsung. The title is Supersonic JavaScript (forgive my little marketing stunt there) and the topic is on changing the way we think about optimizing JavaScript code. None of the tricks presented there will make your code break… Read more »

Tracking JavaScript Annotations

.

One of the interesting features of Esprima is to retrieve every comment inside a JavaScript source. Even better, each comment can be linked to the related syntax node. This is very helpful (like in the case of JSDoc) since any additional information regarding the program can be provided via the comment serving as a form… Read more »