Yearly Archives: 2012

Syntastic

I love writing with vim, but, for many valid reasons, some people are averse to it. I think the steep (–ish) learning curve has something to do with it, but I think some people really don’t want to give up their IDE. The thing is, vim isn’t just a text editor. You can extend it … (Continue reading →)


Mint

I just started using Mint to track statistics on my site. I’ve been using Google Analytics for a long time, and I will continue to do so, but it is definitely geared more towards sites trying to earn money. Mint seemed to offer a more streamlined and customizable interface for people who just want to … (Continue reading →)


The Handle Pattern

I’m not entirely sure if there’s a better name for this pattern that already exists, but I like “handle pattern” to describe this method of keeping track of and managing “subscriptions”. var subscriber = (function() { var _listeners = {}; var s = { // Listen to a channel and call a callback when that … (Continue reading →)


Don’t Commit FIXME or TODO

function getObject($id) { $object = null; // TODO Do we need to validate username? $objects = $this->db->retrieveForUsername($this->username); // FIXME Write `retrieveForIdAndUsername` instead of iterating here foreach ($objects as $o) { if ($o->id() == $id) { $object = $o; break; } } return $object; } This shouldn’t happen. I’m not talking about the comically bad code … (Continue reading →)


Microwave Ovens Suck

Really. My microwave helpfully makes the numbers 1 through 6 shortcuts for running for that number of minutes, on full power. When’s the last time you needed to microwave something for six whole minutes? Most of my microwaving involves re-heating leftovers or softening things like tortillas or butter. These things don’t take minutes; they take … (Continue reading →)