Mini Review: SQL Hacks · 70 words posted 01/09/2007 12:42 PM
While writing a detailed review of SQL Hacks I noticed slashdot posted its review this morning so I’ll keep my notes brief.
SQL Hacks is one of the most useful guides to SQL I’ve read in years. My favorite hack is #80, “Play Six Degrees of Kevin Bacon.” If you already have a basic understanding of SQL and want to explore new ways to slice your data, check out this book.
* * *
Nicholas Lemann on Citizen Journalism · 612 words posted 08/03/2006 04:17 PM
Nicholas Lemann has posted Amateur Hour, a lengthy rebuttal of the idea that blogging can be equated with journalism. I don’t agree with everything he says, but the article is thoughtful and worth reading.
In a nutshell, Mr. Lemann argues that the phenomenon of “citizen journalism” is over-hyped (duh); and that real journalism may be distinguished from blogging in large part because “real” journalists have access to those in power and the resources to report stories of breadth and nuance for a duration exceeding self-funded bloggers. Finally Mr. Lemann claims that bloggers tend to narrowcast and can’t possibly reach across “the usual bounds of geography and class”; this last assertion is especially rich coming from The New Yorker, for gosh sakes.
Dismissing narrowcasting out of hand misses the point. Let’s look at a real life example: the dust-up between John Gruber of Daring Fireball and Brian Krebs of the Washington Post over an alleged WiFi security hole in MacBooks, with follow up here and here. Krebs’ reporting on the security issue sucks.
It’s not entirely his fault though: specific, thorough, and accurate technical reporting is hard to get right, and the difficulty is compounded by writing on a deadline for a general audience. But that’s the point: Mr. Gruber doesn’t have to make concessions to audience or calendar; his brand of writing—delightful, verbose, detailed, technically accurate, and occasionally tendentious—should shame most technical reporters in the mainstream media.
He’s not alone. Mr. Lemann offers a roster of pabulum: Barrista of Bloomfield Avenue, Backfence.com. This prose apparently won an award:
Among the many definitions of “hero” given in The American Heritage Dictionary is “A person noted for special achievement in a particular field.” Reston is a community of creative people, so it seems only right that our heroes should be paragons of creativity. Therefore, I’m nominating Reston musician and freelance writer, Ralph Lee Smith for the post of “Local Hero, Creative Category.”
Well.
If Mr. Lemann’s point is that most citizen journalism is written in a folksy style best consumed in rocking chairs by invalids, he’s probably right. But the same can be said for traditional media.
Here’s a better sample of real citizen journalism: Argentina on Two Steaks a Day, which compares favorably to any travel writing on Argentina the New York Times has published recently:
The classic beginner’s mistake in Argentina is to neglect the first steak of the day. You will be tempted to just peck at it or even skip it altogether, rationalizing that you need to save yourself for the much larger steak later that night. But this is a false economy, like refusing to drink water in the early parts of a marathon.
Mr. Lemann does have his finger on one vital point though: mainstream journalists have better access to the powerful than do citizen journalists. But that’s not the fault of the citizen journalist. When I caught Apple phoning home via iTunes earlier this year (and this was original reporting, not an opinion piece), Apple refused to respond to my queries and nearly shut the story down by asserting, anonymously, to a mainstream outlet that “Apple doesn’t do that.” (Apple eventually changed its behavior as a direct response to the story).
The New Yorker, or the Times, or The Atlantic, or any one of the innumerable arborescent pamphlets may yet produce the definitive debunking of citizen journalism and the value of blogging; Amateur Hour is not it.
~~~
Incidentally, Mr. Lemann is author an exceptional book on the African-American Diaspora: The Promised Land: The Great Black Migration and How it Changed America. You can buy it from Amazon to support this site. Citizen journalists gotta eat.
Comment [3]
* * *
Review: Baseball Hacks · 725 words posted 05/16/2006 10:52 AM
According to the NY Times, the internet arm of Major League Baseball has sued a St. Louis company operating commercial fantasy sports leagues:
[The] relationship between players and numbers, so often romanticized, is now being stripped to its skeleton in a lawsuit with considerably wider ramifications. While the dispute focuses on fantasy baseball—in which millions of fans compete against one another by assembling rosters of real-life major leaguers with the best statistics—a real legal question has arisen: Who owns that connection of name and number when it is used for such a commercial purpose?
Many onlookers have cast this issue as a tiff over batting averages—as if children were squabbling over the backs of baseball cards—but legal experts are saying it could affect the wider arena of celebrity rights, freedom of the press and even how the press is defined as the Internet age unfolds.
The dispute is between a company in St. Louis that operates fantasy sports leagues over the Internet and the Internet arm of Major League Baseball, which says that anyone using players’ names and performance statistics to operate a fantasy league commercially must purchase a license. The St. Louis company counters that it does not need a license because the players are public figures whose statistics are in the public domain.
However the case is settled, the outcome will affect only commercial use of sport statistics; NBA v. Motorola found that NBA statistics are facts and thus not subject to copyright law in the context of personal use.
That’s a relief: more than most sports, an appreciation of baseball requires understanding the numbers behind each play, and Joseph Adler has written Baseball Hacks, an exceptional guide for finding, graphing, and analyzing the stats at the heart of the game.
The very best hacks start with an intellectually curious author asking two questions: how does this black box work? And what technologies can I use to pry it open? Mr. Adler wanders across the various black boxes of baseball statistics and introduces the reader to an array of tools: Perl, MySQL, and best of all R, an open source language and environment for statistical computing. Most importantly, this book is fun, even for the casual fan (I am not a seamhead). Behind every hack one can clearly see Mr. Adler sharing the pleasure of discovery.
One of the simpler hacks is #35: Comparing Teams and Players with Lattices (available as a free PDF on the book’s samples page), which generates the density plot pictured at the top of this article, showing team batting averages from 2003. Here’s the code, in its entirety.
One of my favorite hacks is #51: Measure Pitching with DIPS:
In December 1999, baseball fan Voros McCracken came up with a new method of measuring pitching. McCracken started to wonder whether a pitcher could really do anything about balls in play; were outs from balls in play a function of a pitcher’s skill, the defense’s skill, or dumb luck? He set out to test this hypothesis and discovered (much to his surprise) that it wasn’t pitcher skill. He concluded that what happens after a ball is put in play depends on the defense. Only on walks, strikeouts, and home runs is the defense not involved.
Thus was DIPS (Defense Independent Pitching Stats) born. It’s amazing to consider that even though baseball has been around for more than 100 years, a student can still come up with a new way to crunch the numbers, and Mr. Adler shows you how to calculate DIPS for yourself using R. (For more on DIPS, see McCracken’s article in Baseball Prospectus or Moneyball by Michael Lewis.)
I have only two complaints about “Baseball Hacks”: first, the code has more unforced errors than I’d like to see and could have benefited from tighter tech editing. (Disclosure: I have tech edited numerous titles for O’Reilly and other publishers).
Second, and this is absolutely no fault of Mr. Adler’s, if you work and play on a Mac—as I do—you’ll need to fire up your Windows machine to run all of the hacks. It’s hard, if not impossible, to use RODBC on Mac, and while the book includes instructions for configuring the RMySQL package I couldn’t get them to work.
But the minor Mac annoyances in no way diminish the fun of working through this book.
Highly recommended.
~~~
Buy Baseball Hacks from Amazon.
* * *
Rising Tide: Katrina and the Flood of 1927 · 382 words posted 09/01/2005 10:38 AM
Today’s New York Times compared the destruction left in Katrina’s wake to the 1906 San Francisco Earthquake, but in terms of both the scope and nature of the disaster the Great Mississippi Flood of 1927 is the closer match.
John M. Barry writes about the Flood and its effects in Rising Tide: The Great Mississippi Flood of 1927 and How It Changed America. Then, as now, poor African-Americans bore the brunt of the flood’s punishment. According to Barry, the flood changed America in at least four notable ways:
- The Flood helped put Herbert Hoover in the White House. Hoover, who prior to the flood had been the Secretary of Commerce under Warren G. Harding and Calvin Coolidge, was appointed head of the relief effort. He was able to parlay his heightened popularity to win the Republican nomination for the Presidency in 1928, and from there took the White House.
- The Flood marked the split between the Republican Party and African-Americans. According to Barry, Hoover exploited the trust of African-American leaders during his tenure as head of the relief effort and abandoned that constituency once he became President.
- The Flood set the stage for the New Deal. Prior to the flood, there was no national consensus that large public works and employment programs should be funded by the Federal government. But the government’s massive reconstruction and employment programs in the wake of the flood set a precedent for Roosevelt’s vastly larger programs a decade later.
- Finally, the Flood prompted the African-American exodus from the agrarian South to the industrial North. This migration is best documented in Nicholas Lemann’s excellent The Promised Land.
Barry’s book is as relevant today as when it was published in 1997, even if it’s a discouraging read.
Some commentators on the left have been quick to assign blame to the Bush administration for under-funding levee improvements in 2004. Likewise, Republicans have decried any mention of politics while the floodwaters linger in New Orleans. While calling on Americans to “rise above politics” when responding to disaster may seem noble, such calls are ahistorical and utterly naive. If history is any guide, politicians will scramble for gain at the expense of disadvantaged constituent groups: primarily the poor urban African-Americans and rural whites who suffered the most from both Katrina and the Flood of 1927.
Some things never change.
Comment [4]
* * *
Review: The Best Software Writing I · 567 words posted 06/17/2005 12:02 PM
On the face of it, “reading about code” is akin to “listening to paint”: it doesn’t make sense, and it doesn’t sound like much fun. Too many software blogs amount to turgid ephemera; it’s hard to write something that’s both timely and timeless when Ajax is super-now and Flash is super-yesterday. Joel Spolsky understands this, and has carefully assembled The Best Software Writing I, an omnibus that truly lives up to its title.
[Full disclosure: I submitted an article for inclusion in this book; alas, it was not selected. Normally this would disqualify any self-respecting critic from reviewing the book in question. But hey, who’s writing my checks? Not you buck-o.]
Much of the writing is pithy, and some is laugh-out-loud funny. In Award for the Silliest User Interface, Leon Bambrick asks of Windows search:
- Why is a dog asking me questions?
- Who put the mescaline in the Microsoft kool aid?
- What if Google used this approach?
- Would Google Still be number one?
Bambrick then imagines a friendly Google search cow.
Mr. Spolsky has also weeded out the froth: whuffie is nowhere to be found in the index. Instead, many of the best pieces grok how the web works, or at least how it should work. Here’s Paul Ford on Processing Processing:
Looking at Processing, I find myself thinking: I wish the web worked like this. I don’t wish the web was a collection of little clickable graphics, but rather, I wish that people would take a step back and look at everything we’ve done and “elegantize” the Web as a construct, define a set of core goals that web developers want to solve and create as small as possible a language, based on the smallest possible set of principles, that will help them meet those goals. At this point in my life as a web developer, I don’t want tutorials on hacking my CSS so it looks good in IE5.2 for the Macintosh (I’m about to give up on that very thing, in fact, after dozens of hours); rather, I want an answer to the question “what is a link?” I don’t want someone to make it easier, another Dreamweaver or FrontPage, I want it to be elegant, like the computer language Scheme is elegant.
Other standouts include John Gruber’s The Location Field is the New Command Line and Michael’s Bean balanced The Pitfalls of Outsourcing Programmers. My favorite piece is Adam Bosworth’s exceptional ICSOC04 Talk on the tension between complex specs and the need for rapid user adoption.
It’s also a pleasure to read A Quick (and Hopefully Painless) Ride Through Ruby without any hyperventilating about Ruby on Rails.
The book isn’t perfect. If you already read about code you’ve probably previously encountered several of the essays. Eric Sink gets not one, not two, but three entries. His writing is fine, but when it’s freely available on the web the book could use more breadth and less depth. And do we really need another reminder of Cory Doctorow’s ubiquity?
Shortcomings aside, you could seek out most or all of these pieces on the web, but why would you want to? In The Best Software Writing I Mr. Spolsky, with the help of his readers, has assembled an outstanding collection of essays. A few of them are likely to be as relevant five years from now as they are today, and that’s saying something. Highly recommended.
* * *
Friday Books: Hypnerotomachia Poliphili · 723 words posted 10/08/2004 05:37 PM
Not long ago I had a dream. In my dream, I asked my wife her nickname and I saw the plaque to the left. In a dream tongue, I knew the word was pronounced “i-le-ya-la.” My wife explained this literally means “one pin drop,” as in “the sound of one pin dropping.” I took this to mean that she was graceful and subtle.
Dreams tend to share a set of common traits: at once vague and overly specific, their revelatory nature is often of interest only to the dreamer. Some dreams, however, endure and enter the popular culture. Perhaps the most famous literary dream is Samuel Taylor Coleridge’s Kubla Khan, fueled by a stomach ache and two grains of opium.
A damsel with a dulcimer
In a vision once I saw:
It was an Abyssinian maid,
And on her dulcimer she played,
Singing of Mount Abora.
Could I revive within me
Her symphony and song,
To such a deep delight ‘twould win me…
Richer, older, more obscure, and in every sense more dazzling than Kubla Khan, Francesco’s Colonna “Hypnerotomachia Poliphili” tells the story of a dreamer and his lost love. Published in 1499, the “Hypnerotomachia Poliphili” translates to “The Strife of Love in a Dream.” Here’s part of a plot synopsis from Nicolas Barker’s introduction to the Octavo edition:
Poliphilo [the protagonist] wanders into a magic landscape inhabited by nymphs and dragons, and liberally endowed with monuments, buildings, sculpture, and inscriptions. All this he explores, pondering the purpose and meaning of what he sees and those he meets. The country is ruled over by a queen who feasts him royally…
Finally he meets Polia again, whom he had first set out to seek, and they travel on together in Cupid’s boat, rowed by singing nymphs, till they reach Cythera, the island of Venus.
Here Polia takes up her story in the second part. She had taken refuge in a temple; approached by her lover, she turns him away, only for him to collapse, apparently lifeless, at her feet. Thinking him dead, she flees, only to be confronted by the awful punishments inflicted by Cupid on those who defy him. Instructed by a wise old woman, she returns to the temple and brings Poliphilo back to life. Evicted by the high priestess for embracing, they appeal to Venus. Poliphilo recites his story again, Polia plaits him a wreath of flowers, and again they embrace. Polia blushes—and disappears in the first light of dawn. “This was the point, o gentle readers, at which, alas, I awoke.” It has been a dream, and Poliphilo is left with his dreamlike memories, wishing that the sun had not risen to bring them to an end.
As befits a dream, scholars interpret “The Strife of Love” according to their own interests. Architects claim it as a major architectural masterpiece; feminists regard the work as an early assertion of female sexuality; and literary scholars see in its neologisms a precursor to James Joyce. The book’s abundant illustrations set it apart from contemporary picaresques: elephants and obelisks, nymphs and satyrs, queens and lovers; all grace its pages.
You can find “The Strife of Love” in several editions. Octavo Press has scanned an early edition of the book and sells it on CD-ROM. The excellent commentary by Nicolas Barker (cited above) and an architectural essay by Ian White easily justify the price of the CD. You can enlarge the images to several times their original size without any loss of clarity—close enough to see the ink bleed. (The images of Polia and the Horse of Misfortune on this page were taken from the Octavo edition). Octavo also includes images of an acrostic buried throughout the book’s chapters that provided an early clue to its authorship. Unfortunately, Octavo does not include an English translation with the original text. Even without the translation, this is my favorite edition.
Thames and Hudson also publishes an excellent English translation by Joscelyn Godwin. Edward Tufte has reviewed this edition favorably and apparently plans to make “The Strife of Love” the subject of a chapter in his next book.
Finally, MIT has made the entire text, with excellent supporting notes, available online for free. While the images are much lower resolution than those in the Octavo edition, MIT’s free site is a great introduction to “The Strife of Love.”
* * *
Review: Creating a Web Page with HTML, Visual QuickProject Guide · 349 words posted 10/07/2004 06:10 PM
When Elizabeth Castro’s Creating a Web Page with HTML, Visual QuickProject Guide showed up in my mail recently, I wasn’t immediately inclined to review it. What could I say about a slender introduction to writing HTML? Then I came across Jeffrey Zeldman’s favorable review from several weeks ago:
With simple language and clear illustrations, Castro teaches budding web producers the basics of HTML and CSS in the context of a simple, hands-on project.
This is not a book for the world’s Dunstan Orchards; it is strictly for beginners (but not for dummies). If friends, colleagues, or family members with a desire to learn web design basics and no prior experience ask how to begin, you can safely recommend this book to them.
So I decided to give the book a second look.
And what a look. Mr. Zeldman has already covered the book’s substance; I want to praise the book’s style (disclosure: I co-authored a Visual QuickStart Guide for the same publisher two years ago).
When you review computer books regularly, you see a lot of crap. Many, maybe most, computer books are lazily written, poorly edited rehashes of instruction manuals that aren’t worth the industry standard price of $40+. I don’t write about the bad books because it’s more fun to bring the good ones to your attention—but the stinkers are legion.
Hoping to be first to market, publishers often require their authors to write titles while software is in beta, thus ensuring that the book won’t reflect a mature understanding of the software and will likely have a lengthy errata. Even assuming an author tries to write something fresh, her work is still at the mercy of publishers who increasingly cut costs at the printers. In otherwise favorable reviews this year, I’ve complained about low contrast gray-scale printing in books that would have benefited from color.
So it’s an uncommon treat when everything comes together as it does in Creating a Web Page with HTML. Clear writing. Useful appendices. No typos. And color on every single page for only $12.99. Bravo!
Why can’t more computer books be this professional?
* * *
100 Years of Graham Greene · 228 words posted 10/02/2004 10:44 AM
Graham Greene, one of my favorite authors, was born 100 years ago today. The BBC has an excellent Centenary page with links to audio interviews.
Robert Girardi once called The Quiet American “a perfect novel.” I’m inclined to agree; it’s hard to believe that Greene wrote so presciently about the limits of the French colonial enterprise and the folly of American intervention in Southeast Asia fully ten years before the United States invaded Vietnam.
I’ve never been to Saigon, but I believe Mr. Greene captured the time and the place as well as anyone could have. Today, most street corners in the old quarter of Hanoi feature little kids hawking stacks of pirated copies: “Quiet American Mister! Quiet American!” Whether one reads it as a love story, a war adventure, or reportage, the Quiet American is one of the best short novels ever written.
He has fallen out of fashion these days: the left takes offense at his mid-century British sensibilities (shame on him for being a creature of his time), and biographers tell us he was a bore in his private life (as if that could have any bearing on how one reads his fiction). Fundamentally, though, Graham Greene had a keen eye for human frailty and a healthy suspicion of most of the isms that so plagued the 20th century.
Happy birthday, Mr. Greene, wherever you are.
* * *
Review: The Flash Anthology · 305 words posted 09/27/2004 06:17 PM
After two years and several paid projects, I still feel like a newcomer to the Flash community. It’s easy to forget that the Flash work I do—extending web applications with data-centric Flash littleware—is a small subset of the skills traditionally emphasized by Macromedia, especially prior to the introduction of MX 2004: animation, sound, and text effects. My first reaction when I see a cool effect is “how did they do that?”
The Flash Anthology: Cool Effects & Practical ActionScript, by Steven Grosvenor, fits the bill nicely. (Disclosure: two years ago I was one of the technical reviewers on a Lisa Lopuck title to which Mr. Grosvenor contributed). The Flash anthology is published in a “cookbook” format and divided into task based chapters covering the basics of Flash.
For example, the chapter on animation includes a tutorial on using random movement to create subtle effects. One of the book’s strongest chapters is “Video Effects,” which includes an incredible video wall tutorial, as well as a hand-rolled scrubber and strategies for isolating moving elements to reduce the overall size of a video clip.
Two minor complaints: first, some of the examples run slowly on my G3 iBook. Granted, my laptop isn’t a workhorse, but it’s only two years old. And second—as with so many other publishers recently—SitePoint has printed the book in relatively low contrast gray scale, but still charges $39.95. That’s a hard decision to defend in a book dedicated to visual effects. (I’ll devote a separate article next week to the printing decisions publishers are increasingly making).
Other than that, The Flash Anthology from sitepoint is a solid title, and worth a look, especially for Flash programmers who would like to extend their skills to animation and video. If you can code XML.sendAndLoad() in your sleep but fear the Timeline, this might be the title for you.
Comment [1]
* * *
Flex Review on Digital Web Magazine · 31 words posted 09/23/2004 01:13 PM
Digital Web Magazine has published my review of Flex and Flex Builder. The short version: Flex rocks, but Macromedia will have to overcome a mixed track record with server-related products. Link.
* * *


Finally he meets Polia again, whom he had first set out to seek, and they travel on together in Cupid’s boat, rowed by singing nymphs, till they reach Cythera, the island of Venus.