HTTP ETags

spedometer I tried out YSlow on some of my web sites recently.  It’s pretty well done. Most of the tricks were known to me, but this one trick about ETags (Rule #13) was very interesting to read.  Since ETags are indeed useless on my site, I’ve turned them off.

The basic problem is that many web servers (including Apache & IIS) use server-specific mechanisms to compute ETag values.  This can break if the files are served from a server farm because each server in the farm can present a different ETag value. 

Of course, synchronizing a value may seem easy; but in practice it is not.  One suggestion might be to use a MD5 hash of the content.  That can be made to work; but it isn’t trivial for a server; it either needs a cache of these, or it needs to re-compute.  MD5 is relatively cheap to calculate, but certainly not free.  If-Modified-Since solves the problem and requires no computation at all.

Website Usability

I love Windows Live Writer.  I’m using it to write this post.  But, the website for Writer is terrible!

To see what I mean, search for “windows live writer” on any of the main search engines.  Click on the first search result, which takes you to the home page, called “Writer Zone”.  Now, try figure out how to download the product.  You can’t.  There is no download button!  There are some buried text links, but that is about it.  It’s a pretty frustrating experience.  Before anyone comments, “oh, you can find it over here…”, that isn’t my point.  I know the content is out there – my point is that it isn’t made easily found.  Show me an ISV with a product that doesn’t have a massive, oversized download button, and I’ll show you a pink elephant.

Fortunately, Google’s search has figured out the navigation for Writer Zone.  Just do the search, and the download link is in the search results directly.  Phew!

But why does this problem exist?  Let’s speculate.

I think the big problem is that the Writer team has inappropriately decided to use Spaces technology as a product home page site rather than building a real site.   In other words, they decided promoting other Microsoft technologies was more important than the lost usability for navigating the web page. 

As a second example, consider the header navigation.  In my case, I landed on the Writer home page.  I didn’t know (nor care) that this page was hosted on Spaces.  So naturally, I’d expect the buttons on the header to be the primary ways to navigate the Windows Live Writer page, right?  Wrong.  Here is the header.  None of these buttons have anything to do with Writer, and will in fact take you away from the page!

spacesheader

Since I was actually looking for the system requirements for installing Writer, I typed “system requirements” into that header.  The results had nothing to do with Writer!

Finally, I did find what I was looking for, but only by consulting Google again.  The search for “windows live writer system requirements” was exactly what I should have done in the first place.

ServerBeach Hosting

Every few months or so I get so pleased with ServerBeach again.  The service is just awesome!

I’ve been a customer with them for about a year and a half now.  I started out paying $119/mo.  Their prices have dropped during that time, so I’m only paying $89/mo now.  That sounds like a lot; but this is one purchase that is totally worth it.

1) Flawless Uptime.
Since moving to ServerBeach, my sites have *never* been down.  Check out this screenshot of uptime; the box has never been rebooted since I started with them, and my monitoring software has never detected a blip of downtime on the network.

uptime

2) Awesome bandwidth. 
Downloading a 30MB movie today, I exceeded 1000Kbps from my site.  That rocks.

3) Freedom to build.
Having your own server means you can install anything, build anything, and test anything.  Shared accounts are super cheap, but often lack these features.  Having a dedicated server is really worth it.

Anyway, sorry for the advertisement.  But these guys really do rock, and I’m a happy customer.  If you find this useful; the link gets me a referral credit.

Spirit Parser

I needed a C++ parser today, and discovered the Spirit Parser Framework.  Wow – this is very impressive.  I was inclined to use good old lex/yacc; but this seems a lot better.

It took a while to get started as I don’t doing grammar work often.  But all in all, I found this toolkit easy to use, has good documentation, fast, and it just worked.  It’s a recursive-descent parser written using C++ templates.  You define the grammar directly in your C++ code, and it uses template magic to auto-generate the code.

I’m still waiting to discover it’s Achilles Heel.  The compilation is a little slow; but the runtime seems snappy.  I don’t have a benchmark, though.

Big-3 Fined for Promoting Gambling

The Wall Street Journal wrote, “U.S. Fines Google, Microsoft, Yahoo“. 

I find this to be yellow journalism. I don’t really care that the article is about Microsoft & Google, so this isn’t about my biases.  From reading the title, I sort of expected that Google got hit the hardest.  This doesn’t seem unlikely since the Google search engine is by far the biggest.  But, when you read the content of the article, you discover that the size of the fines were:

   Microsoft:  $21M
   Yahoo: $7.5M
   Google: $3M

So, the title was intentionally misleading us about the nature of the fines.  Anyone not looking carefully would have assumed from the title (like I did) that Google was hit hardest. 

I wonder if you could write an “unbiased news” app.  One which just takes titles, shuffles them around to get similar but less colored meaning.  This would help make sure your eyes don’t accidentally process titles as facts.  It’s all too easy to do.

The real story should have been, “Why were the 3 companies fined so differently?”  And why did Microsoft get hit so hard?  Poor negotiations?  Or something else.  The press release from the DOJ says nothing useful.  But it does provide the text of the contracts with each company.  Each was drafted separately (no doubt due to the legions of lawyers hired by the big 3).  None of the contracts are specific about how the penalties were derived. 

Each contract has similar text about, “In particular, the United States alleges and <company> neither contests nor admits, that on or about, and during, that time period, <company>, received payments from, or attributable to, on-line gambling businesses… The United States will move for the forfeiture of these funds…”

The Microsoft contract then states, “These funds are represented in full by the Four and a Half Million US Dollars…”

The Google contract then states, “These funds are represented in full by the Three Million US Dollars…”

The Yahoo contract then states, “These funds are represented in full by the Three Million US Dollars…”

OK – so, if the funds were represented by these amounts, why did Microsoft and Yahoo get screwed?

Windows DST Handling

If you need to know whether DST was in effect for a date in the past on windows, you’ll probably get grumpy.  With the DST change this year, Microsoft changed the dates at which it starts and finishes DST.  That’s great, and makes sense.  What is harder to understand, however, is why the Microsoft date routines also changed the DST handling for years prior.  Win32 APIs can no longer accurately tell you what time it was on Nov 1, 2006.

Raymond Chen writes it up pretty well.  He has many excuses reasons for why Microsoft didn’t get it right.  There is no doubt that time management is a pain in the neck and annoying.  But, at the end of the day, even the free operating systems do get it right.  Linux can tell you just fine.

Apple The Virus

I seem to accidentally get QuickTime on my machine a lot.  Most recently, it’s probably because I tested the Safari browser at home.  But when you do have the misfortune of being infected by anything Apple related, Apple invariably starts prompting for updates every day.  It’s like saying, “Would you like to uninstall me now?”  The answer is yes, but they don’t give you a nice, convenient button.

I don’t know why utility companies don’t get it – being in front of the user does not help your brand.  Don’t take up a slot in the system tray.  Don’t prompt if I’m not even using your software.  After all, if I don’t use Quicktime, why on earth would I care about security updates for it?  It does not help make users love you.  It does not remind them, “oh yeah, I’ve got this great stuff I’m not using.”  It’s just annoying.  You should stop.  Lest you get uninstalled, like Quicktime, Safari, Apple Update, and every other piece of Apple-related junk on my system.

A guess it’s a testament to the Apple brand that they can get away with these types of antics.

Update:  Looks like Apple is as annoying in French as English.

The Drag Race This Morning

The scene was intense.  Tensions where high.  There at the stoplight, head to head were a brand new, 2008 Mercedes McLaren SLR and a 2006 Honda Civic Hybrid.  What a match!  The SLR, with a price tag of ~$450,000 can shoot out of the gate in less than 4 seconds.   The Hybrid, an equally impressive yet not quite as fast machine would prove a difficult battle.

I was driving the Honda.  The driver of the SLR smiled as he noticed me admiring his car.  We waited for what seemed an eternity for the light to turn green.  When it finally changed, the SLR quickly zoomed ahead, but the stoplight where we both turned left was only a few hundred feet ahead.  On the curve, I made my move.

Rounding the turn, the Honda nestled quickly into the wide-open carpool-only onramp entering highway 85.  The SLR sat idly at the back of a very long line of other cheap cars.  I proudly smiled as I looked in my rear view mirror.  That was the last time I ever saw the Mercedes Mclaren SLR.

Winner:  Honda Civic Hybrid.  Cost:  $22,000.

Why Pay Income Taxes

I was reading this historical summary of how income tax has evolved in the United States over the last 200 years.  What struck me was the notion of citizens not paying any income taxes (as was originally the case).  When you do the research, it’s actually viable that we could pay zero in income tax today, yet raise all the same revenues for the federal government to maintain current spending levels (although our government should spend less anyway!). 

First let’s consider the two biggest problems that burden our economy today:

  1. The Foreign Trade Deficit.  American’s send $1,000,000,000,000 (one-trillion) more overseas each year than we bring into the US. There is no funny-math here.  Certainly everyone can understand that if they spend $100,000 more than they make each year, it won’t be long before they are so far in debt that they can’t repay their loans, will go bankrupt, and will spend the rest of their days unable to get a loan due to poor credit.  Our government’s ledger has bigger numbers, but the concept is the same.  Our spending pattern is simply NOT SUSTAINABLE.
  2. Massive Federal Debt.  America has amassed a nearly $10T debt.  This is money we owe that needs to be repaid.  We currently have no plan for how to repay it.   That’s $33,000 for every man, woman and child in America.

Unfortunately, with our shopping mall culture, we think we need to buy cheap $4 dolls made in china so we can have a Merry Christmas.  We buy so many of those stupid dolls that we end up sending $250M more each year to China than they send to us.

The solution:

If we were to switch our government’s revenue basis from income tax to import tax, we could solve both of these massive economic problems.  The prices of foreign goods would go up, having a temporary impact on our standard of living (ability to buy lots of $4 dolls).  But, those dollars would be directly put back into the pockets of Americans.  This means you’d have more money to spend.  New American businesses would be built offering prices competitive with their foreign counterparts, and within a few years, you’d still have your $4 doll again for Christmas, but it would be made in America.  Plus, you wouldn’t have had to earn $6 to afford the $4 doll in the first place.

Does the math add up?

It would be silly to say this is simple; but a rough cut says yes:

Currently, we import $2.2T of goods each year (2006).  We export $1.4T. 

US Revenues from income tax in 2006 was $2.4T. 

This means that if we phased in a 200% import tax over 8 years, we could eliminate income tax and maintain federal spending.  It means the price of your $4 doll would now be $12.  Of course, you’d have to expect the increased price of foreign goods to decrease American demand for them, which would further increase their price. 

If America were to institute a policy like this, we’d have to expect other countries to react.  Of course China wouldn’t like it – they just want our money in their pockets.  Even with taxes, most of the trade with China would still occur, but the net export:import ratio would drop significantly, especially a American businesses grow. 

Is there an alternative?

There is no doubt that this change would be scary.  But, is there a choice?  We can’t continue to spend like we do.  We have to pay off our debt.  What other policy do we have available to us which can decrease our spending while simultaneously paying off our debt and putting money back into American’s pockets so that we can live?  I haven’t heard of any.

Sadly, we’re going to “spend till we die”.   We’re too chicken to do this.

Tell me what is wrong with my plan; other than that you want your $4 doll.