New Coding4Fun column is up…



Background
Copying

Summary:
Duncan Mackenzie describes how to build a tool that uses the
Background Intelligent Transfer Service features of Microsoft Windows XP to download large files
over slow or intermittent links.

http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dncodefun/html/code4fun02282003.asp

Googlism

This isn’t all that new, but I hadn’t


tried it on myself

before;

duncan
mackenzie is all man
duncan mackenzie is one text that would work
nicely
duncan mackenzie is not exactly a new character in the realm of
romance
duncan mackenzie is the mackenzie of kintail
duncan mackenzie is a
masters of fine arts candidate in the printmedia department of the school of the
art institute of chicago
duncan mackenzie is indebted to the alberta
foundation for the arts
duncan mackenzie is a worthy re
duncan mackenzie
is the devil his
duncan mackenzie is currently exhibiting in
chicago
duncan mackenzie is magic’ well it fits around kinkladze’s name and i
think it sums up the way a lot of city fans feel about the way he plays the
game
duncan mackenzie is a microsoft certified solution developer for online
business systems
duncan mackenzie is an mcsd
duncan mackenzie is a
mcsd

I’ve always had this suspicion I was
“all man” but it is nice to have a computer system confirm it for
me.

Interesting phrase…

Just heard an
advertisement on the radio for the Foo Fighters and it contained this quote “The world’s
best American rock band…”



What does that mean?
Don’t “world’s best” and “American” clash a little there? Wouldn’t “Best
American Rock Band” be a better phrase? This isn’t a shot at
the band at all (or American rock bands, if that is a category of music at all),
I like their music; I’m just mocking the phrasing… are there are bands
that are classified as “American rock bands” that aren’t from America? I’m assuming this phrase is
somehow related to the Grammy that they just won, but I believe it was for Best Hard Rock
Performance

There goes that column idea….

Doesn’t anyone use static web pages anymore? I was playing
around with some code, just doing a quick prototype of an app for my Coding4Fun column and
(inspired by the cool and useful PAINT

tool) I decided to create an app that would check
for changes to a website and give you a little quick-launch menu of updated sites
on your system tray (who couldn’t use one more icon there?).

I thought it would be cool
to show how to use the HTTP If-Modified-Since
request header combined with the Last-Modified response header to show how quick
and easy it is to check for new content using the System.Net classes. Well, the
code works fine, it is the web that is broken 😉

Every site I tried this on (Penny Arcade, PVP Online,
even MSDN) happens to be a dynamic
page (php, asp, aspx, whatever), so there is either no Last Modified header
and the web server always says it has been modified (when it hasn’t)
or there is a Last Modified header but it is always equal to the date/time
of your request. Either way, you can’t use those headers to check if a site has
been updated. Fine and dandy, I’m already losing interest in this as a sample for
my column but I still want to finish it; so I figure that a quick
hash of the HTML will accomplish the same thing. Save the hash and compare it
against a hash of the new HTML later, and we’ll be set. Nope, no go. If there is
a single bit of HTML on the page that is dynamic (such as the page request time
being embedded into the HTML somewhere) then, of course, the hash will change
and I’ll think the page has been updated.

I realize that by carefully scraping
the page you could certainly get around these problems, but my two goals had
been:

#1 to show how to use the headers to
avoid having to even look at the response body (the HTML in this case)
and

#2 to create a general purpose
utility that would work with most websites.

On to the next
idea!

Oh, and if you are wondering how that
PAINT tool handles this? They
check a special (likely static!) file on the web site that is automatically
updated when the page is changed. That is a perfectly good solution if you are
dealing with a single site, but it doesn’t really help me with the general case.
And, if you are going to spit out a file that helps people (and their tools)
know when your page has changed… why not just a RSS feed with links back to
your page so that the advertisers are still getting all their
hits?

A Blog? What was I thinking?

I think I have to blame Kent Sharkey for this; he put up his blog and it has been nagging at my mind for days now… “I should have a blog”, “hey I think I have something to say”… but I couldn’t decide on the implemenation details… should I build my own blog tool, use a site like http://blogger.com, or radio.userland?


Finally I found http://dotnetweblogs.com and I realized I was set… lots of .NET chatter, ASP.NET code, and a cool URL. So here I am…