November, 2008

Nov21

 

Gay marriage: the database engineering perspective. Perhaps at least 2% of California voters are DB engineers who voted against Proposition 8 so they wouldn’t have to solve this problem — and would change their minds now that Sam Hughes has done it for them. But I must admit that’s unlikely.

Nov17

 

CBS’s underlying problem… is the arbitrary and largely ineffectual nature of the fact-checking process employed by the mainstream media. I have written for perhaps a dozen major publications over the span of my career, and the one with the most thorough fact-checking process is by some margin Sports Illustrated. Although this is an indication of the respect with which SI accords its brand, it does not speak so well of the mainstream political media that you are more likely to see an unverified claim repeated on the evening news than you are to see in the pages of your favorite sports periodical.

Nate Silver

Nov16

 

PDoc: inline documentation for Prototype

As 2008 turns into 2009, it’s past time to dust off some dormant projects in the Prototype realm. I’ve been playing around with PDoc for the first time since April in an effort to get it ready for the next major Prototype release.
Wait  —  have I not talked about PDoc yet? How is that possible?
OK, here’s what you

Nov10

 

CSS Advanced Layout Module. I suppose this is a good spec, even though the syntax is a bit weird. But — Christ — can they please stop overloading the display property? It’s hard enough to use as it is.

Nov9

 

No Labs Love for Google Apps. This domain’s e-mail account is hosted by Google Apps — and I use Mail.app to read my e-mail — so the fact that GApps seems to be branched off from all the cool Gmail features is an annoyance for me, too. Good to hear that someone’s trying to fix it.

Nov8

 

From a recent episode of Get Your War On.

Accounts Payable
Look, man, if McCain is elected, I can guarantee you will never be bored. Because America’s going to be a dynamic, exciting country again!
Accounts Receivable
Because everything’s gonna be on fire.

Nov7

 

MasterCard, what are you thinking? How on earth will you reproduce this logo on a credit card, on a fax, on a standard-def television screen? Did you take this as valuable advice, rather than as the parody it so clearly was?

Nov5

 

Sean Tevis, the “xkcd” candidate for Kansas state representative, lost by 4%. Sucks. But, as he points out, he outperformed Obama in his own district, and outperformed Democrats in adjacent districts. I have a feeling he’s not done with politics just yet.

 

We didn’t see much of the Bradley effect last night, but now we might have to invent the “Stevens effect” — reluctance to admit to pollsters that you would vote for a convicted felon.

Brendan

Nov4

 

Auto-format Tweets

Used on my “About” page.

(function() {  
  var USERNAMES = /@([A-Za-z0-9_]*)\b/;
  var URLS      = /https?:\/\/([-\w\.]+)+(:\d+)?(\/([\w\/_\.]*(\?\S+)?)?)?/;
  
  function getInnerText(element) {
    element = $(element);
    return element.innerText && !window.opera ? element.innerText :
     element.innerHTML.stripScripts().unescapeHTML().replace(/[\n\r\s]+/g, ' ');
  }
  
  function linkifyTweet(li) {
    var html = li.innerHTML, text = getInnerText(li);

    text.scan(URLS, function(match) {
      html = html.sub(match[0], '<a href="#{0}">#{0}');
    });    
    html = html.gsub(USERNAMES, '<a href="http://twitter.com/#{1}/">#{0}');
    li.update(html);
  }
  
  function init() {
    $('twitter').select('li > span.tweet').each(linkifyTweet);
  }  

  document.observe('dom:loaded', init);  
})();

Painfully Obvious was built with WordPress, Prototype, Slicehost, and other accoutrements. Colophon →