tadhg.com
tadhg.com
 

Archive for October, 2009

Plug Fun

23:28 30 Oct 2009. Updated: 00:31 31 Oct 2009

Figuring out what plug (or adapter) to use in a given country is almost like a game; in any case, I found this Gizmodo article well worth the read: “Giz Explains: Why Every Country Has a Different F#$%ing Plug”.

Permalink     1 Comment     [, , , ]    

Two Great Tastes That Go Great Together

15:08 29 Oct 2009

Those would be advertising and flies. Yes, flies. A German company decided to attract attention by attaching banner advertisements to flies at a trade show.

I assume that means that they’re responsible for introducing flies into the trade show, rather than having harvested flies already present, which is… interesting.

Permalink     Comment     []    

A Photo From Yosemite

23:35 27 Oct 2009

Yosemite was fantastic, and I’m too tired right now to post more than one photo, but I think this is the best one I took.
[more...]

Permalink     Comment     [, ]    

Speaker for the Dead Review

05:52 26 Oct 2009

Speaker for the Dead is the second novel in Orson Scott Card’s Ender series. It won the Nebula award in 1986 and the Hugo and Locus awards in 1987. Its predecessor, Ender’s Game, is revered as a science fiction and geek cult classic that still has resonance in geek culture. I liked Ender’s Game when I first read it years ago, and when I re-read it recently (prior to Speaker for the Dead), I enjoyed it and thought it held up quite well.
[more...]

Permalink     1 Comment     [, , , ]    

Gay Rights and Imperialism

17:15 25 Oct 2009

The essay “Gay Imperialism: Gender and Sexuality Discourse in the ‘War on Terror’” examines the now-conventional idea that Western respect for the rights of women and gays drives concern for oppressed groups within other (especially Islamic) cultures, which in turn serves as a justification for imperialist projects.
[more...]

Permalink     1 Comment     [, , ]    

Baseball, Statistics, and Arbitrage

13:23 23 Oct 2009

Michael Lewis’ book Moneyball has something of a cult following, and helped its main subject, Oakland Athletics general manager Billy Beane. The essential idea is that by focusing on non-traditional (in baseball terms) statistical analysis (called Sabermetrics), Beane could identify arbitrage opportunities in baseball markets.
[more...]

Permalink     Comment     [, , , ]    

Constitutional Law Lesson from Representative Grayson

23:56 22 Oct 2009

Via Glenn Greenwald, this video of Congressional Representative Alan Grayson clearly exposing as unjust and unconstitutional the measures that the Republican party are trying to get passed targeting ACORN:

Permalink     Comment     []    

Study on Guns and Risk

23:49 20 Oct 2009. Updated: 05:53 21 Oct 2009

A recent University of Philadelphia study apparently shows that people in possession of guns were significantly more likely (4.46 times as likely) to be shot in an assault than people without guns. I’m particularly curious about some things that the study can’t really address—namely whether it’s causation or correlation. Is it the presence of the gun that increases the danger of confrontation? Is it that the presence of the gun makes the gun possessor more belligerent? Or is it that the kinds of people more likely to be belligerent are the kinds of people more likely to be carrying guns?

Another question is one of morality—if (as is strongly suggested by the study) resisting robbery or borderline situations leads to a higher likelihood of injury or death (on either side), does this imply that offering no resistance is the more moral act?

Permalink     Comment     [, , ]    

Economics, Fairness, and Football

23:40 19 Oct 2009

Living in a capitalist society, many of our pastimes and interests are based on exploitation of one kind or another.

Some of these forms of exploitation are reviled because of their outright cruelty. This revulsion isn’t consistent. One of the things that keeps us calm about them is a veneer of fairness, which allows us to move along in acceptance instad of trying to figure out how to fight. Even if we don’t believe it, either enough other people do or we think enough other people do, which is one of the things that keeps our current system ticking along.

Does our requirement for “fairness” increase the more direct the connection is between the exploitation and our enjoyment? This question is one that struck me while reading Malcom Gladwell’s “Football, dogfighting, and brain damage”.
[more...]

Permalink     Comment     [, , ]    

Wall Street: Even Worse Than You Thought

11:12 18 Oct 2009

It should be clear to any reasonable observer that Wall Street is a rapacious hive of sharks who will do more or less anything at all for money, and that the financial industry is politically powerful enough at this point to get away with more or less anything. It should also be clear that the term “corruption” doesn’t really do justice to their antics.

That being said, I’m still agog at some of what’s covered in this Mait Taibbi article:
[more...]

Permalink     1 Comment     [, ]    

Friday Flash Game: Star Guard

16:41 16 Oct 2009

This is an old-school platformer/shoot-’em-up, very retro with a focus on gameplay. It’s fun, with a couple of interesting touches: one is that you get infinite lives, somewhat unusual in this type of game; the other is that the plot is revealed through text that appears in the background as you progress.

While it is Flash, it’s still a download with separate Mac and PC versions.

Permalink     Comment     []    

Energy Consumption, Data Centers, and Heat

15:03 15 Oct 2009

The Kardashev Scale is used to measure a civilization’s technology level, using the measure of its energy consumption—or, more accurately, the amount of energy the civilization can harness. In light of the ongoing computing/networking revolution, I’m curious about what percentage of our energy use is by data centers.
[more...]

Permalink     Comment     [, , ]    

Startide Rising Review

15:20 13 Oct 2009

Startide Rising is the second novel in David Brin’s Uplift Universe series, and it won the Nebula in 1983 and the Hugo and Locus in 1984. I read its predecessor Sundiver first, and it nearly stopped me from going on to Startide Rising. I didn’t like the writing style at all, and it felt unpolished. It must be said that its ideas and setting were interesting: it’s “big universe” science fiction, with a multitude of alien races. The unique concept Brin came up with was that every alien race was raised to technological advancement (or even sentience) by some other race acting as “patron”—except for humanity, which reached a high degree of advancement, and raised dolphins and chimpanzees to higher-level sentience, without a patron.
[more...]

Permalink     Comment     [, , , ]    

Rendezvous with Rama Review

12:55 12 Oct 2009

Arthur C. Clarke’s Rendezvous with Rama won the Nebula in 1973, and the Hugo and Locus in 1974 (as well as the 1973 BSFA award and the 1974 Jupiter and John W. Campbell awards). After I read it I described it as “old school”, which still seems accurate.
[more...]

Permalink     Comment     [, , , ]    

Some JavaScript Programming Patterns

15:09 11 Oct 2009

“JavaScript Programming Patterns”, by Klaus Komenda, is an excellent walkthrough of several JS patterns. If you code JavaScript regularly you probably know at least some of these but will likely still find something useful in it—I particularly like the lazy function definition, a pattern originated by Peter Michaux:

var foo = function() {
    var t = new Date();
    foo = function() {
        return t;
    };
    return foo();
};

Simple, elegant, solves the problem of making sure that the heavy lifting only gets done once.

Permalink     2 Comments     [, , ]    

Yankee Stadium and What’s Wrong with America

12:53 09 Oct 2009

The new Yankee Stadium opened this year, and with it came a rather large increase in ticket prices. The most outrageously-priced seats are in the “Legends Suite”, and they go from about $500 to about $2500 each.

Reporter Wright Thompson got an assignment to write about what having one of those seats is like, and his article “Seats of Gold” is excellent. Included in it is a damning critique of Wall Street, because the corrupt culture of brokers inducing traders to buy things includes lavishing them with all kinds of entertainment, including prime Yankees tickets:

In exchange for tickets, the trader orders whatever the broker is selling. Everybody wins. The broker gets his sale. The trader gets his seat behind the dugout. Well, almost everybody. You, I’m afraid, get screwed with your pants on. Wall Street was not only trifling with our financial future but also driving up ticket prices.

—Wright Thompson. “Seats of Gold”. ESPN, 5 Oct 2009.

[more...]

Permalink     Comment     [, , , ]    

Noam Chomsky at the Paramount

12:09 08 Oct 2009

I went to see see Chomsky speak last Saturday night at Oakland’s Paramount Theatre. The speech was on “Obama, the Middle East, and Prospects for Peace”.

It felt like a somewhat low-key talk, in the sense that there weren’t many revelations in it. Plenty of interesting information, and perhaps most illuminating in the way that even thought I knew many of the broad outlines, I was still surprised by some of the specifics that he cited.
[more...]

Permalink     Comment     [, , , ]    

Cycling: Not Strange, Not Unsafe

21:52 06 Oct 2009

But rather, a very safe and rather normal, indeed innocuous and beneficial, activity. Via MetaFilter I came across a series of sociological essays on attitudes towards cycling, most of them concerned with the idea that cycling is a dangerous activity. The series, by Dave Horton, is titled “Fear of Cycling”:

[more...]

Permalink     Comment     [, , , , , , ]    

Test-Driven Development: A Bad Example

23:59 05 Oct 2009

Test-Driven Development (TDD) is a programming methodology that calls for programmers to first write tests that will only be passed by code that meets the specifications for whatever component they’re working on, and then to write the code for the component and keep working on it until it passes the tests.

I don’t tend to use Test-Driven Development, even though I often think I should. When working on personal projects, I don’t even write many tests after the code is done, and that’s something I should definitely do. But I generally regard it as a good practice.
[more...]

Permalink     Comment     [, , ]    

Team O’Higgins

23:55 04 Oct 2009. Updated: 17:03 05 Oct 2009

More accurately, Club Deportivo O’Higgins. I had already thought about visiting Chile, but now it seems like I should not only do that but try to see this team play a match, preferably at home.

Naturally, they’re based in Rancagua, capital of The O’Higgins Region.

(Yes, somewhere back along the line, I’m distantly related to Bernardo O’Higgins.)

Permalink     Comment     [, , , , , ]    

Pure Cheese, with Sunglasses

12:45 02 Oct 2009

Not real cheese, but the cheese of amazing overacting. I got this from my friend John Summerlot, and had to share it due to the sick fascination it engendered. It’s a compilation of David Caruso’s one-liners from the beginning of CSI: Miami episodes. (Note: I can’t stand CSI, or CSI: Miami, or the other offshoots, but that didn’t seem to impede the pull of this particular set of clips.)

The question is, can you be sure it’s cheese—
puts on sunglasses
when it’s served Miami-style?
exits left
Permalink     2 Comments     [, , ]    

Python Extended List Slicing

23:18 01 Oct 2009. Updated: 08:20 02 Oct 2009

I never knew about this optional third parameter to list slices—in addition to e.g. getting the third to fifth items in a list with somelist[2:5], you can also get every nth item with somelist[::n].

This makes it very easy to get every odd or even item in a list, odd with somelist[::2] and even with somelist[1::2].

Where I think this is particularly handy is if you have to grab e.g. three-line chunks out of some text:

chunks = []
lines = text.split("\n")
for i in range(0, len(lines))[::3]:
    chunk = []
    chunk.append(lines[i])
    chunk.append(lines[i+1])
    chunk.append(lines[i+2])
    chunks.append("\n".join(chunk))

The docs on extended slices are here.

Permalink     1 Comment     [, ]