February 2012
1 post
1 tag
Namespace collisions in Ruby and Rails
In trying to test a model named Have using rspec, I ran into a problem because rspec defines its own Have class in Rspec::Matchers::Have. After much googling, it turns out that ::Have explicitly references the top-level namespace’s Have class, which is what I wanted in this case. Hopefully this saves someone an hour or two.
Feb 24th
November 2011
4 posts
Giving it Away: How Free Music Makes More Than... →
derekwebb: Music matters. It’s so integral and pervasive in our culture that it almost feels invisible. It’s even hard to imagine walking into almost any store without hearing music overhead. Culture provides a constant soundtrack to our lives. So it’s no wonder there’s so much discussion and debate…
Nov 30th
289 notes
What I Miss About Counter-Strike →
Nov 30th
Order isn't guaranteed in JavaScript object...
var o = {a: 1, b: 2, c: 3}; delete o.b; o.b = 4; for (k in o) { if (o.hasOwnProperty(k)) { console.log(k); } } Since the iteration is over a vanilla object, there is no guarantee for the order of the iteration. As a result, the output of the above code depends on the browser. Chrome prints “a b d c”, while IE prints “a b c d”. Neither is right or wrong. If...
Nov 25th
1 tag
Fun With JavaScript's Date
new Date(2011, 11, 14).getDate() # => 14 new Date("2011-11-14).getDate() # => 13 Huh? What’s going on here. While I don’t know for sure, my best guess is that the first form of the constructor simply assigns this.year, this.month, and this.day with the provided values. That’s why the return value is what you’d expect. The second form, however, seems to be parsing...
Nov 18th
October 2011
7 posts
Ellie Goulding - "Lights" →
Oct 14th
Oct 13th
164 notes
Oct 12th
1,064 notes
Oct 6th
Oct 6th
104 notes
coffee-roaster →
This is a simple tool I wrote to work with Coffeescript. It watches a directory or file for .coffee files with “#@compileTo outputFile” directives, and compiles those files when they change. Use it by running “coffee-roaster src/”.
Oct 5th
Two Months Of CoffeeScript
Working With CoffeeScript Since joining the Shopify team in early August, I have been working on Batman.js, a single-page app micro-framework written purely in CoffeeScript. I won’t go into too much detail about what CoffeeScript is, because I want to focus on what it allows me to do. Batman.js has received some flack for its use of CoffeeScript, and more than one tweet has asked why we...
Oct 5th
2 notes
September 2011
2 posts
Are Jobs Obsolete? →
The question we have to begin to ask ourselves is not how do we employ all the people who are rendered obsolete by technology, but how can we organize a society around something other than employment?
Sep 8th
Sitting is Killing You →
Sep 3rd
August 2011
5 posts
5 tags
Batman: Fighting crime and kicking apps →
thechangelog: Batman.js from Shopify is a extremely slick looking framework for building single page apps in Node.js. Batman lets you define observable events on your objects via the @event macro. class Gadget extends Batman.Object constructor: -> @usesLeft = 5 use: @event (times) -> return false unless (@usesLeft - times) >= 0 @usesLeft -= times You can then observe...
Aug 25th
19 notes
Aug 19th
Not Exactly A Running Start
The move to Ottawa is off to a false start. We arrived in the city on Sunday night and checked into a hotel. Monday was spent searching for apartments. Tuesday was my first day at Shopify. Wednesday was a sick day. Thursday was a groggy blur, and today is another sick day. Sending emails to excuse myself from work on two of my first four days is not exactly hitting the ground running. I hope to...
Aug 6th
Aug 6th
Aug 6th
Aug 1st
July 2011
8 posts
AirBnB Fiasco Summary
I’ve found myself eagerly following the the drama surrounding the AirBnB fiasco. The story seems to have it all: a brave heroine struggling against the odds, a start-up bound for success hitting its biggest hurdle yet, and the media circling overhead waiting for blood. Here’s a quick rundown of events so far: AirBnB host gets her place trashed by some asshole(s) and writes a blog...
Jul 30th
The Brilliance of Dwarf Fortress →
Tarn sees his work in stridently ethical terms. He calls games like Angry Birds or Bejeweled, which ensnare players in addictive loops of frustration and gratification under the pretense that skill is required to win, “abusive” — a common diagnosis among those who get hooked on the games, but a surprising one from a game designer, ostensibly charged with doing the hooking. “Many popular games...
Jul 22nd
Jul 12th
Jul 7th
Jul 6th
$22 Billion in Gold, Diamonds, Jewels Found In... →
“Truth is stranger than fiction.” - Mark Twain
Jul 6th
WatchWatch
Jul 2nd
Jul 1st
Reed Hastings' Netflix Culture Deck →
Reed Hastings calls out process-heavy cultures and values high-performance employees.
Jul 1st
June 2011
7 posts
dotjs is Greasemonkey the way it was meant to be →
Jun 29th
3 tags
A simple jQuery namespacing function →
Introducing the $.namespace function! It takes a string and gives you a global representing the namespace you want. For example, $.namespace("Causes.Earn.Dialog") => {Earn: {Dialog: {}}} This gets rid of crufty code like: if (!Causes) { Causes = {}; } if (!Causes.Earn) { Causes.Earn = {}; } Allowing you to simply call: $.namespace("Causes.Earn"); Causes.Earn = ... In case you’re...
Jun 23rd
3 notes
2 tags
Jun 23rd
Bufr Overflow: Please, make yourself... →
bufr: Here’s me at any given weekday around noon: I’m staring at some code usually written by some French guy back in 2003. After I curse the French, I refactor a chunk and restart my server, alt-tab over to my browser, immediately command-T and type ‘r-e’ until reddit.com appears in my omnibar, browse…
Jun 22nd
85 notes
tumblrbot asked: WHERE WOULD YOU MOST LIKE TO VISIT ON YOUR PLANET?
Jun 22nd
November 2009
3 posts
The best TV series of the ’00s | The A.V. Club →
Nov 16th
“SuperFreakonomics” and climate change →
Nov 10th
1 tag
Study: Feeling grumpy 'is good for you' →
Nov 4th
October 2009
20 posts
BBC: The map that changed the world →
Oct 28th
Pollution in China →
This makes me question whether any amount of “green” shit I do makes any difference whatsoever.
Oct 24th
Oct 23rd
Software Design Review →
Great article on the software planning process.
Oct 21st
jQuery Approach →
Oct 16th
Don't talk to cops →
A law professor and a police officer give a lecture about why you should never talk to the police.
Oct 16th
Good News on Wall Street Means… What Exactly? -... →
Oct 15th
Backslash: web creator Sir Tim Berners-Lee... →
“Sir Tim Berners-Lee, who wrote the code that transformed a private computer network into the web two decades ago, has finally come clean about the about the infuriating // that internet surfers have cursed so frequently.” Infuriating? Really?
Oct 14th
A Farewell to ORMs? →
Good discussion on ORMs.
Oct 12th
Small change: Does ‘microlending’ actually fight... →
“The picture that emerges is not of people climbing out of poverty through microenterprise, but people doing what they need to to get by,” says David Roodman, a microcredit expert at the Center for Global Development.
Oct 12th
Oct 12th
Oct 11th
“Get your swag back daddy, where your focus at?”
– Jay-Z - Kingdom Come
Oct 10th