I've been frustrated the lack of diffs in Karma with Mocha and Chai as the test and assertion backends. Turns out support for better diffs has been around for years. It just requires that a configuration option be set. The result is wonderful diffs that show's exactly what's missing or different.
Common advice in languages with exceptions is that exceptions are not for control flow. A rejected promise is not any different than a thrown exception: in both cases something when exceptionally wrong and must be dealt with. This week I was fighting with promises while building a slack app because I was attempting to use… Continue reading Promises are Not for Control Flow
One of the things I enjoy about ECMAScript modules is their ease on the eyes. They look good -- the same way Python's import statement can look nice. It's also nice to have to explicitly import the things necessary for a file/module to its work. Need the whole module? That's a choice that has to… Continue reading Beautiful Imports in NodeJS
One of the things I try to do when building applications is keep servers stateless. This makes those servers easy to throw away -- a piece of infrastructure failing (which it always will) is not a big deal with stateless servers. Just spin up a new one. When the requirement came down the pipeline to… Continue reading Building an Upload System Backed by S3 and Client-Side Uploads
Showing a user something like a progress bar during a file upload is handy and let's them know that stuff is working. Higher level abstractions like fetch don't really provide a look into how much of a request body has been sent, but good ol' XMLHttpRequest does. In order to monitor upload progress, attach an… Continue reading How to Monitor Client-Side Upload Progress (with XMLHttpRequest)
There are a lot of form libraries for react out there that promise the on true, right way to do things. Two years into my own ReactJS journey, and I've come to a few conclusions. Form State Does Not Belong in a Store Think of how your browser usually works, does it send form data… Continue reading Forms in ReactJS