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 »

Detecting JavaScript Libraries and Versions

.

In the spirit of making our web browsing activities more secure, often times we need to be aware of all the resources and assets being loaded by our important web sites (Internet banking, HR portal, and the likes). Fortunately, it is rather easy to programmatically inspect which JavaScript libraries are used by those sites. Using… Read more »

ECMAScript 6 and Proxy

.

Being able to intercept a certain operation to an object can be really useful, in particular during a troubleshooting session. With ECMAScript 6, this is possible via its new feature, proxy. Creating a proxy on a particular object allows a predefined handler to get notified when something happens. In the latest draft specification (Rev 15,… Read more »