Archive for August, 2009

CSS and bicycle wheels

Monday, August 31st, 2009

There are two approaches to truing a bicycle wheel. The first is to just identify any loose spokes and tighten them up. Then start tightening or loosening spokes and spinning the wheel to see if there’s any effect. Continue this trial and error approach for several hours and you might end up with a true wheel.

The other approach is to have someone teach you the principles of how it works and then spend 15 or 20 minutes systematically getting your wheel true and round. I’ve tried both and I recommend doing it this way.

CSS is just like this. You can get your page to look the way you want through trial and error and piling on more classes, adding more divs, and generally making a mess of things. It’ll take a long time but in the end it might work. Or you can learn the CSS Specificity rules and the principles behind CSS selectors and get it done in a fraction of the time and with much cleaner code. Again, I’ve tried both approaches and I’d recommend the second.

This article in Smashing Magazine is a good read and a great reference. I’m going to keep it handy. I predict the process of building my next iPhone web app will take a lot less time and be a little more sane.

Taming Advanced CSS Selectors | CSS | Smashing Magazine

NYT is less stupid…

Sunday, August 30th, 2009

…than WAPO.

Japanese Opposition Wins Elections in Landslide – NYTimes.com

TOKYO — In a rare display of democratic muscle in this traditionally apolitical nation, Japan’s voters cast out the Liberal Democratic Party for only the second time in postwar history, handing a landslide victory to the opposition in hard-fought elections on Sunday.

Getting it wrong about Japan, again

Sunday, August 30th, 2009

Opposition Party Wins by a Landslide in Japan – washingtonpost.com

TOKYO, Aug. 30 — Breaking a half-century hammerlock of one-party rule in Japan, the opposition Democratic Party won a crushing election victory on Sunday with pledges to revive the country’s stalled economy and steer a foreign-policy course less dependent on the United States.

Of course, this is incorrect.
From Japan Zone:

The LDP lost its parliamentary majority in the 1993 elections, but continued to exert influence and soon returned to power in a coalition.

Yes, they were in the minority before. The Social Democratic Party’s leader became the Prime Minister. He is most remembered for his bushy eyebrows but, still, he was Prime Minister and he was not from the LDP. The LDP didn’t regain the majority until 1996!

Doesn’t the Washington Post know of Wikipedia???

Also, it’s worth mentioning that the party that won this election, the Democratic Party, was started by Ozawa Ichiro, who led an LDP faction that split and created the Democratic Party although he is no longer its leader. He’s an insider’s insider in Japanese politics.

But there is still Sonic Youth

Sunday, August 30th, 2009

SY is still pretty cool. Their old stuff still sounds great. And some of their newer music, the experimental/noise stuff in particular, is pretty groovy.

In the eighties:
YouTube Preview Image

In the aughties:
YouTube Preview Image

Skip when shuffling

Sunday, August 30th, 2009

This keeps happening. Every time I put iTunes on shuffle and I hit one of the songs from New Day Rising by Hüsker Dü I have the same two thoughts – how dated it sounds now and how this band is held in higher esteem than is warranted. That’s not a huge criticism because they are generally thought to have created some of most worthwhile music from the 80’s. At least in the rock/punk/hardcore vein of things. I don’t think that’s an exaggeration. I’m just suggesting they be pegged one notch lower than that.

I’m really supposed to like this band given the fact that I lived in Minneapolis during their heyday and saw them several times before they were big-ish. And I did like them. I thought I did. But in hindsight it was 80’s noise bands like the Butthole Surfers and folkies like Richard Thompson that have influenced my musical tastes more. Of course, I don’t listen to either of them anymore either. Maybe I’m just fickle.

Nice iTunes feature, by the way:

Picture 2.png

It also occurs to me that Hüsker Dü may be the only rock band whose name is supposed to have umlauts. At least, I think so – here’s the origin. I’ll give them credit for that. :)

Krugman rides bike

Sunday, August 30th, 2009

Aside from his mastery of shrill there is another reason to love Paul Krugman – he’s a cyclist!

Going fishing – Paul Krugman Blog – NYTimes.com

Well, cycling actually. I’ll have a column in tomorrow’s paper, then will take four columns off. I may do occasional blog posts from the road. But for the next two weeks I’ll be worrying more about whether I can get up that next hill than about the fate of the republic.

Full Screen in Mobile Safari

Friday, August 28th, 2009

Here’s how Facebook and other iPhone web apps manage to look just like native applications. Add this meta tag to your header:

<meta name="apple-mobile-web-app-capable" content="yes" />

Then use Mobile Safari’s “Add to Home Screen” feature:

IMG_0323sm.jpg

You’ll get a proper button on your iPhone to launch your web app. One caveat – any link in your app, including internal links will open a new browser window and close your application. You need to design your application entirely in AJAX. This actually makes a great deal of sense as it’s the only way to get a native application feel anyway. (The look is another matter.)