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 moreIn 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 moreIn technical interviews, it is common that the interviewer will throw in a question that tests your knowledge of higher-order functions and function-binding. If you are applying for a job as a JavaScript engineer, then you should expect an interview question in some similar form to the following: Write a…
read moreI like trees. All kinds of trees — concrete and abstract. Redwoods, Oaks, search trees, decision trees, fruit trees, DOM trees, Christmas trees, and more. They are powerful beyond common recognition. Oxygen, life, shelter, food, beauty, computational efficiency, and more are provided by trees when we interact with them in…
read moreWho: this post is for anyone looking to learn some of the foundations required for working with Node What: this post will show you how to create a simple resource server using vanilla Node and the Node http module How: the magic of a simple request handler, also known as…
read moreThe benefit of a pseudo-classical pattern in JS is that only one instance of each method is created regardless of how many instances of the object are created.
read moreThe Prototypal Class pattern is fundamental to JavaScript, especially object-oriented JavaScript. Though used infrequently by developers, this pattern underpins the syntactic sugar provided by the new keyword and the ES6+ class — thus, worth learning.
read moreOften referred to as a ‘mixin,’ this compositional style extends an instance to add shared functionality.
read moreThe Functional Class pattern, though simple and clear, suffers from its naïveté. Forced to create duplicate methods for every instance, and store significant closure state for each function on the instance, the memory overhead outweighs the clarity of this pattern.
read morerake gen:post TITLE="[INSERT TITLE]" [D] [FN] [TAGS] I couldn’t find a good plugin online for using a command to generate Jekyll post-files automatically date-stamped and stubbed with content/YAML front matter. So, I got some practice writing a simple Rake task. Here is an easy way to create a custom post…
read more