javascript

Helper Function .bindAll

Helper Function .bindAll 150 150 Clark

Like most JavaScripters, I often find myself needing to manually control the this-binding of a function on invocation. Event handlers and callback functions are often re-bound to a different context than the caller — meaning that if those event handlers or callbacks reference this, they might be referencing the wrong object.

read more

The Usual Utility Functions in 2kb, Unminified

The Usual Utility Functions in 2kb, Unminified 150 150 Clark

I have now been able to remove Underscore.js, Ramda, and Lodash from the dependencies of multiple projects, by using the following underramdash.js helpers. Note, this file is 2kb unminified and unzipped, whereas Underscore.js is 52kb unminified and unzipped…

read more

CoffeeScript Polyfill for Function.prototype.bind

CoffeeScript Polyfill for Function.prototype.bind 150 150 Clark

Recently, I needed to polyfill Function.prototype.bind to use with PhantomJS. The project I was working on was written in CoffeeScript, so I rewrote the MDN Function.prototype.bind JavaScript polyfill in CoffeeScript. To use the polyfill, just add the above snippet wherever needed.

read more

The Language of Knowledge Meets the Language of the Web

The Language of Knowledge Meets the Language of the Web 150 150 Clark

I am pleased to announce today’s release of the jKif Parser. SUO-KIF meet JavaScript — JavaScript meet SUO-KIF The jKif Parser facilitates the transmission and growth of formal knowledge by providing JavaScript access to the vast stores of open SUO-KIF ontologies and factbases. Available for Installation from NPM Read the…

read more

Getting Started with webpack

Getting Started with webpack 150 150 Clark

I work with a guy named, Raghu Kasturi. This talented buddy of mine shared a tutorial with us — getting started with webpack. We will learn about webpack, why we might use webpack, and finally, how to actually use it to enhance our work. The following knowledge-bombs and practical tutorial…

read more

Sudoku Solution Validator

Sudoku Solution Validator 1030 1030 Clark

Five months ago, I was asked to solve a problem with a pair — the challenge was to write a Sudoku solution validator. We were expected to take a two-dimensional array that represented a Sudoku board and determine whether or not the board was ‘solved’ based on the rules of…

read more

String Primitives and String Objects in JavaScript

String Primitives and String Objects in JavaScript 150 150 Clark

My friend and talented young Software Engineer, Paulo Diniz, wrote this guest post to explain the difference between String Primitives and String Objects in JavaScript, and what that might mean to a JavaScript programmer. The following is from Paulo… JavaScript String Primitives and String Objects By Paulo Diniz Throughout this…

read more

Variable Hoisting and Function Hoisting in JavaScript

Variable Hoisting and Function Hoisting in JavaScript 150 150 Clark

In JavaScript, both variables and functions are hoisted by the interpreter at runtime. However, variables and functions are not hoisted in the same way as each other.

read more

Variations on Asynchronous Map

Variations on Asynchronous Map 150 150 Clark

One of my favorite ‘toy problems,’ often asked in technical interviews during a ‘screening’ phase, is to implement an asynchronous mapping function. This problem can be tricky because it tests your knowledge of asynchronicity and your ability to use callback functions. This knowledge is considered necessary for a web-application engineer…

read more

Balanced Parentheses and a Stack

Balanced Parentheses and a Stack 512 381 Clark

In early-screening technical interviews, the Balanced Parentheses question is quite popular. It goes something like this: Write a balancedParens function that takes a string as input and returns a boolean — if the parentheses in the input string are ‘balanced’, then return true, else return false You are given the…

read more
  • 1
  • 2