Questions I Ask About Mockups

There are many essential skills for the software developer who hopes to advance in the world. Let’s talk about two of them. The ability to ask good questions. The ability to estimate how complex something will be off the cuff. These skills combine when reviewing the specification for a brand new feature. A small group of engineers sit around a mockup as the product manager or designer explains what the feature does.
Read more →

An Inadvertent Caching Bug

Here’s some CoffeeScript I wrote in a fit of refactoring a few months ago. It’s an AngularJS factory that does geolocation and returns a promise. In the heat of some intense copy and pasting, I missed a super important detail. Can you see what it is? angular.module(‘app’) .factory "geolocation", ($q, $ionicPlatform, $cordovaGeolocation) -> geocode = $q (resolve, reject) -> console.log "hello!" # … return { get: -> return geocode } The detail reared it’s head when Ionic, the mobile framework we use, turned on caching by default in an update.
Read more →

You won’t believe the shocking truth about CoffeeScript’s named params

CoffeeScript has named parameters. You can read about how to use them at this lovely guide to writing readable CoffeeScript. Unfortunately, they’re slightly broken. method = (arg1, {foo, bar, baz}) -> console.log baz method('arg1', foo: 'foo', bar: 'bar', baz: 'baz') undefined Wait, what? Why does method print undefined? If you use named parameters, and you split them across a newline and indent, everything after the newline won’t be captured in the named params!
Read more →

Speeding up Selecta in Vim

I like using Selecta as a fuzzy file opener in Vim. It doesn’t do any caching, so I never have to remember to flush the cache after generating a migration in Rails. The downside is that if you work on a larger project, it can get kinda pokey. Selecta’s Vim functionality relies on find to populate the file list. If we tell find to ignore directories, it gets a lot faster.
Read more →

Fixing pip

Read more →