iPod DRM: bad for consumers and for companies

slaniel | Uncategorized | Monday, July 31st, 2006

Great article by Cory Doctorow on how the iPod’s DRM — backed by the legal force of the Digital Millennium Copyright Act — harms consumers, and less obviously harms companies.

(Via Bruce Schneier, and included below the fold.)

(more…)

The Times endorses Ned Lamont

slaniel | Uncategorized | Sunday, July 30th, 2006

The Times has written a scathing and completely on-point denunciation of Joe Lieberman, while endorsing Ned Lamont. I include it below the fold.

(more…)

Roots of a power series

slaniel | Uncategorized | Sunday, July 30th, 2006

I throw this question out to The World: an nth-degree polynomial with complex coefficients has n roots in the complex plane; so then why doesn’t a power series have infinitely many roots?

E.g.: each of the partial sums

Pn(x) = 1 + x + x2/2 + x3/6 + … + xn/n!

has n roots — i.e., n complex values of x for which Pn(x) = 0. And yet we have

0 ≠ ex = limn→∞ Pn(x)

for any complex x.

Is there a simple explanation for this that I should realize?

JSTOR and university lovin’

slaniel | Uncategorized | Friday, July 28th, 2006

I know a fair number of people within universities, so I don’t know why this didn’t occur to me before: does anyone feel like giving me an account on his or her machine? Services like JSTOR and suchlike all use IP-address authentication, meaning that if I can just sign into a university-based machine and use w3m or lynx from there, I can get all the JSTOR I want.

So: who wants to be super-sweet and do this for me? ::bats eyelashes::

Javascript/Ajax books

slaniel | Uncategorized | Thursday, July 27th, 2006

If I wanted to learn Javascript, along with all the cool modern uses of it like Ajax, where should I go to read up on it?

SVG

slaniel | Uncategorized | Thursday, July 27th, 2006

Browsers rendering dynamic graphics. The Moveable/Resizeable XBL/SVG triangles and cubic splines one is kinda blowing my mind with its awesome.

P.S.: On a less dynamic level, I just learned today about GD, for generating graphics inside of scripts. It’s pretty cool.

Perl: “or” in assignment

slaniel | Uncategorized | Wednesday, July 26th, 2006

I’ve got a chunk of code that looks like so:

my $oldurl; if( ($oldurl = $tree->attr(’href’)) || ($oldurl = $tree->attr(’src’)) ) { doSomething(); } 

Which says: if $tree contains an href attribute, stick its value in $oldurl; if it can’t find an href, but it can find a src, use that.

I wonder if there’s any way to shorten this. It would be super-nice if we could do

if( my $oldurl = ($tree->attr(’href’) || $tree->attr(’src’) ) { doSomething(); } 

which would allow me to bring $oldurl inside the scope of the if statement, and would shorten the assignment a little bit. But I know this isn’t possible, at least until Perl 6 junctions come out. (And maybe not even then. The details of junctions won’t be clear to me until I can play with Perl 6.)

In the meantime, is there any way to shorten this assignment? How about a way to bring $oldurl inside the if statement’s scope? If I do

if( (my $oldurl = $tree->attr(’href’)) || (my $oldurl = $tree->attr(’src’)) ) { doSomething(); } 

it will fail, because that’s two declarations of $oldurl in the same scope. That’s why the topmost code chunk in this post puts the my $oldurl outside the if statement. If anyone knows how to move $oldurl into that scope, let me know.

Judge dismisses ACLU suit against AT&T

slaniel | Uncategorized | Wednesday, July 26th, 2006

See the Chicago Tribune and BusinessWeek.

Let’s hope they appeal, and that this eventually gets Supreme Court review. All legislative avenues here seem blocked, including the bill that would grant a select group of people standing.

Ze Frank on Condi’s mission

slaniel | Uncategorized | Tuesday, July 25th, 2006

It’s often said that only the Medium Lobster has the capacity to describe modern American (i.e., Republican) politics on the level which they so richly deserve. I think today’s Ze Frank show gives the Lobster a run for his money.

Speaking of Fafblog, it disappeared from my daily routine when I unsubscribed from a bunch of RSS feeds to help distract me less, but I see that it’s still getting the job done:

Giblets takes a few weeks away from the blog and the whole world goes insane! After four years of justly convicting Guantanamo prisoners of classified crimes before a fair and impartial kangaroo court of their peers, a power-mad Supreme Court has ruled that the military tribunals at Gitmo are “illegal” and that the president has to “obey the law.” Well this is just the kind of dangerous radicalism that leads to fascism and human rights! What are we going to do with these people, try them in actual courtrooms with lawyers, juries and “evidence”? That way lies madness - or worse, democracy! If we give our enemies actual rights they’ll turn the deadly power of our justice system against us, smuggling weaponized due process into American cities, crashing the Fifth Amendment into skyscrapers, setting off radiological writs of habeas corpus in Times Square!

Finished Age of Reform

slaniel | Age Of Reform, The | Tuesday, July 25th, 2006

Little placeholder note on Hofstadter’s Age of Reform. In brief, his idea seems to be that the Populist and Progressive movements were fundamentally conservative. The Populist movement was driven, Hofstadter says, by the petit bourgeois: lawyers, doctors, and other small-town royalty who were losing their status in an era of concentration and industrialization. The farmers whom the Populists so revered, he says, had long since become hard-headed businessmen as well as tillers of the land. The Progressive movement’s leading lights were politicians like Teddy Roosevelt; popular myth has labeled him a trustbuster, but Hofstadter notes that he never really stood against the trusts and that the Sherman Act was largely ceremonial. As for the muckraking journalists so commonly associated with that era, Hofstadter points out that many of them — like Ida Tarbell — were, if anything, accidental reformers. Tarbell in particular seems to have felt lifelong bitterness over the role in which she was cast.

Hofstadter has much good to say about the New Deal. Progressivism, he says, emerged during a time of relative stability and prosperity, when nearly everyone agreed on the basic goodness of the American economy; the New Deal, by contrast, had to contend with a deep fear that capitalism itself would end. Hence the New Deal was a program of intense, chaotic experimentation, as opposed to Progressivism’s largely ineffectual moralizing.

It’s a very intriguing book, but I wonder how many of his conclusions have stood up under forty years of scrutiny. I think there’s probably a better book on this era.

Cosma fait du guest blogging

slaniel | Uncategorized | Tuesday, July 25th, 2006

So there’s this one blogger, Cosma Shalizi, who writes remarkably well about most subjects I’m interested in and about a hundred that I didn’t know I was interested in but that it turns out I am interested in, because he wrote about them. Then there’s Crooked Timber, staffed by a bunch of really smart academics; along with Jack Balkin’s blog and dozens of others, they really demonstrate the potential of the web.

Now Cosma is guest-blogging at Crooked Timber, which is  . . .  which is some sort of awesome blog lovefest, is what it is.

My favorite bit of this collaboration so far (other than little chortle-worthy lines like ‘tomorrow or the day after I’ll get to the smoldering question of “Why Oh Why Can’t We Have Better Econophysics?”’) is one of the trackbacks:

Cosma Shalizi, qui tient d’excellents Notebooks et un blog en supplément, est en guest-blogging chez Crooked Timber. L’un de ses premiers billets évoque la nouvelle affaire de failed tenure blogger, avec le non-recrutement par l’université de Yale de l’historien Juan Cole, qui rédige Informed Comment.

Poor, poor Académie Française; you have quite vigorously lost to les failed tenure bloggers du monde.

I bought a thing

slaniel | Uncategorized | Monday, July 24th, 2006

Cover of J.G.A. Pocock's The Machiavellian Moment: Florentine Political Thought and the Atlantic Republican Tradition. Not a great cover, truth be told. So I reread the intro to Elkins and McKitrick’s The Age Of Federalism the other day; it’s quite remarkable on its own. Makes me want to reread the whole bidness; I’m sure I’ll get much more out of it this time ‘round than I did the first time. Somehow I didn’t notice last time — or didn’t remember — that one large portion of the intro discusses the British backdrop to the American Revolution, and how much of the political thought of the time focused on the notions of “virtue” and “corruption,” both of which had different meanings than the ones we use now. The British government had developed an elaborate money-lending apparatus in the Bank of England, which apparently came about because of Britain’s war with France and because of the former’s dire financial situation. (Don’t ask me for details; I know even less than my ordinary amount of jacksquat about this. I’ll learn soon.) The British government was centralizing, the monarchy was corrupt, and — here’s where The Age Of Federalism chimes in — Brits viewed all of this through a lens provided by Niccolò Machiavelli on the rise and eventual dissolution of all empires.

So when Alexander Hamilton and the Federalists proposed a central bank for the U.S., a move away from agrarian economic policies, and a strong central government with protection for minorities, Republicans and the public at large had all the conceptual armanent at hand to piss their pants. This looked like the British all over again. More to the point, it looked like a classic case of corruption and the decline of virtue, in particular senses that I don’t quite understand yet. The Republicans — in the person of Thomas Jefferson — exploited this fear of a reinstated monarchy and led the Revolution of 1800.

Apparently this whole school of thought starts with J.G.A. Pocock, in particular his book The Machiavellian Moment: Florentine Political Thought and the Atlantic Republican Tradition. It reaches its apotheosis, say Elkins and McKitrick, in Gordon Wood’s The Creation of the American Republic 1776-1787.

This excites me for a few reasons. First, I know that I need to read Machiavelli. Second, I know that I need to learn me some political philosophy in general. Third, I’ve long been looking for a way to get on philosophical speaking terms with my friend Josh; the intersection between history and philosophy seems like one good place to make that happen. Fourth, I’ve heard lots of good things about Gordon Wood.

All of which is a long buildup to the following: I bought Pocock’s book, and have Wood’s book on hold at the library. This is right and good.

P.S. (24 July 2006): What intrigues me about this in particular is the idea — described by Elkins and McKitrick — that Machiavelli had introduced concepts to Europe, without which certain kinds of political change were impossible. It makes me wonder a) how these sorts of precursors to revolution come about, b) what made Machiavelli able to recognize these concepts when his contemporaries could not, and c) what conceptual changes would help bring about the political changes that we desperately need in this country.

Actually, as for b), it’s probably the case that Machiavelli was just standing on the shoulders of giants. That’s how these things seem to work.

The Library of America

slaniel | Uncategorized | Monday, July 24th, 2006

Anyone who cares about book design should pick up any of the books in the Library of America series. They’re all exquisitely designed, and they’re true to their word when they say that the books are “a pleasure to hold.” I’m excited to start reading WHA-BAM and KA-CHOW, if only because they’re designed so well. (And also because they look endlessly interesting.)

“Book Blog”

slaniel | Uncategorized | Monday, July 24th, 2006

Sort of a bummer that if you google for book+blog, the first hit is for a site that seems pretty lame and hasn’t been updated in well over a month. Link two, by contrast, is the Bookslut, which is a severely cool blog run by a woman whom I have a nerd crush on, and by one of the funniest writers I’ve encountered. There seems to be no justice in this.

So I’ll start: if you want a book blog, the Bookslut is for you.

DBs and the predicate calculus

slaniel | Uncategorized | Saturday, July 22nd, 2006

A coworker told me yesterday, in response to my saying that I know squat-all about databases but have a decent math background, that if you know the first-order predicate calculus and a smattering of other bits of math, you can swallow databases whole, and that the actual specifics of databases are “the incidents and accidents of implementation.”

Anyone care to comment on the truth of that statement?

D.C. library memberships

slaniel | Uncategorized | Saturday, July 22nd, 2006

Looks like I can get borrowing privileges from the Georgetown library if I pay $200. I’m not sure if this is a one-time fee or an annual thing. As an annual fee that’s a bit rich for my blood (I don’t know if I’d save $200 on book purchases), but even if it’s once every other year it might be worthwhile.

Membership to GW’s library is just as pricey, but I may get less for it.

Or I could just take Adam Rosi-Kessel’s suggestion and buy from Amazon, then resell the books I don’t really care for.

The Age Of Reform

slaniel | Age Of Reform, The | Saturday, July 22nd, 2006

Quick note on Richard Hofstadter’s The Age Of Reform: it has much of the studied breeziness of Hofstadter’s later Anti-Intellectualism In American Life, but feels less complete. The breeziness in the latter is undergirded by immense research and restraint; if you spoke with Hofstadter about Anti-Intellectualism, he’d probably pour forth with a torrent of evidence that never made it into the book despite its merit. The Age Of Reform is less disciplined, less erudite, and advances less evidence, hence is less convincing. It’s certainly important as a guide to understanding the era of progressive and populist politics between the Bryan era and F.D.R., and it helps me to grasp the intricacies of an era about which I knew little. But it ultimately feels as though it has less staying power than Anti-Intellectualism. There’s probably a better book out there covering the details of the progressive era.

Note also that the later book (Anti-Intellectualism) seems to have picked up a branch or two from this one. Hofstadter only got deeper, it appears, into the pathologies of the American political process as his career advanced; it wouldn’t surprise me if his later work subsumed everything that preceded it.

(To read: “Richard Hofstadter’s the Age of Reform: A Reconsideration”, which I’ve cached.)

P.S.: Having now read “A Reconsideration,” I don’t have especially much to add, except that possibly Hofstadter’s view of American history is quite cynical — which anyone reading either Anti-Intellectualism or Age of Reform has to assume — and that writers coming after him don’t quite agree with his assumptions about the progressive era. Hofstadter fundamentally views much of American history through a dark lens of provincialism, whose roots he traced quite thoroughly, provocatively and convincingly in Anti-Intellectualism; he sees the McCarthy era as a logical endpoint of much that is central to the American mind. It’s an argument that I don’t see much to contest, though I’m also unfamiliar with the historical literature.

If Hofstadter is the pathbreaking, legendary historian that everyone seems to say he is, it must rest in no small part on the effortless grace of his writing. See, e.g., the quote with which Brinkley closes his “Reconsideration”:

When one considers American history as a whole, it is hard to think of any very long period in which it could be said that the country has been consistently well governed. And yet its political system is, on the whole, a resilient and well-seasoned one, and on the strength of its history one must assume that it can summon enough talent and good will to cope with its afflictions. To cope with them — but not, I think, to master them in any thoroughly decisive or admirable fashion. The nation seems to slouch onward into its ucnertain future like some huge inarticulate beast, too much attainted by wounds and ailments to be robust, but too strong and resourceful to succumb.

One has to wonder, taking Hofstadter’s synopsis at face value, whether any nation of the U.S.’s size or heterogeneity has managed to “master” its “afflictions.” Did Rome pull it off? How about Britain when it still had colonies? The sort of afflictions Hofstadter has in mind may include our capacity to live up to the creed of the Declaration of Independence, for instance, in which case I wonder whether there are many nations that have even sought the same ends. But if you narrow the scope of the inquiry that far, you’ll almost always have just one nation to look at.

A few contributors to Why The North Won The Civil War made the point that our rather romantic view of American history is in large part just historical accident. It’s an American instinct, perhaps, to view our history — and thereby all history — as one slow and halting upward movement through increasing liberalism. From this perspective, the Civil War could only have ended the way it did, with the end of slavery and the defeat of the Confederacy. It had to end that way, because slavery was a moral wrong, and moral wrong will always lose in the great American story.

Had the Confederacy won — had it either held off the Union advance or gone even further and (this is hard to imagine, because it probably was never in the Confederacy’s plans) captured the great cities of the North — we would be singing a different song. It’s hard to say what that song would be, but in any case: it wasn’t always inevitable that the nation would turn out the way it did. Nor was Lincoln always the rustic god that he’s since become.

The challenge for me is to try to read American history through something other than the rosy light of hindsight. At many crucial points, the upward movement that we perceive today could very well have been a downward slide. For that matter, the upward movement may actually be a downward slide when read through the eyes of those who lost.

Amazon sales

slaniel | Uncategorized | Saturday, July 22nd, 2006

I just put 21 of my books up for sale on Amazon. I feel like I’ve just gazed directly into the smirking face of capitalism and acceded to each of its perfectly reasonable and yet wholly evil demands.  . . .  All right, maybe it wasn’t so bad. But these couple columns scare me:

Prices of my items on sale at Amazon. Those that are the lowest available price for a book have a bright, happy blue check mark next to them. Those that aren't, merely show the lowest price of all such books.

How tempting it is to lower your own price so that you’re the cheapest. Then your book will be at the top of the list. And if you’re anything like me, you know that 9 times out of 10 you’ll click on the book with the lowest price, assuming the book’s in decent shape. Hence the race to the bottom. Hence the urge to price your book at one cent. Why do people bother selling their books that cheaply? Did they get free copies? Even then, you’re surely giving up more than a cent’s worth of labor on the way to the post office; you’ll need to buy more than a penny’s worth of food to make up for the energy you expended on the way.

And yet I gladly partake of this whole enterprise. I almost always buy the cheapest used books I can. And if there’s a book that I want whose used price is near to its list price, like The Machiavellian Moment, I wonder why the sellers didn’t move farther away from the list price. When the list price is over $25, the buyer gets free shipping, whereas buying it used will cost another $5.

Surely Amazon knows that its buyers are going through this series of steps in their heads. In fact Amazon has inordinately detailed microeconomic data about each of its users; it surely has reliable estimates of how much each of us would be willing to spend on any given book.

I am like putty in their horny corporate hands.

P.S.: Holy crap. One of my books sold within about 20 minutes. This is like crack.

The EFF gets a win

slaniel | Uncategorized | Saturday, July 22nd, 2006

A bright note for your Friday: the District Court for the Northern District of California has rejected the government’s motion to dismiss EFF’s lawsuit. EFF has filed a class-action lawsuit AT&T: Your World. Delivered. To The NSA.

on behalf of a nationwide class of AT&T customers  . . .  to stop illegal conduct and hold AT&T responsible for its illegal collaboration in the government’s domestic spying program, which has violated the law and damaged the fundamental freedoms of the American public. The lawsuit request an injunction and damages under the statute. The laws provide that the victims can receive damages of at least $21,000 for each affected person.

The government and AT&T both filed motions to dismiss, on the grounds that even adjudicating this lawsuit would violate the state-secrets privilege. The court rejected that motion (my cache).

We need to keep winning. Let’s cheer on EFF. Donate if you can.

P.S.: The Court wrote

The compromise between liberty and security remains a difficult one. But dismissing this case at the outset would sacrifice liberty for no apparent enhancement of security.

Could we stop with this liberty-versus-security trope? The Bill of Rights keeps us secure. When they talk about trading liberty versus security, what they normally mean is “the sort of security that the Executive Branch protects”. They ignore the security gains that increased liberty against the government brings you. This framing of the issue harms everyone.

Tied hashes in Perl

slaniel | Uncategorized | Saturday, July 22nd, 2006

I just found a cool thing in Perl. A while ago I asked how to manipulate a big map of key/value pairs without sucking up all my memory, and various people — such as the inestimable mrz (seriously, I tried to estimate him once, and I failed) — suggested that I save out to disk if need be. There’s no shame in doing so, said mrz.

So for a while I was doing a ghetto thing wherein I wrote out flat text files with tab-separated key-value pairs, then looked keys up with a linear scan over the lines of the file. That’s super-lame, because for one thing it means that each lookup is O(n). A hash table has O(1) lookups, and binary trees are O(log(n)), so I should be doing one of those.

Turns out that I should have looked to my old favorite, tie, specifically the NDBMFile module. All’z you do is

use NDBMFile; use Fcntl qw/OCREAT ORDWR ORDONLY/; tie( my %hash, ‘NDBMFile’, $filename, OCREAT|ORDWR, 0600 ) or die “Could not tie to $filename: $!”; 

then talk to %hash like you would any hash — e.g.,

$hash{key} = 'value'; 

I wondered how it would avoid sucking up all my memory, because I thought that maybe it was implemented as a hash in memory and another on disk. But no: I did

while(1) { $hash{$i} = $i**2; if( ++$i % 100000 == 0 ) { print “$i\n”; } } 

to see whether memory consumption tends to grow. Joy and rapture: it does not. Though it does seem to tax the hell out of my disk after a while, and adding to the database takes longer and longer. Does anyone know why that would be? Maybe the module doesn’t buffer writes at all, so it’s sending a constant stream of key/value writes to the disk? In that case I’d expect the hardware to be smart enough to buffer its writes. Not sure. If anyone knows, do tell.

I gather that dbm, nbdm and so forth are all rather old. Is there a standard modern solution for writing key-value pairs to disk in Perl?

P.S.: There are apparently five DBM modules in the standard Perl package: DBFile, GDBMFile, NDBMFile, ODBMFile and SDBMFile. Their manpages are all remarkably similar. Does anyone know what the differences between them are? I  . . .  all I want is fast lookups. Lookups will vastly outnumber writes, so if anyone can suggest the best DBM  . . .  that would be aces.

Next Page »

Bad Behavior has blocked 845 access attempts in the last 7 days.