Chrome dev tools deep dive : Sources


Deep dive into features of the Sources tool in Chrome

Chrome dev tools deep dive : Console


The console is one of favorite places. The REPL environment is a quick way to validate JavaScript expressions. However, there is a lot more it can do. Read on. 1. $0 - $4 selectors The last inspected element is always available in the console as $0. $1 points to the next most-recently element and so … Continue reading Chrome dev tools deep dive : Console

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.

SICP Section 3.3 – 3.5 : Found a bug in memq


1. Is memq broken? memq is an in-built list search function; it finds the first occurrence of a key in a list and returns a new list starting from that key. Now that you know what memq does, lets look at some weird behaviour Building on that foundation leads to the following conundrum memq tests whether the key exists in the … Continue reading SICP Section 3.3 – 3.5 : Found a bug in memq

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.

SICP Section 2.2: New ideas and thoughts about programming


5 things to learn from the SICP book

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.

How to add in programming languages


This is a tongue-in-cheek attempt to expose programming language expressiveness.

Understanding reduce with JavaScript Arrays


Programming involves manipulating collections of various things. Operations on collections include aggregating values, conversion into other formats and data replacement.

C# Const vs Readonly


This post explains the difference between the readonly and const keywords in C#, when and how to use them.

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!

Programming Paradigms: An Introduction


A programming paradigm is a way of programming, a style of solving problems and thinking about the domain. Languages directly or indirectly influence programming style; for example, Haskell is purely functional while Python allows a blend of OOP, functional and imperative programming.

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.