Winter 2013 Conferences

.

It is getting colder, it starts to feel like winter. Right when it will be warmer again slowly, it is time for me to give another round of tech talks. My first stop is Atlanta, for DevNexus 2014, February 24-25 (follow @devnexus to get all updates). It is not in California, so I expect a… Read more »

JavaScript Kinetic Scrolling: Part 2

.

In the second part of this series of JavaScript kinetic scrolling example, the inertial effect is implemented. This is done by tracking the movement while the user is still dragging the view and then automatically scroll the view until it stops at some point. The first part already covered the basic drag-and-scroll technique (if you… Read more »

JavaScript Insights

.

With my new partner-in-crime Ann Robson, we had a presentation JavaScript Insights at the most recent HTML5 Developer Conference in San Francisco. In this talk, we discussed several important JavaScript code quality tools. You might have seen my previous renditions of this theme (Fluent, Velocity, and a few others), yet those variants were quite jam-packed… Read more »

Sorting Networks using Higher-Order Functions of JavaScript Array

.

An implementation of a sorting algorithm usually uses one or more iterating loops in the form of for/while statement. With JavaScript and its powerful Array object, these loops can be avoided since Array’s higher-order functions are enough for iterating the array. One candidate for this technique is the implementation of sorting networks. Before we start,… Read more »

Code Coverage of QUnit Tests using Istanbul and Karma

.

QUnit, used by projects like jQuery and jQuery Mobile, is a rather popular JavaScript testing framework. For tests written using QUnit, how do we measure its code coverage? A possible solution which is quite easy to setup is to leverage the deadly combination of Karma and Istanbul. Just like our previous adventure with Jasmine code… Read more »

Searching using Array.prototype.reduce

.

Searching for a particular element in a JavaScript array is often carried out using a typical iteration. In some cases, forEach and some can be used as well. What is often overlooked is the potential use of Array.prototype.reduce to perform such an operation. ECMAScript 5.1 specification, in Section 15.4.4.21, describes the callback function to reduce… Read more »