2013 Nexus 7 JavaScript Performance Quick Check

.

The second generation Nexus 7, revealed a few weeks ago, is a good refresh of this popular Android tablet. Beside the much improved display density (going to 323 ppi from 216 ppi), this All-New Nexus 7 also has a different SoC. If this tablet is used mainly for browsing the web, how does it perform… Read more »

Searching with Array.prototype.some

.

Iterating over an array to search for an item is a pretty common task. With JavaScript, Array.prototype.forEach is often the popular choice. In some cases however, Array.prototype.some can be a better fit for the job if there is no need to search the entire array once a condition is fulfilled. There are at least three… Read more »

JavaScript Kinetic Scrolling: Part 1

.

Flick list, with its momentum effect and elastic edge, becomes a common user-interface pattern since it was made popular by Apple iPhone a few years ago. Implementing this pattern using HTML and JavaScript seems to be a daunting task for many web developers. In this series, I will uncover the mystery of kinetic scrolling via… Read more »

Profile-Guided JavaScript Optimization

.

Profile-guided optimization (PGO) is a known compiler technique to produce an optimized code. The generated code is biased towards the common data set which will be fed to the code. It is definitely possible to apply the same technique to web applications written in JavaScript. Various compilers, from Microsoft Visual C++ to Intel Fortran, leverage… Read more »

Prime Numbers, Factorial, and Fibonacci Series with JavaScript Array

.

Instead of using loops, JavaScript Array object is quite powerful to create sequences. What about some more complex series and not just a list of consecutive numbers or letters? Fortunately, we still have other Array’s functions such filter, map, every, and reduce at our disposal. Those can be used to generate a list of prime… Read more »

Sequences using JavaScript Array

.

Generating a sequence is a common programming task. This is rather easy to achieve using a straightforward loop. With JavaScript however, there exists a more functional variant using the powerful Array object. This permits the generation of all kind of sequences, from A..Z to a list of prime numbers, without any loops at all. Supposed… Read more »