Prototypal Inheritance

Last year I wrote a post called "How to impress me in an interview", and in it, I mentioned that I run across a lot of candidates (the vast majority, actually) who don't really understand how prototypes work. In a way, that's kind of an amazing testament to how flexible…

You’re Thinking About Frameworks the Wrong Way

I interviewed at a company late last year that was having a lot of trouble on the front end. Their apps were unmaintainable. Code quality was poor. Build processes were slow and messy. Nothing was really standardized. They knew they had a problem, and were looking for a senior engineer…

On Unit Testing

In the past few years, I’ve done kind of a 180° on unit tests. There are a lot of really easy ways to rationalize not testing your code, and I’m probably guilty of saying each of them at one point or another. “It takes too much time” “That’…

Recursion in JavaScript

I’m just gonna get this out of the way right up front, because people get really angry otherwise: Consider this post as a series of learning exercises. These examples are designed to make you think — and, if I’m doing it right, maybe expand your understanding of functional programming…

How I Built TinyMusic.js (part 2)

In yesterday’s post, I wrote about the Note class in TinyMusic, and covered some of the basic music theory behind it. Today, I’ll cover the Sequence class and discuss some Web Audio API basics like audio contexts, oscillators, and scheduling. If you didn’t read part 1, you…