Elm range syntax

I recently stumbled around for more than a few moments searching for a canonical way to generate a range of numbers in Elm. I finally found a working example by searching for “haskell range syntax”.

read more ›

Using cursors to simplify form element data binding

In React, the most often cited method of binding form elements to data is to pass the value along with an update function.

read more ›

Multiline arrow functions and Javascript's syntactic baggage

I recently learned two new things about Javascript. The first discovery makes me feel silly. Somehow I missed that there is a multiline form as well as the short, single line form.

read more ›

Why is Babel's module syntax transpilation so weird?

On of the stranger rough edges that comes with using ES6 (via Babel/Webpack) revolves around the way Babel transpiles the new module syntax. When you use a named import, Babel’s transpiled output seems almost designed to cause a bit of confusion, as it assigns the imported value to a local variable with a rather munged name.

read more ›

Simple Javascript rendering with template strings

For tiny projects, template strings can make simple things really easy, even without using libraries.

read more ›

Dynamic React animations

Did you know that you can dynamically change the transitionName of a React animation on the fly? This is more of a “hey look it works” thing then an actual revelation.

read more ›

React components are first class

React components have a surprisingly simple property which sets them apart from the equivalents in other frameworks. Rather then being specified by name in a string based template, they’re referenced as a value in Javascript.

read more ›

Abstraction in a nearly reasonable world

I like systems. I’m always fascinated by wonderfully designed systems which are as useful as they are beautiful. In my own work, I often feel a strong pull to “invent” an elegant and general “solution”. The result, more often then not, exhibits neither trait.

read more ›

Building consistent virtual machines with Packer and Vagrant

I’ve been using Vagrant to manage local development environments for a while, but there are subtle differences between the base Ubuntu Vagrant box and the Ubuntu Cloud Images I typically use in production. Since the base set of packages don’t match exactly, builds would occasionally fail on AWS after working fine locally. While I always caught these issues before they went live, the mismatch was annoying at best.

read more ›

Fetch() Doesn't Send Cookies By Default

Fetch is a lovely little api for making ajax requests. I’ve been using the github/fetch polyfill in lieu of full browser support, but with a recent chrome update all requests were being sent without cookies. At first it seemed to be a strangely obvious glitch in Chrome’s implementation, but the behavior turns out to be according to the spec.

read more ›

An Opinionated Webpack Tutorial

I’ve wasted a lot of time trying to sort out my javascript workflow, and Webpack has brought me very close to the smooth and drama free experience I’m been looking for. The documentation is a bit rough, so I posted a step by step Webpack tutorial based on what I’ve learned so far.

read more ›