Chrome dev tools deep dive : Elements


1. Search CTRL + F allows you to search for strings in the DOM but you can also search using CSS selectors and XPath expressions. 2. Color picker Ever wanted to figure out what colours exist on a web page? Or prefer some other colour format? Here comes the color picker: Shift click on the color … Continue reading Chrome dev tools deep dive : Elements

Why JavaScript ‘seems’ to get addition wrong


This post was actually motivated by Gary Bernhardt's very popular WAT talk. It aims to provide a deeper understanding of how JavaScript evaluates expressions and operations on primitives and object types.

How to watch variables in JavaScript


We all have to track variables;while debugging; generally the easier it is to monitor changes, the faster bugs can be detected and fixed. Web developer tools expose various methods for tracking changes in variable values. There are a couple of drawbacks e.g. non-uniform support across platforms) but again, half-bread is better than none :).

JS and Scheme, the similarities


The resemblance between JS and Scheme is not surprising considering that Scheme was one of the major influences for the JS language.

How to write a Promise/A+ compatible library


I decided to write Adehun after the series of promise posts. Adehun means 'Promise' in Yoruba, the language of my West African tribe. After a lot of rewrites, I can say Alhamdulillaah,  Adehun passes all the compliance tests of the promise/tests repo.

Manipulating lists with JavaScript Array methods


Lists of all sorts (e.g. grocery, to-do, grades etc) are a normal facet of our daily lives. Their ubiquitousness extends to software engineering as many programming tasks require manipulating lists. This post exposes new ways of doing popular list manipulation tasks in JavaScript and a little more too.

The Differences between jQuery Deferreds and the Promises/A+ spec


jQuery Deferreds are not promise/A+ compliant, read on to learn more and understand the differences between jQuery deferred and the promises A spec.

3 Ways to start using promises


Continuing from the previous post; lets dive into ways of using promises. First, some helper functions: 1. Pseudo-Observers This involves attaching several handlers to a single promise; all attached handlers are invoked once the promise resolves. I call this the 'pseudo-observer' pattern because each 'observer' gets invoked once (remember promises never leave their resolution state). This explains why promises can't … Continue reading 3 Ways to start using promises

Introduction to JavaScript Promises


A promise is a value that might not exist because the action needed to produce that value has not been carried out. Thus, after the expected action has run, the promise will have a value indicating the success or failure of the action.

Understanding Partial Application and Currying


In pure functional languages, functions are not 'invoked', rather a set of arguments is 'applied' to them. Now, if all the arguments are not passed in, then the function is being  'partially' applied. Partial application converts variadic functions (i.e. functions with multiple parameters) into functions of lesser arity by pre-specifying certain argument values.

Understanding Tail Recursion


The biggest advantage of using tail calls is that they allow you to do extensive operations without exceeding the call stack. This makes it possible to do a lot of work in constant space without running into out of memory exceptions; this happens because the frame for the currently executing function is re-used by the newly-executed function call.

Mastering JavaScript’s Function.prototype.bind and its applications


The bind function allows you to set the context with which a function will execute. It takes in a 'context' object and returns a new function which has its context set to the passed in object. T

Quirky Quirky JavaScript: Episode One


JavaScript is an awesome language however it exhibits some quirks; this posts examines some of these fine odd aspects of JS; dive in, you'll love it!

The Immediately Invoked Function Expression


The Immediately Invoked Function Expression (IIFE, pronounced iffy) is a named/anonymous function expression executed immediately after its declaration.

Defining JavaScript Functions


There are many ways to create functions in JavaScript; some styles are quite popular e.g. the function declaration and function expression while others are not.

Important JavaScript Concepts


Three Important JavaScript Concepts developers should know

Understanding JavaScript Functions


JavaScript is a functional programming language and it is essential to truly understand functions to achieve mastery of the language. In JavaScript, functions are pretty much at the same level as objects: you can assign functions to variables, access function properties, pass them in as parameters to other functions or invoke them using the function operator.

Programming Language Type Systems II


Strong/weak typing describes the ease of mixing variables of different types in expressions. Strong typing does not imply static typing just as weak typing does not mean dynamic typing. To put it simply, if a programming language tries to interpret an expression containing variables of varying types at runtime (e.g. adding an int to a … Continue reading Programming Language Type Systems II

A peek into JavaScript’s Array.prototype.map and jQuery.map


This post describes the difference between Array.prototype.map and jQuery's map implementations.

EmberJS vs Backbone


Although I have never tried out the Backbone framework, I had to review it some time ago when I had to select the JS framework to use. I wrote this last year so if anything has changed please let me know. EmberJS Strengths Allows developers to control the entire page at runtime and not just … Continue reading EmberJS vs Backbone

EmberJS: The Rant


So I started on EmberJS some time last year; after spending an inordinate amount of time trying to design a prototype with people located all across the world. Finally, after several dreary demanding iterations and lots of work, we finally agreed on an implementation. One of the dev members suggested using EmberJS or backbone. Based on his review, backbone … Continue reading EmberJS: The Rant

Asynchronous Module Definition (AMD)


AMD (No, not the chip maker) stands for Asynchronous Module Definition - a cool new way of loading scripts. AMD attempts to solve some of the limitations associated with the orthodox approach of loading scripts.

Static and Instance Methods in JavaScript


I thought I quite 'understood' inheritance in JavaScript until I got flummoxed while trying to test my understanding. The JS prototypical inheritance model is hugely different from the classical approaches of the languages I started out with; the only way to fix this that I know of is by writing code and after spending hours screaming at my console I finally saw the light Alhamdulilah.

Events in JavaScript


JavaScript events are created in response to user actions such as clicks, mouse moves or key presses; not all events are triggered by user actions though, some are automatic such as the onPageLoad event. JavaScript's event model allows developers to write event handlers which respond to these events and provide the interactivity we have come to … Continue reading Events in JavaScript

The language series: JavaScript


I was pretty much amazed to see a JavaScript library for Arduino last year; it's common knowledge that the language powers uncountable web sites, mobile applications and even Windows 8 apps, but Arduino? Mind-blowing. The ever-growing need for powerful web experiences propels the adoption and development of this remarkable language.  JavaScript was influenced by C (syntax), Java … Continue reading The language series: JavaScript