Wednesday, September 28, 2005

Why Firefox Matters

I don't know if you've been following all the bruhaha surrounding the beta release of IE7 but it's done something that I would have scarcely thought possible a couple years ago: revived shrillness in the pointless debate over which web browser will save humanity from itself. I admit to caring about web browsers but then I'm a web developer: the capabilities and bugs of the browser du jour have an impact on the quality of my waking hours.

I used to like IE but that's only because it's competition at the time was Netscape 4. I realize now that's like being into Britney Spears because you've only every heard elevator music your whole life. But now there's Firefox and it's like I've just discovered Tom Waits.

For a while I wanted Firefox to be successful if for no other reason than that it would make my life as a developer easier. I wondered what kind of market-share it would have to garner in order for websites to take notice and start designing, if not explicitly for Firefox than at least not implicitly for IE.

Now, I don't care.

I no longer care because Firefox has already succeeded. It succeeded the moment IE7 was conceived. Because what I really care about is not what browser people use but whether I can use transparent PNGs or CSS 3, and the fact of the matter is that most of the world uses IE and IE will soon support those things. But, and this is the important part, it took Firefox to bring IE to that point.

Most of the foregoing doesn't exactly constitute a sharp observation. But when you start to view Firefox not as the carrot that leads us to a better web, but as the stick that drives IE, that's where things start to get interesting.

Take Google for instance. They designed the first web apps that weren't painfully clunky. Gmail compares well to my desktop mail client and Google Maps is the best mapping software I've ever used. And the minute browsers start supporting things like SVG and XForms I'm sure Google will come out with something else that amazes everyone. But Google, like everyone else on the web that cares about staying in business, can only do cool things in so far as those cool things work in IE.

And Google can't exactly force Microsoft to upgrade its browser.

Or can it?

Tuesday, March 29, 2005

Biking + rain

I bike to work every day. I live in San Francisco so I don't have to contend with ice or snow (or even serious cold). But we do have rain and I bike through that.

My friends and coworkers know that I commute on a bike but when they find out that I go through the rain they're usually surprised. They probably imagine it to be a miserable experience but the truth is that it's not bad at all. You just have to approach it differently.

You have to change your riding style. This is pretty obvious on one level but it's not until you're actually out there that you realize just how much you have to adjust. My braking distance goes way up, much more than I would have guessed. It's not linear either: at low speeds there's little difference but at high speeds it's more than double. The breaking distance on cars goes up too of course. Worse, everyone's vision degrades. In California we get rain from around November to March. That means that for many months the roads build up a patina of oil from exhaust condensation. The result: the first rain of the season makes everything slide around like pads of butter in a Teflon pan. It sucks.

The difference between rain gear and good rain gear is the difference between a tolerable ride and an enjoyable ride. I have as much GoreTex as I can afford (jacket and over-socks). I also have a pair of waterproof-breathable cycling pants and I keep a showercap handy to slip over the seat. Once, I'm suited up, I'm protected from neck to toe (minus hands; I don't have any waterproof gloves). I also wear glasses (to keep rain out of my eyes) with yellow lenses (to increase contrast). The best part is that I'm basically impervious to amphibian assault. It can be pouring rain and I simply won't get wet.

Thursday, March 03, 2005

Dogfood

I feel mildly guilty about using this website to blog. I mean, I'm a web developer for chrisakes; writing this kind of shit is what I do. In fact, I basically wrote a stripped-down blogging system for Tagged.com (of course, I'm not allowed to actually use it). I'm like a fashion designer who buys his clothes at Target. A furniture designer who shops at Ikea. A micro-brew Brewmaster who drinks fucking Coor's.

Then again, writing your own blogging software requires a Server of One's Own. And I haveth not. Nor do I have the inclination to design a DB schema and write a bunch of back-end code that will basically duplicate what's already been done about three thousand times.

So yeah, I think I'll stick with this.

Monday, February 28, 2005

Ride into the sunset

So I finally got around to writing a program that calculates sunrise and sunset. What a pain in the ass that turned out to be.

There are dozens of websites that will do the calculations for you but I wanted a pseudo-code algorithm. Eventually, I found one from the US Naval Observatory but my trials were far from over.

I learned that there is no single algorithm that will produce acceptable results for all places and for all time. I guess that certain parameters need to be tweaked as you extend your calculations towards dates more than a couple of decades away from some reference point.

Also, I discovered that there is a lot of disagreement between the results of various calculators. This may have something to do with the different definitions of sunrise and sunset. To me, sunset is the moment at which the last visible sliver of the sun slips beneath the horizon but this is actually only one of three possible definitions. What's more, the observed time of sunset/sunrise is effected by atmospheric conditions which can only be tackled probabilistically.

So after a lot of trial and error I managed to get my program to produce results that matched up with the worked example that accompanied the pseudo code. However, the algorithm doesn't really have any explanatory material so I don't really understand the terms (what the hell is "sun's mean anomaly" for instance) and I don't know whether it's trying to account for any atmospheric conditions or for how many years this algorithm will product good results. Lame.

Theoretically, I should be able to bike the few miles to the ocean and check my results against reality but I never seem to have the time and really, I just wrote the thing to know how late I can leave work and still have sunlight enough to get me home so as long as it's correct to within 5 minutes I'm pretty happy.