Why good programmers are lazy and dumb
Lazy because they want computer to work for them and dumb when they need to think like a user.
Month: August 2005
Display a custom message on old posts
Here’s a chunk of code for WordPress that will display a custom message on posts older than a certain date. You might ask, “Why would I need such a thing?” And I’d say you probably don’t but if the post is older than 60 days and not a monthly archive, the person has likely arrived via search engine or permalink.
So, who cares if someone is arriving via search engine? Well, they probably won’t stick around after you’ve given them their tidbit of information. However, you could direct them towards your site’s main page, some other content or even display some AdWords or other advertising (thus avoiding a hit to your loyal readers).
It’s a relatively straight-forward chunk of php code. You’ll probably want to put it in your post template, sandwiched between the function that displays content and the one that displays comments.
<?php
$entry_datetime = abs(strtotime($post->post_date));
$time_since = time() - $entry_datetime;
$days_since = 60;
if ($time_since > $days_since * 86400) :
?>
<div class="message-age">
## Modify this message
<p>This entry is more than 60 days old.</p>
</div>
<?php endif; ?>
This code is GPLd, do whatever you want with it. You could have it display a different message for a post that’s a year old or two years old.
If there’s interest, I can turn this into a simple WordPress plugin but it doesn’t seem overly necessary.
Playing the fool
Playing the fool
Working 9 to 5 as a court jester.
The P-Mate
The P-Mate allows women to pee standing up
It’s essentially a card-board funnel but I guess it could be handy if you were in the woods. Probably not work safe.
Pets that sleep like dead people
Photos of pets that sleep like dead people
One of the weirder threads that I’ve come across on the internet.
Google Talk
Google Talk
The long-rumoured Google IM client arrives using the Jabber protocol and supporting voice calls. You need a Google id though, if you’re jonsing and still don’t have one I’ve got a few invites left.
The Piri Reis Map
The Piri Reis Map
A Turkish map from 1513 that offers detailed costlines of West Africa, parts of South America and Antartica.
Photos from Montreal
Popped down to Montreal this weekend and stayed a night at Phil’s place. Didn’t get up to much, but I took a few photos Sunday afternoon. It’s still annoying not to have an lcd screen on my camera, I’ll get something new eventually. Here’s the full photo set on flickr.
CBC Unplugged
CBC Unplugged
A weblog keeping track of media produced by locked out CBC employees.
Men’s Vogue is Ugly

It’s really hard to start writing about Vogue for Men, then again some organizations can write an entire article. There should be more than a few obvious jokes to work with, but the project on a whole just seems like another addition to the already massive pool of magazines. It may survive, it may not. I can’t see myself buying it.
I’m guessing that they’re trying to pull in an audience of modern, fashion-conscious men (you get a slap in the head for allowing meterosexual into your brain). I’m also going to go out on a limb and guess that they spent a lot of money photographing George Clooney and gave a five-year old some licorice to design the cover for them.
Look at it. I mean really look at it. Try to tell me that cover isn’t seven different shades of ugly — from the logo, to the use of four hundred different fonts. For a magazine that’s pimping style, it’s hard to figure out how this cover escaped into the wild.
Wi-Fi Spray
Want to improve your wifi speeds? Use WiFi Spray.
Not convinced? Numbers don’t lie.
Toilet-top sink
Toilet-top sink
A smart idea for making use of the water your flush into the bowl.
