JamesGecko


Questions I Ask About Mockups

2020-03-01
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

2015-06-09
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

2015-05-02
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

2015-02-16
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

2013-08-29
Read more →
© 2021 JamesGecko