11.27.06
Posted in books, reviews at 10:49 pm by danvk

Recently, I’ve been trying to write at least a short review of every book I read. The latest on my list: Centauri Dreams, by Paul Gilster.
Centauri Dreams. What a name. I noticed it on a blogroll this summer and was instantly drawn in to Paul Gilster’s blog. It embodies everything that’s wonderful about blogs and the web. Interstellar travel is a niche topic. Almost nobody works on it for a living. I’d be lucky to find any books in a library on the topic, and if I did, odds are they’d be from the Apollo era, if not earlier. But with Centauri Dreams, I get a relevant, up to the minute story every day.
After a few weeks of reading the blog, I realized that there was a book to go along with it (yes, this seems backwards) and Centauri Dreams the book quickly shot to the top of my reading list. It even inspired me to get a library card in Mountain View!
The book is a summary of all the major ideas that have been advanced for interstellar travel in the last fifty years. The problem is a difficult one. Even the New Horizons spacecraft, the fastest ever launched, would take 80,000 years to get to the nearest star. It would make more sense to wait and develop new technologies, and there’s a detailed discussion of the Wait equation. Much of the book is devoted to exotic propulsion methods and the men who dreamt them up. The author clearly admires these visionaries, and has read all their books. Even the bad science fiction that they wrote on the side.
There’s Freeman Dyson and the legendary Orion project, which recommended denoating nuclear bombs underneath a spacecraft and riding the shockwaves in the 1950s. The success of the Mercury program and the Nuclear Test Ban Treaty put an end to that. Then there’s Robert Forward and his solar sail (check). A solar sail would be tens of kilometers across and incredibly thin. It would be propelled by photons from the sun, and thus wouldn’t need to carry fuel. This would make it incredibly light.
Viewing the development of space flight through the prism of these programs was eye-opening. Much like Tom Wolfe’s The Right Stuff, it shows that the rosy picture of rapid, brilliant technological advance and heroic astronauts isn’t the whole story. From the standpoint of interstellar travel, the 1950s were a golden age. The space age was coming quickly and there was infinite potential. Doors were wide open: exotic ideas like Project Orion were given funding and a chance to prove themselves. But then we had to go to the Moon by 1970, and suddenly there was no room for anything but man-carrying rockets. Projects like the Solar Sail would foreverafter be second-class citizens.
Freeman Dyson’s take on all this is fascinating, and inspired me to start reading his Disturbing the Universe, which I’ll hopefully review soon. Here’s an excerpt:
The history of the exploration of space since 1958 has been the history of the professionals with their chemical rockets. The professionals have never been willing to give a fair chance to radically new ideas. Orion is dead and I bear them no grudge for that. Orion was given a fair chance and failed. But there have been several other radical schemes that came later, schemes better than Orion, schemes that could do everything Orion could do and more, schemes that do not spread radioactive debris around the solar system. None of these newer schemes has been given the chance that was given to Orion, to prove itself in fair competition with chemical rockets. Never since 1959 have the inventors of new kinds of spaceship been encouraged to try out their ideas with flying models as we did at Point Loma. You will not find any of their models resting beside our Hot Rod in the National Air and Space Museum. (115)
There are problems other than propulsion, of course. Gilster also talks about communications, nanotech and AI. The AI discussion was awful and used old results to try and create a sense of hope where there is none. The nanotech discussion was far more interesting. Lowering a ship’s weight has fantastic effects on travel time, so miniaturization could go a long way. I pictured an interstellar mission as a swarm of microscopic ships, each specialized and capable of communicating with the others. If they were small enough, they could just be individually accelerated towards the stars. I don’t know what the masses and speeds would have to be for this to be reasonable, though.
An interstellar mission won’t have any hope of getting funding until telescopes start taking pictures of blue-green worlds around sun-like stars. And there’s a lot of work on that front. I’m excited about the ESA’s COROT mission that’s being launched in late December and NASA’s Kepler mission in 2008. The Centauri Dreams blog is a great way to stay up-to-date on such news. The book is not. I whole-heartedly recommend the former, and maybe 2/3-heartedly recommend the latter.
Permalink
Posted in music, reviews at 10:03 pm by danvk
Go check out Pitchfork’s 200 Greatest Songs of the 1960s. I always wished they’d do a Sixties album list in the same style as their 1970’s, 1980’s, 1990’s and 2000-04 lists. That won’t happen now, but a Singles list is a pretty good consolation prize. I already knew a fair number of the songs on the list, and I suspect that anyone else who went to High School in the English-speaking world can say the same.
Here’s my initial take on the top 21. Eight of them were new to me. If you want to listen to any of them legally, iTunes will have most, and the Pitchfork version of the list has info on what CDs to buy. If you lack scruples, you can just get in touch with me.
21. Beach Boys / Good Vibrations (1966)
Lots of fun, and everyone’s heard it. Not everyone knows the story, though. Beatles release Revolver. Beach Boys one-up with Pet Sounds. Beatles one-up with Sgt. Pepper. Beach Boys prepare to one-up that, and this will be the smash single. But then Brian Wilson loses his mind while recording it.
20. The Shangri-Las / Out in the Streets (1965) - new to me
This song sounds wonderful, and the story is edgy enough to make me buy a placement this high. How many songs like this feature a girl singing about how she needs to break up with her boy so he can be a bad guy in a gang again? Very cool.
19. Tomorrow Never Knows / The Beatles (1966)
I always liked this song, even before I liked The Beatles. It’s so exotic, so different, but not in an academic, unlistenable way like a 15-minute long “single” by Steve Reich elsewhere on the list…
18. Then He Kissed Me / The Crystals (1963) - new to me
This song is super-sweet, and it’s fine, but I don’t understand why it’s ranked so highly. There’s only the slightest hint of anything outside a cookie-cutter life here (”and then he kissed me in a way that I’d never been kissed before”). Instead of taking her to his home to MEET his parents, couldn’t they do that when the parents aren’t around? Be just a little edgy, please!
17. Fortunate Son / CCR (1969)
“I ain’t no Senator’s Son!” What a hook, what a song. I wish we had protest songs this tight and scathing now, not John Mayer singing this crap about waiting for the world to change.
16. I Wanna Be your Dog / The Stooges (1969) - new to me
I guess the song is OK, it’s just the “1969″ that sticks out at me. This sounds like something from the eighties. It reminds me a little bit of Sonic Youth.
15. Think / Aretha Franklin (1968)
“Freedom,” that’s the chorus that gets sampled all over the place. But thinking’s a good idea too. Can’t argue with that, Aretha.
14. Don’t Worry Baby / The Beach Boys (1964) - new to me
This is cool, and it makes me want to listen to more Beach Boys beyond Pet Sounds and “Good Vibrations”. It’s a fun love song, but it’s got a cool gender-role reversal thing going on. The guy is pretty submissive and insecure here, but his girl’s got all the answers. The car line is priceless: “I guess I shoulda kept my mouth shut when I start to brag about my car. But I can’t back down now because I pushed the other guys too far.”
13. The Weight / The Band (1968)
I knew the opening bit from a commercial. Having listened to the rest of the song, they chose the right part to sample. I’ve had “Southern Rock Bad” pounded into me just a bit too hard to enjoy this on its own terms.
12. Gimme Shelter / The Rolling Stones (1969)
Here’s one that really jumps out at you. It sure jumped out at me the first time I heard it as a freshman riding to school way back in the day. Go look at the picture of the Stones on Pitchfork. GOD he’s got a big mouth.
11. Dazed and Confused / Led Zeppelin (1969)
Ah Zeppelin. I don’t know that I would have chosen this as their best single of the 1960’s, but it’s certainly up there. Honestly, how many people can scream “The soul of a woman was creaaated belooooooooooooooow” to an audience of millions and still get as much action as Robert Plant? Now that I think about it, this song is pretty awesome. I can’t complain.
10. Israelites / Desmond Dekker (1969) - new to me
I’ve never liked Reggae much, so I guess this song is Great in that it helped start a genre, but I’m not so convinced it’s a great song.
9. I Can’t Explain / The Who (1965)
Yeah, this is solid. It’s The Who, it sounds like The Who, and The Who Are Cool.
8. Folsom Prison Blues (Live at Folsom Prison) / Johnny Cash (1968)
I’m so sick of Johnny Cash. Cool setting, cool song, sure, but I skip this one.
7. Wouldn’t it Be Nice / The Beach Boys (1966)
This song might be my #1. It’s certainly my favorite Beach Boys song. Anyone who dated in High School will be able to relate instantly. This was the song that sold me on Pet Sounds and made it one of my favorite albums.
6. Be My Baby / The Ronettes (1963) - new to me
Oh fine. I’ll be your baby if it’s really that important to you. This song is super-sweet, but w/o Pitchfork’s description I wouldn’t have known the technological/music history reason that it was ranked so highly. According to them, it’s the first single that was impossible to reproduce outside of the studio. Meh.
5. A Day in the Life / The Beatles (1967)
I’ve never understood the Best Beatles Song Ever label that it often gets. I’d rate Tomorrow Never Knows higher than this. That being said, it’s a good and tremendously interesting song. It has an incredible sense of resignation all about it.
4. Like a Rolling Stone / Bob Dylan (1965)
The sound of someone “kicking open the door to your mind.” I always worry that people feel obliged to pay lip service to Bob, so I’m skeptical of all such airy statements. Go listen to it yourself. It’s an incredible song that should send chills down the spine of anyone who’s recently moved out into the real world. (note: Google is not the real world). Bob looks so young in the Pitchfork picture.
3. A Change Is Gonna Come / Sam Cooke (1964) - new to me
“Ah was bawwwwn by the rivuh…” This was the real winner of the list for me, the most fantastic song that I would never have found on my own. No white man has ever had a voice so incredible as Sam Cooke’s. I’m almost embarassed to sing along. The song is filled with depressing anecdotes, but it always gets back to that chorus, that a change gonna come.
2. I Want You Back / The Jackson 5 (1969)
I’m so happy that PItchfork made this #2. Who doesn’t love this song? What scares me is that MJ must have been around my little nephew’s age when he first sang this. What’s that like to be outclassed by a ten year-old?
1. God only Knows / The Beach Boys (1966)
“The world could show nothing to me, so what good would living do me? God only knows what I’d be without you.” I think Pitchfork is picking this song because it hits so many Sixties themes. It’s the sweet sort of love song that seems typical of the early 60’s. But as they say, it’s a song riddled with anxiety and dependance. Having the “Wouldn’t it Be Nice” feeling is most certainly a good thing, but you don’t want to feel like “God only Knows,” and in that way, I suppose it’s a more nuanced song than #7. But if anxiety’s what they want, where’s “Caroline No”? I love this song, but I wouldn’t put it at number one. I like numbers 2, 3 and 4 better right now, but this choice may very well grow on me.
Permalink
11.20.06
Posted in programming at 12:17 am by danvk
Can you figure out how this program does it?
#include <math.h>
#include <stdlib.h>
#include <stdio.h>
#include <time.h>
unsigned int gcd (unsigned int a, unsigned int b)
{
while (b) {
unsigned int c = b;
b = a % b;
a = c;
}
return a;
}
int main(int argc, char** argv) {
if (argc != 2) {
fprintf(stderr, “Usage: %s <sample size>\n”, argv[0]);
exit(1);
}
unsigned int sample_size = atol(argv[1]);
unsigned int count = 0;
srand(time(NULL));
for (unsigned int i=0; i<sample_size; i++) {
unsigned int a = rand();
unsigned int b = rand();
if (gcd(a,b) == 1)
count++;
}
double pi = sqrt(6.0 * sample_size / count);
printf(“%d: %.6f - %.6f = %.6f\n”,
sample_size, pi, M_PI, fabs(pi-M_PI));
}
Convergence is pretty bad, probably O(sqrt(log N)), but it’s cool that it works!
| Input |
Runtime |
|Output-π| = Error |
| 1,000 |
0.001s |
|3.170213 - 3.141593| = 0.028620 |
| 10,000 |
0.003s |
|3.119420 - 3.141593| = 0.022173 |
| 100,000 |
0.025s |
|3.142490 - 3.141593| = 0.006862 |
| 1,000,000 |
0.243s |
|3.140774 - 3.141593| = 0.000818 |
| 10,000,000 |
2.427s |
|3.141377 - 3.141593| = 0.000216 |
| 100,000,000 |
24.256s |
|3.141756 - 3.141593| = 0.000164 |
| 1,000,000,000 |
242.518s |
|3.141692 - 3.141593| = 0.000099 |
(Thanks to C++2HTML for the syntax coloring)
Permalink
11.18.06
Posted in personal, tennis at 1:44 am by danvk
Tennis World #1 Roger Federer is playing World #2 Rafael Nadal in a few hours in the Masters Cup semifinals. I assume that Federer will win, but he has a history of bringing out the best in Nadal in a way that he doesn’t with anyone else. It should be a great match, but unfortunately, they’re playing in Shanghai, and no networks in the US are carrying it live. So I have to watch it rebroadcast at 7 PM PST on ESPN2.
I’m going to be really mad if I find out who won before the broadcast. Prime candidates for doing so:
- Gmail Web Clips. They’re great, but I had to remove ESPN.com from my set after it ruined two previous matches in this tournament for me.
- Wikipedia Watchlist. Not a conventional source of spoilers, but I had at least two late-round Wimbledon matches ruined this way. There’s going to be a flurry of activity on the Federer and Nadal articles today.
- Random web surfing. You just never know.
- Sports tickers. I’d like to watch the Michigan/OSU game, but I’m terrified.
So no email, wikipedia, web surfing or TV. Hopefully I’ll emerge from under my rock tomorrow in time for the match!
(And since when was Roger one of the sexiest men alive? He’s really not that attractive!)
Permalink
11.15.06
Posted in Uncategorized at 6:41 pm by danvk
I’m slowly developing an instinct to share any items I enjoy in Google Reader, but this means that I often find myself wanting to share an article from outside of Reader. I’ll stumble across a site, (usually from reddit or A&L Daily) enjoy an article, and want to share it. But I can’t, because I don’t subscribe to that random site’s RSS feed. Here’s a workaround:
- Add the “Subscribe…” link from Settings -> Goodies to your toolbar, or use this link: Subscribe… there.
- When you find an interesting story, click “Subscribe…”
- Find the article you want in the RSS feed and hit Shift-S to share it
- Close the tab/window. Don’t hit subscribe!
I haven’t found any other way to “preview” an RSS feed in Reader like this w/o subscribing. Here’s to a useful, obscure feature…
As always, you can subscribe to my shared items using the link on my Blogroll.
Permalink
11.14.06
Posted in programming at 1:06 am by danvk
The reasons that are typically mentioned for getting an account on Wikipedia are: 1) Your edits appear more reputable, 2) You can send/receive messages to/from other Wikipedians, and 3) You get a watchlist, which shows all recent edits to articles that interest you.
All of these reasons are geared towards writers, not readers. But there’s another reason for readers to register that I’ve never heard mentioned: registered users can add their own custom Javascript to Wikipedia pages. Why would anyone want to do this?
Reason #1: Navigation Popups Wikipedia encourages random browsing like no other site can. With Navigation Popups, you hover over a link and it shows a little preview of the article. Perfect for answering the “what on earth does that article look like?” question without disrupting your reading.

Once you start using Navigation Popups, there’s no going back. I often wish the rest of the web had these. For installation instructions, see Lupin’s instructions. The installation involves adding a single line to your User:/monobook.js page.
Reason #2: ISBNs When you click an ISBN on Wikipedia without an account, it takes you to a god-awful page listing every conceivable site you might be interested in. This is Wikipedia’s way of not picking sides. But I just want it to take me directly to Amazon. A user Javascript can do it. See this page for details.
Reason #3: Hacking! There’s nothing like being able to fix your annoyances on a site. One of my annoyances: while it’s obvious how to diff two specific edits with this interface:

It’s not at all obvious with this interface:

I know that clicking “7 Changes” will show me the diff of all those edits to the page, but I have no idea what the cur/last links do. So I hacked up a script to make it look like this:

Now it’s clear how to do the diff. To install this script, check out my monobook.js.
Permalink
11.12.06
Posted in personal at 4:07 pm by danvk
I’ve always loved documentaries, but in the past month I’ve begun to discover just how many good ones are freely available online. It all started with a reddit post linking to del.icio.us. Here’s the sources I’ve found so far:
My favorites so far:
Possibly the coolest thing about YouTube and Google Video is that playback in them Just Works. If you’re not using Windows, you’ll have some trouble with the PBS website. I had to use Flip4Mac WMV to view the Frontline episodes. I checked its “open in QuickTime Player” option, since I much prefer viewing in an application designed for that purpose than on a web page.
Permalink
11.08.06
Posted in politics at 2:53 am by danvk
I shouldn’t have been so pessimistic. The Dems have gained at least thirty seats in the House and will have a comfortable majority. My old little league coach, Joe Donnelly, won his election by 8%. I’m happy. What has me ecstatic, though, is that the Dems are going to take the Senate, 51-49.
It looked like a lost cause earlier in the evening, when Harold Ford, Jr. was trailing big in Tennessee and George Webb was trailing by 30,000 votes in Virginia. Losing both of those races would have meant 50-50 at best. But then, with around 80% of the precincts reporting, Webb started closing the gap. Every time I hit Cmd-R, it would be slightly narrower. And then, suddenly, he was up by 3,000! That was the moment when I realized this could happen.
It’s all down to Montana and Virginia. Virginia official polls have Webb up by more than 8,000 votes, w/ 99.75% reporting. For some reason, CNN reported this as an 11,000 vote difference earlier in the night, when Webb was only up by 6,000. They just took 5,000 votes from Allen. Don’t know what was up with that. Depending on provisional ballots, there will probably be a recount, but I’d be shocked if it changed anything. Al Gore was only down 500 votes in Florida in 2000. Eight thousand is impossible.
In Montana, CNN is showing a 4,000 vote Tester lead with 84% of precincts reporting. I believe that almost all of the remaining 16% are from Yellowstone county, where Tester is leading by 1,273 votes. Whoever designed CNN’s county-by-county listings should be shot. Why can’t CNN show all the Montana counties on one page? And even worse, why can’t it show me just the counties which haven’t fully reported? In any event, the 84% number can’t go any higher until tomorrow morning, when Yellowstone county has a recount. Assuming no huge changes, Tester will win by 1% and the Democrats will take control of the Senate.
In non-political news, everyone should watch the Mercury Transit tomorrow morning. It lasts from 11:12 AM to 4:10 PM in Mountain View, so it should be visible on the east coast as well.
Permalink
11.07.06
Posted in politics at 12:00 am by danvk
I’d encourage everyone to watch HBO’s Hacking Documentary special free on Google Video. It’s 81 minutes long and follows Bev Harris, the woman who found the Diebold source code a few years ago and sent it to CS professors. It’s absolutely absurd that electronic voting software isn’t required to be open source. Possibly even more absurd is that Diebold tallies votes using Microsoft Access!
Some places to follow the election live tomorrow:
The general consensus seems to be that the Democrats will gain 20-30 seats and retake the House, but come up just a bit short in the Senate. I’m really nervous about all this. If that’s what happens tomorrow, I’ll be happy. The Dems need to pick up about 15 or 16 seats to take it, and my guess is that they’ll do it by less than people are expecting. Maybe 20, maybe less.
Senate.. I think the Dems take Montana and Virginia, and the Republicans take Tennessee. That leaves Rhode Island and Missouri. The people on CNN predicted that Rhode Island would go Republican and Missouri would go Dem. That’d mean a 50/50 Senate, which is a Republic majority. I’d believe that. I’m worried about Missouri and Montana, though.
Update: I looked over all the house races at electoral-vote and I counted 16 or so that were almost guaranteed democratic pickups. There’s another 15 really close races on top of that, so I can see the 20-30 pickup number.
Permalink
11.06.06
Posted in Uncategorized at 12:56 am by danvk
Is Computer Science really science? Interesting discussion here and here and here, kind of. I’m not sure what to think on this one. It obviously depends on you mean by “science,” but Theoretical CS has always struck me as far more similar to Math than Science.
If your Macbook Pro mysteriously stopped sleeping when you closed it, try downloading the combined 10.4.8 update from Apple.
I really like Anselm Kiefer. I would have linked directly to the San Francisco MOMA page on him, but they just had to make it all Flash. Jerks.
I also really like C++, particularly after reading about Boost.Lambda. Just like most other languages, it’s all about introducing useful abstractions. Unlike any other programming language I know of, it usually does this with zero performance degradation over C. More specifics when I start writing about Boggle…
Permalink
« Previous entries