Forethought, Preparation, and Victim Blaming

For the past year, Windows 7 and 8 have been demanding users to upgrade to Windows 10. For the past year, conservative users with a deep, well-paced mistrust of technology have been ignoring this request. Microsoft has had enough. It’s time to forcibly move things forward. It’s time to make computers great again. A close friend was noticeably perturbed when their Windows 7 PC was suddenly running Windows 10. As a terrible friend, I was unsympathetic.
Read more →

Things I want to do with Amazon Echo

My employer gave me an Amazon Echo for Christmas (said employer is pretty rad!). The Echo is basically a standalone version of Apple’s Siri. Of course, I promptly tried to get to do everything, with varying levels of success. My initial concern was privacy. I haven’t sniffed wifi traffic yet, but it doesn’t appear to be transmitting all noise in the room to Amazon at all times; it only activates when it hears it’s name.
Read more →

On Frugality and Debugging Mysterious Return Values

Geocoding is hard. Like, by all rights there’s no reason why it’s not a solved problem. But whenever some aspect of our Ruby on Rails code in production exhibits heisenbugs, it inevitably winds up being tied to geocoding somehow. I’m sure this is completely unrelated to our thriftiness and keen business tactics of paying as little as possible for geocoding services. But I digress! A weird error popped up the other day, presented here in abridged format.
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 →
© 2021 JamesGecko