Filtering versus conditional logic

One aspect of jQuery that I’ve really come to appreciate is its ability to apply filters to elements on a Web page. Let’s say, for example, that you want to disable all of the links on a Web page if the user has not yet logged in. In most server-side frameworks, this requires you to add conditional logic to every link on the page (or just use a different template entirely). In PHP, you’d have to do something like: ...

October 15, 2008

New York magazine interviews Nate Silver

New York magazine has an interview with Nate Silver of fivethirtyeight.com, this year’s go-to polling analysis site. I’ve been reading Nate’s baseball analysis for years and was thrilled to see that he was applying his analytic approach to political polling this year. The results have not been disappointing. This paragraph describes my general reaction when I found out who was running fivethirtyeight.com: Silver’s site now gets about 600,000 visits daily. And as more and more people started wondering who he was, in May, Silver decided to unmask himself. To most people, the fact that Poblano turned out to be a guy named Nate Silver meant nothing. But to anyone who follows baseball seriously, this was like finding out that a guy anonymously running a high-fashion Website turned out to be Howard Cosell. At his day job, Silver works for Baseball Prospectus, a loosely organized think tank that, in the last ten years, has revolutionized the interpretation of baseball stats. Furthermore, Silver himself invented a system called PECOTA, an algorithm for predicting future performance by baseball players and teams. (It stands for “player empirical comparison and optimization test algorithm,” but is named, with a wink, after the mediocre Kansas City Royals infielder Bill Pecota.) Baseball Prospectus has a reputation in sports-media circles for being unfailingly rigorous, occasionally arrogant, and almost always correct. ...

October 13, 2008

Evidence that we should not freak out, episode I

Paul Krugman has argued that bank recapitalization is the most logical response to the financial crisis, and in his column today he credits UK prime minister Gordon Brown for leading the world down that path. The Dow is up almost 600 points right now, so maybe the markets like that move.

October 13, 2008

One hand washes the other

Glenn Greenwald documents the cozy relationship between Republican hatchet man Tim Griffin and the Politico’s Jonathan Martin. I post this link not because it’s exceptional but because, I suspect, it is typical.

October 13, 2008

The "Sweden Plan" is upon us

Nouriel Roubini explains how the provision that enables the federal government to directly buy equity in banks came to be added to the bailout bill. (You have to register to read the full article.) The short description is that Democrats in Congress added the provision during the negotiations. Liberal economists like Brad DeLong argued in favor, and Tyler Cowen explained why the plan may not work in America. In general, these are the times when all of the economics bloggers earn their stripes. Apart from software development, I’d say that economics is perhaps the best covered topic in the blog world (celebrity gossip notwithstanding). There are brilliant bloggers representing just about every school of economic thought, and for the most part they engage with one another rationally and without malice. ...

October 11, 2008

Evidence that we should freak out, episode II

Here’s more confirmation that the inability or unwillingness of people to lend money to one another is what’s driving the ongoing bad news in the financial markets. It is essentially twice as expensive for IBM to borrow money this year than it was last year: IBM raised $4 billion today with the sale of 5 year, 10 year and 30 year bonds. I will relate the story of the bond in the 10 year sector. ...

October 10, 2008

Evidence that we should freak out, episode I

This is the first installment in a new series, “evidence that we should freak out.” I’ve even created a new “financial collapse” tag for future reference. Grain is piling up in Canadian ports because the sellers will not accept the lines of credit normally used by buyers to guarantee the purchase. FP Passport has the details.

October 10, 2008

Journalism 101

Here’s a great quote from John Walcott’s acceptance speech for the I. F. Stone Medal for Journalistic Independence. Walcott won the medal for the Knight-Ridder Washington bureau’s coverage of the push to invade Iraq. Of all the major media outlets, they were the only ones who got it right. Somehow, the idea has taken hold in Washington journalism that the value of a source is directly proportional to his or her rank, when in my experience the relationship is more often inverse. ...

October 9, 2008

Fact checking the copyright industry

Ars Technica has posted an investigative report looking into the numbers the copyright industry uses to justify the legislation it asks for to help fight piracy. An excerpt: By more conventional standards of empirical verification, however, the numbers fare less well. Try to follow the thread of citations to their source, and you encounter a fractal tangle of recursive reference that resembles nothing so much as the children’s game known, in less-PC times, as “Chinese whispers,” and these days more often called “Telephone.” Usually, the most respectable-sounding authority to cite for the numbers (the FBI for the dollar amount, Customs for the jobs figure) is also the most prevalent—but in each case, that authoritative “source” proves to be a mere waystation on a long and tortuous journey. So what is the secret origin of these ubiquitous statistics? What doomed planet’s desperate alien statisticians rocketed them to Kansas? Ars did its best to find the fountainhead. Here’s what we discovered. ...

October 8, 2008

Improving Google Mail Goggles

I think the world is crying out for a mashup of Google Mail Goggles and StupidFilter. Google Mail Goggles is an optional feature for Gmail that will present you with math problems to make sure you think before sending an email when you’re inebriated. StupidFilter analyzes text for “stupidity.” Wouldn’t it be great if Web browsers and email clients had a tool that could assess the stupidity of text to be posted and then present math problems scaled in difficulty to the degree of stupidity. Thoughtful comment on the status of a project at work? You get 2 + 2. Forwarding an email your crazy uncle sent you about Barack Obama being a Muslim? You get this. ...

October 8, 2008