code snippets

It took _way_ too much effort to get those blobs of code to display properly. Even inside PRE and CODE tags, WordPress was mangling stuff. I downloaded “David House’s grabcode plugin”:http://xmouse.ithium.net/archives/2004/07/19/implementing-a-code-snippet-system, but then I had to play with my CSS to get the results to look acceptable (and they’re still wrong in the RSS feeds, but I give up for now).

It’s done now, and the _next_ time will be easy :-)

posted at 9:56 am on Thursday, September 30, 2004 in Programming, Site News | Comments Off on code snippets

WordPress and HTTP Conditional GET

I was looking at my logs, because I was seeing a lot of traffic on my XML feeds. Clichéd, perhaps, after the Microsoft debacle :-). I was looking because my RSS2 feed had risen to the top of the daily traffic statistics.

I did notice that many aggregators still aren’t using Conditional GET, and that some others don’t support gzip. But that wasn’t it… Instead, a full 25% of hits resulted in HTTP Code 302 (not modified), and yet were _also_ transferring the full RSS feed (sometimes compressed, sometimes not). Digging in the code, I found (in the Conditional GET logic in wp-blog-header.php):

I moved the exit to the right place, and now all my Conditional GET clients are downloading 0 bytes :-). Here’s the fixed version:


posted at 8:58 am on Thursday, September 30, 2004 in Programming, Site News | Comments (4)
  1. Reid says:

    I use “wget” to download my RSS feeds onto tnir to produce my news.tnir.org page. Now wget has an option, “-N, --timestamping that tells it ” don’t re-retrieve files unless newer than local”. However, I also use another option, “--output-file=FILE” because I don’t want 200 files named “index.html“. When you use that option, it turns off the time-stamping feature. Bleaugh.

    I downloaded the code to see if I could fix it, but it turns out that the code is structured in such a way that redirecting the output is a major fork in the code path. *sigh. Maybe one day I’ll get around to it..

  2. Reid says:

    Whoah, some of my HTML leaked through there. The comments info says bold tags are allowed, and I certainly did not type any “del” tags..

  3. Harald says:

    Apparently Textile is processing comments, too; text surrounded by “-” is marked with del tags, and text surrounded by + is marked with ins tags.

    Seems to be haphazard though, esp. since it appears that textile is adding tags, and then the HTML sanitizer is stripping (some of) them out…

  4. Hi Harald,

    just stumbled about your blog and found a nasty bug there:
    You got a self signed SSL cert for some parts of your blog, if a user doesn’t accept the self signed cert, your blog layout breaks away completely.

    Grettings from Berlin/Germany

traffic

There was a “major accident on the 401”:http://www.cbc.ca/story/canada/national/2004/09/29/hwy_crash040929.html this morning. Two trucks collided, and one caught fire. The cleanup closed the express lanes in both direction through Yonge Street during the morning rush hour; traffic was backed up all over the city as a result. (The westbound collectors are under construction through that section, so the highway went from 5 lanes to only 1 through that stretch, if I remember correctly). Worse, the fire damaged the roadbed in the westbound lanes, which means it’ll be a while before they can re-open them. I suppose it’s possible that the fire damaged the underlying bridge structure, in which case we’re completely hosed…

Anyway, I don’t drive the 401 (although I cross over it every day; that was a bizarre sight). However, there was a huge traffic backup across the bottom of the city this morning too; the Gardiner Expressway / DVP were stop and go from about Gerrard all the way across to _Islington_. Apparently our traffic network is so overloaded that a 401 closure causes backups on the other side of the city…

posted at 11:48 am on Wednesday, September 29, 2004 in Current Events, Personal | Comments (2)
  1. Reid says:

    So, what route do you take to work? Where is work? Downtown? So you zip down the DVP to.. Richmond? Or do you take the Gardiner across to Jarvis or Spadina or something?

    Inquiring minds want to know! Oh but wait, then terrorists would know your route and you would be targetted for sure!

  2. Harald says:

    I go south on Don Mills to the DVP, then south to the Gardiner, across the bottom of the city where I get off at the Spadina/Lakeshore exit. I take Lakeshore across to Strachan, where I park. Pretty straightforward …

    In the summertime, when traffic is light, I’ll usually get on the DVP at Lawrence instead; saves a few minutes (and avoids several annoying traffic lights). In winter, when traffic is heavier, there’s no point because the DVP is too slow.

dumb crawlers

I wonder who is teaching people that it is acceptable to download the entire content of a website, as fast as possible, and then come back and do it again the next day (and the next)…

larbin has been added to the list of blocked robots. Buh-bye!

posted at 9:19 am on Tuesday, September 28, 2004 in Site News | Comments Off on dumb crawlers

luddites beware?

Avoiding technology has it’s drawbacks:

Hurricane JEANNE

bq. WE ARE REMINDED THAT FROM SUNDOWN TONIGHT UNTIL SUNDOWN SATURDAY IS YOM KIPPUR…A SOLEMN JEWISH HOLIDAY. SOME OF YOUR JEWISH NEIGHBORS IN THE WATCH AND WARNING AREAS OBSERVING YOM KIPPUR WILL NOT BE LISTENING TO RADIOS OR WATCHING TV…AND MAY NOT BE AWARE OF THE HURRICANE SITUATION.

Jewish law does say that personal safety is more important than religious observance. So, for example, it should be ok to drive one’s car in order to evacuate from the hurricane watch zone. But the question remains: how many people will miss the warnings? Current predictions have the storm making landfall in Florida before sunset tomorrow…

Stay safe, everyone.

posted at 9:59 pm on Friday, September 24, 2004 in Current Events | Comments Off on luddites beware?

reading

My son has a homework assignment. He has to read, for at least 20 minutes a day, with an adult supervising him. Which means that I get to read for the same amount of time! Yay; I’m finally starting to catch up on a way-too-tall pile of unread books…

posted at 9:22 pm on Monday, September 20, 2004 in Personal | Comments (1)
  1. Greg Wilson says:

    Kewl — will you supervise me, too? ;-)

catching up?

I’m down to only 54 unread items in SharpReader…

Explanation: I leave things “unread” until I have a chance to do something with them; add to del.icio.us or bookmark4u; blog; e-mail to friends; read in depth; whatever’s required. Things tend to come in faster than I can deal with them at times, so I’ve been discarding stuff in the “interesting, but I’ll never have time to read it” category…

posted at 8:48 pm on Monday, September 20, 2004 in Personal | Comments (2)
  1. Reid says:

    Hey, I just found out about del.icio.us today; how long have you known about it, hm?

  2. Harald says:

    A month or so, I guess… I’m not using it aggressively yet.

outsourcing quote

The commentary is the usual, but I loved Mr. Greenspun’s way of phrasing it:

bq. American labor is wonderful but it is a luxury that most American families can’t afford

(from Philip Greenspun’s Weblog:)

posted at 12:07 pm on Monday, September 20, 2004 in Current Events, Links | Comments Off on outsourcing quote

Ivan

I’ve been paying a lot more attention to Hurricanes all of a sudden. I could claim it’s because of the upcoming Kitefest (we were worried about getting rained out, but it seems Ivan is going to stall in the Appalachians and leave us alone), but I think it’s simple fascination.

But for some reason, I’ve got a Tragically Hip song stuck in my head…

posted at 9:08 pm on Wednesday, September 15, 2004 in Current Events, Personal | Comments Off on Ivan

Homework

My son has spent 5 hours in the last two nights doing about an hour’s worth of homework. It’s not because he’s struggling with the material, it’s because it seems he can’t pay attention to it for more than 5 seconds at a time. Argh!

I hope the whole year isn’t going to be like this…

posted at 9:06 pm on Wednesday, September 15, 2004 in Personal | Comments (1)
  1. David Brake says:

    I have spent a whole summer in that mode – it isn’t necessarily something that just happens to the young…

it’s the most wonderful time of the year

Back to school, although today was just a two hour “meet the teachers” session. Both kids and adults had lots of fun reacquainting after the summer break.

Lots of people we talked to had hurricane experiences, either Frances or Charlie. We got off easy compared to some :).

posted at 5:41 pm on Tuesday, September 07, 2004 in Personal | Comments Off on it’s the most wonderful time of the year

a comparison

Mission Space was a much better ride than Frances …

posted at 10:14 am on Tuesday, September 07, 2004 in Personal | Comments Off on a comparison

false security?

That’s the first time _ever_ I’ve had to remove my belt to get through the airport security checkpoint. My wife had to take her shoes off!

Keep in mind, when reading this, that I have travelled in Europe during their anti-terrorism crackdowns; there’s no comparison. The United States is more interested in the appearance of security. For example, I watched two separate TSA agents walk into the bathroom, look at an “abandoned” suitcase sitting there, and walk out again…

Anyway, we’re home, safe and sound. It’s too bad we didn’t get to see the VAB _before_ Frances punched great big holes in it…

posted at 9:19 am on Tuesday, September 07, 2004 in Current Events, Personal | Comments (4)
  1. David Brake says:

    Yeah that happened to me too back in September in the US – seemed stupid to me then too. Better hope suicide bombers don’t stick dynamite up their asses!

    Glad you made it back safely…

    VAB?

  2. Jeff K says:

    VAB = Vehicle Assembly Building. Gee, this is the first I heard of it, but intrigued, I found a lot of news, rocket displays are down etc.:
    http://earthobservatory.nasa.gov/Newsroom/NasaNews/2004/2004090717559.html

  3. Harald says:

    Wow. About 100 yards from that rocket was the KSC “Hurricane Status” sign that we all posed in front of on our way out (they kicked us out of the visitor center early, and were sandbagging the doors behind us :-).

  4. Debbie says:

    I’ve never heard of belts having to be taken off before. Was the security guard female? ;-)

wind, and wind, and wind…

The north eyewall (what’s left of it) is less than 40 miles south of us, according to Channel 13’s spiffy doppler radar. The storm has lost quite a bit of strength; it’s impressive out there, but no flying alligators yet!

The big hassle with this storm is its size; we’ve been under it for over 18 hours now, and it’ll be at least another 18 before it calms down enough for emergency crews to start opening everything up again. Fortunately we have power, and Footloose is on VH1 right now :-)

posted at 12:40 pm on Sunday, September 05, 2004 in Current Events, Personal | Comments Off on wind, and wind, and wind…

everyone knows it’s windy

So I’m staring out the window at rain falling at 45° and the trees starting to lean over… Part of me wishes Frances would just _get_ here already; the suspense is wearing. It was supposed to arrive Friday, then Saturday, now Sunday early morning.

Our hotel is open, and packed with people who have fled their homes, both from Orlando and farther east. We still have power; we’ll see how long it lasts, as they’re predicting that most of Florida will be darkened by this storm. The hotel is currently planning a curfew at 10PM tonight, until at least 10AM tomorrow. But the storm has stalled, so I’m not sure if they’ll change those times.

On the plus side, the storm track has moved; we’re no longer centered in her sights :). The hurricane is predicted to move across Florida and keep going west. That means that there is _some_ chance that our airplane will actually leave Toronto on Monday, so that we can go home again!

posted at 4:05 pm on Saturday, September 04, 2004 in Current Events, Personal | Comments (1)
  1. David Brake says:

    Yikes! Try to stay out of the news. Send digital photos if you see any flying alligators though ;-)