Friday, October 20, 2006

Friday cat blogging

Warning: ...ah, hell, if you can't guess from the title, your time deserves to be wasted.

A nervous but resilient feline. The SF SPCA got him from San Francisco City Animal Care & Control; who knows where he was before that, although his behavior indicates that he once had an attentive human home. The SPCA's veterinary records state that upon arriving at the SPCA, he suffered from extreme fear-related anorexia, leading to liver disease, and he had to be placed on a feeding tube. A few weeks later he was up and about again, fully recovered. When I found him at Maddies Adoption Center a couple of months later, Manny climbed onto my lap.

Peace never lasts. My nefarious plan for feline adoption necessarily entailed having an SPCA volunteer pack his yowling, hissing, miserable ass into a cardboard box. Evidently not one to take mistreatment lying down, he clawed his way out of the box during the ride home.

He spent the rest of the ride climbing around the car in panic, hyperventilating and hissing. At this point, Bay Area readers should imagine the drive from the Inner Mission to just north of Japantown, and the jostling it implies.

Cat adoption guidelines tell you to have a quiet, isolated room prepared with cat necessities. They're not kidding around. I set him down in the bathroom, and for the rest of the day he stayed there, retreating under the sink or behind the toilet whenever the door opened. My chief bonding tactic was to lie down on the bathroom floor and take naps. Sleep evidently rendered me sufficiently harmless that he was willing to come over and sniff at me periodically. (Maybe I should try this with women.)

Anyway, eliding some details, a dozen days later and he's out and about, accepting my food and affection. Unexpected noises or fast movements continue to make him flighty. Still, the mongrel cat has come home.

[Manny in the sun]

Wednesday, October 18, 2006

Rotating background colors (Wednesday Emacs blogging)

Like every veteran Emacs user, I've long used multiple buffers, multiple windows in a buffer (C-x 2) and multiple frames (C-x 5 2) to edit multiple files simultaneously during heavy sessions of programming or writing. Lately I've been working on a monitor so vast, and reading so many different files simultaneously, that I've found it useful to run multiple instances of Emacs as well. (Among other things, this speeds up tab-completion when switching buffers with C-x b, because each instance has shorter buffer list.).

When running multiple Emacs instances, it gets hard to tell which frame corresponds to which running instance of Emacs. The following Elisp code enables rotation among a set of background colors on a keystroke:

(defvar background-color-rotation
  '("aliceblue" "thistle" "lemonchiffon" "khaki" "papayawhip"
    "honeydew" "mistyrose" "paleturquoise")
  "List of background color names to rotate")
(defun next-background-color ()
  "Rotates among colors in background-color-rotation."
  (set-variable 'background-color-rotation
                (append (cdr background-color-rotation)
                        (list (car background-color-rotation))))
  (car background-color-rotation))
(define-key global-map [f10]
  (lambda ()
    (interactive)
    (set-face-background 'default (next-background-color))))

Paste this into your startup file for recent FSF Emacs (.emacs) or XEmacs (.xemacs/init.el). As always you can also try it out quickly by pasting into your *scratch* buffer and using C-j to evaluate the defvar, the defun, and define-key expressions in turn. Once the above has been evaluated, hit F10 to rotate among the named background colors.

The code's pretty trivial, so if you know Elisp --- or even if you don't --- it should be relatively straightforward to customize it for different colors, or a different keystroke. To list all the color names your display supports, use M-x list-colors-display.

I considered making the macro save the background color rotation between Emacs invocations, so that each new instance would automatically come up with a different background color. It wouldn't be too hard to do this, but I decided it didn't fit the way I work. I like to have a particular color correspond to a particular task --- "aliceblue" for general hacking (the first Emacs I open when I login), "thistle" for writing notes to myself, etc. --- so I prefer to do the rotation manually.

Incidentally, note the use of string arguments to defvar and defun to document the function and variable. Some Python advocates tout Python's "innovative" and "unique" use of string literals in class and function bodies for documentation comments. I agree that it's a clever idea, but it predates Python by several decades. There's a reason that Emacs is called the "extensible, self-documenting display editor".

P.S. The title of this post declares my intention to post a random section from my Emacs init.el files every week until I run out of things to describe. My startup Elisp has been on the web for ages, but I think that having a well-titled blog post for individual tweaks will make better Google-food, and will therefore be more useful to the world.

Tuesday, October 17, 2006

Two TLF quickies: social organization; prisons

One:

Tim Lee, who is rapidly proving himself one of the most unconventional (and hence interesting) libertarian bloggers, writes about markets, firms, and governments:

The central insight of [Yochai Benkler's paper] Coase's Penguin was that peer production is a form of economic organization on par with the market (first explained by Adam Smith) and the firm (first explained by Ronald Coase). Benkler expands on this tripartite classification of organizational structures in The Wealth of Networks. He spends quite a lot of time pointing out that non-market, non-firm methods of social organization account for a substantial fraction of our economic lives. We carpool, have dinner parties, give directions to strangers, help each other move, etc. These activities generate goods and services (meals, rides to work, information) that could also have been obtained via the market, but for a variety of reasons we sometimes find that non-market organizational methods meet our needs better.

I think this is a point that libertarians tend to under-appreciate. . . .

The whole post is worth reading (some decent comments too), but I want to focus on one particular part:

Progressives often think the state can convert market forms of organization into non-market, non-firm, social organization. But they're wrong. When the state gets involved, it almost always imposes a centralized, bureaucratic structure--a "firm" form of organization, in Benkler's parlance. A lot of progressive may laud the potential of public schools to create communities, but in practice, the public school system is every bit as soulless and alienating as the largest corporations. Folks on the left should hate the New York public school bureaucracy for all the same reasons they hate Wal-Mart.

This is true to a first approximation. However, I think it lumps too many kinds of "firm" together. For example, the National Science Foundation's formally a government agency, and it operates like a hierarchical "firm" in the sense that you can pull out an organizational chart and say Alice reports to Bob, who reports to Carol, who reports to Dave, etc. In another sense, however, the NSF is more highly decentralized than almost any "firm" operating in the actual market: essentially all of the NSF's "product" (i.e., scientific research) gets outsourced to universities, and a large fraction of that goes directly to individual researchers [0]. Even the job of choosing which research grants get funded is outsourced: grant proposals are reviewed for funding by committees of independent scientists.

So is the NSF truly a "firm"? Is it a "market"? A "commons"? It's hard to say. If you want to break it down, you might call it a firm (the NSF agency bureaucracy) that uses a commons/reputation economy (grant committees) to allocate resources to individual entrepeneurs (professors) who work within quasi-feudal federations (universities) of guild chapters (academic departments). Yet the NSF and its partners constitute one of the most successful forms of social organization ever devised: considered together NSF, DARPA, and the NIH may be responsible for catalyzing more basic scientific research results than any other institutions in human history. [1]

Although it may be useful to use the tools of management theory, economics, or political science to analyze the workings of this confederacy of institutions, it would be misleading to label it a market, a firm, or a commons.

More generally, although it's possible (with some intellectual contortion) to divide the economy into the "public" and "private" sectors, the institutions in each sector take radically different forms that depend on a myriad of forces (including social norms and "architecture", the other two modalities of regulation in Lessig's four-cornered graph). It could be argued that the public/private distinction often isn't the most useful discriminator when thinking about whether some form of social organization is better or worse for any particular purpose.

I would therefore characterize the progressive tendency to seek solutions in government intervention as simply a reflection of their willingness to seek solutions to problems, period. Is the market not serving a need? Maybe we should see if the government can do it. Maybe we should see if the formalized nonprofit sector can do it. Maybe we should see if peer production can do it. Maybe we should start a business. Progressives probably err on the side of too much hope for all of these, but the median libertarian seems to err on the side of dismissing all but the last as either futile, pointless, or simply immoral.

(Aside from all of the above, of course, a whole other justification for government action arises from the fact that coercive state action can sometimes solve collective action problems. But I'd rather not get into that today.)

[0] Who are, of course, then "taxed" by the university bureaucracy for overhead.

[1] Granted, these institutions have had more resources than any other scientific organizations in history, but I think we got our money's worth.


Two:

Adam Thierer asks why child molesters get out of jail with such short sentences. As others have noted before, the criminal justice system sets sentences based on the available capcity of prisons. According to Bureau of Justice statistics, 21% of our current prison population consists of drug offenders --- not drug-related violent crimes, which would drive this number way up, but drug trafficking, possession, etc. --- and that's trending upwards over time.

The "War" on "Drugs" wastes enormous resources that could, among other things, be used to protect children from sex criminals. Unfortunately, this kind of point's pretty tough to get across in political debate, and I can already hear in my head the shallow sound-bite rejoinder: "We don't have to choose between protecting our children from drugs and protecting them from sexual predators. We can do both:" ---pause for applause--- "we can build more prisons."

Of course, barring some revolution in incarceration policies, any more prisons that get built will be populated by roughly the same proportion of drug (and drug-related crimes) offenders, making prison-building a fantastically inefficient way to provision for improved incarceration of sex offenders. But now we're entering the territory of points too subtle to make effectively in, say, the paltry thirty seconds that were allocated for rejoinders in our last Presidential "debates". The American people might understand it, but the news media would caricature you as a wooden, uncharismatic policy wonk (if you said it calmly) or a ranting nut case (if you said it with passion). The exchange itself would last less than five minutes, but the columnists and talking heads would be repeating their talking-points caricature of it for weeks.

Thursday, October 05, 2006

On confidentiality and the present forum

When I started work at Google, I signed a confidentiality agreement, as is standard at technology companies. So, of course, I now know all sorts of juicy internal Google stuff that I cannot share here, which is mildly frustrating but both obvious and expected.

What's less obvious, to me, is what I can write about. Google has an official corporate blogging policy, but it basically amounts to "don't transmit confidential information and don't tarnish Google's reputation". Now, reputation's pretty easy: reasonable people must realize that all organizations sometimes hire nutballs like me, and that therefore any random insane or obnoxious thing I say is not endorsed by Google.

However, confidentiality's a trickier matter. If I write about technology at all, then I have to do it in a way that conveys no information to the reader about confidential matters. What does that mean?

One interpretation would be that I can write about anything in technology, except when it's related to what I do at Google. But, of course, over time, that would actually reveal what I work on at Google. If I write about many topics in computing technology, but not X, then over time it becomes increasingly likely that I'm working on X, particularly if some big X-related news item comes down the pipe and I remain conspicuously silent.

(Well, lately I've been rather silent for no particular reason --- pondering my confidentiality agreement is part of it, but I also just haven't felt much like writing. But let us assume, for the sake of argument, that my posting picks up again.)

Another interpretation would be that I can't write about technology at all. In my opinion, that's not reasonable. It would be absurd for Google to ask its employees to stop thinking, speaking, and acting on technology-related issues, particularly issues related to public policy. Regardless of my source of employment, I still live in a democracy (for the time being), and therefore have both a right and a civic responsibility to participate in the public sphere. I'm assuming that Google doesn't expect its employees to forego that.

On the other hand, in a world of at-will employment, I could in principle be fired for being a good citizen. I guess I'm just betting Google won't do that.

Anyway, I could probably second-guess this forever, but at some point I have to drive a stake in the ground. So, be advised:

  • If I post about X, you cannot infer that I work on anything related to X at Google, or that Google is planning to do something about X.
  • If I post about X, you cannot infer that I do not work on anything related to X at Google, or that Google is not planning to do something about X.
  • Anything I post here reflects my own thinking, on my own time, drawing on information that is publicly available from communication outside of any confidentiality agreement with Google, and does not reflect the existence of any Google policy, product, or snack food.

Anyway, hopefully you get the picture.

As a side note, you often hear Hayekian apologists for capitalism talk about how the market's price signals are a magnificent mechanism for aggregating information from decentralized actors. But every seriously competitive and innovative market is rife with confidentiality agreements like the one I recently signed. Price signals seem like a crude and low-bandwidth interface to such an enormous wealth of information. Astonishing amounts of knowledge gets locked up in these mile-high vertical silos, and price signals are little dime-size spigots screwed onto the bottom of each silo.

I'm not a communist. Communism was about abolishing the price signal interface. I'm a post-capitalist: I believe there must be better, richer interfaces waiting to be discovered.

I suppose you could argue that contracts already enrich the economic interface a great deal. With contracts, an economic transaction's no longer an exchange of a sum of dollars for a physical good, but rather an exchange of arbitrarily negotiable bundles of rights.

But somehow, despite that flexibility, we still end up with enormous amounts of information locked up in silos. This cannot possibly be the best way to organize information production. Academia and open source software do better in at least one way: when someone publishes a scientific result, or writes a patch for an open source project, that information gets distributed to everyone, not just the people living inside some confidentiality wall. The entire universe of potential cooperators immediately receives a richly informative broadcast of the innovation, not just a 3-tuple consisting of a scalar value and two names ("$4.95", "Alice", "Bob").

However, for a variety of complicated reasons, proprietary software companies do seem to produce certain kinds of research and software that wouldn't get made in academia or the open source world.

So, I don't really know what the answer is. I have a copy of Benkler's Wealth of Networks somewhere in my huge, freshly unpacked mound of books. I suppose I should read it.

Sunday, September 17, 2006

Poking around in Wikimedia Commons

I guess everyone's heard of Wikipedia by now, but probably not as many of you have poked around in the Wikimedia Commons, which is almost equally fun in its own way. The Commons is a place for people to contribute Freely licensed media to the world. It's not necessary that Commons pictures have encyclopedic value (although, of course, many do, and are referenced by various Wikipedias); it's merely a repository of images that someone, someday, might conceivably want to use in some kind of publication.

When I get tired of the anarchic process of wrangling with other editors on Wikipedia, I switch my contribution energy to uploading a few of my better photographs to Wikimedia Commons. It's a relief not to be forced to butt heads with some obstinate fellow editor on the Commons to defend a nitpicking detail of something I just did. At worst, my picture will simply be ignored. And if a useful picture gets uploaded, then it can get seen by a lot of people. For example, my own picture of the Ontario Legislative Assembly is currently in the Toronto article's "Government" section. (Curiously, no Toronto Wikipedian has yet uploaded a better picture than my tourist shot.) A lot of people are going to see that picture, if only in passing. It feels good to be useful this way, and the pain-to-reward ratio's much smaller than for textual contributions to the Wikipedia.

Also, one of the coolest aspects in Commons: featured pictures, which are frequently astonishing, and comparable in quality to the photographs in almost any "real" publication. Forget Brittanica; the quality approaches that of National Geographic in some cases.

Equally cool, for photographers, is the featured picture candidates page. Reading the discussions is a great way to learn what makes a good expository photograph. As a whole, the editors have a good eye and extremely high standards for technical, compositional, and affective elements of photography.

On the other hand --- as the nomination discussion on my picture of a Spermophilus lateralis reveals --- sometimes excessive cuteness overrules all that. Technically, it's not a great photograph: at full size you can see noise and blur, it's only 1024x1024 pixels (I cropped it down from a larger picture in order to make it a more effective illustration for its host article), and the (distant) snowfield in the background is completely blown out. But it's cute, so...

(This particular photo recently made featured picture on the English Wikipedia, which is a separate process from getting featured on Commons.)

Anyway, if you take photographs --- and digital cameras being being as ubiquitous as they are, you probably do --- then you should really consider uploading the interesting ones to Wikimedia Commons. You'll have to spend some time reading the uploading guide, but after that it's pretty easy and rewarding. I mean, who knew that anyone in the world would actually be interested in your vacation photos?