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
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 :).
The resemblance between JS and Scheme is not surprising considering that Scheme was one of the major influences for the JS language.
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.
jQuery Deferreds are not promise/A+ compliant, read on to learn more and understand the differences between jQuery deferred and the promises A spec.
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
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.
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.
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.
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
The Immediately Invoked Function Expression (IIFE, pronounced iffy) is a named/anonymous function expression that is executed immediately after its declaration. It typically involves appending the function invocation operator '()' to the end of a function expression; this triggers its immediate invocation. Some background The IIFE used to be wrongly regarded as a Self Invoked Anonymous Function (SIAF) until Ben … Continue reading The Immediately Invoked Function Expression
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
This post describes the difference between Array.prototype.map and jQuery's map implementations.
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
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
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.