Author Archives: daniel

Programming quote

This is possibly my favourite programming quote of all time:

“You know, when you have a program that does something really cool, and you wrote it from scratch, and it took a significant part of your life, you grow fond of it. When it’s finished, it feels like some kind of amorphous sculpture that you’ve created. It has an abstract shape in your head that’s completely independent of its actual purpose. Elegant, simple, beautiful.

“Then, only a year later, after making dozens of pragmatic alterations to suit the people who use it, not only has your Venus-de-Milo lost both arms, she also has a giraffe’s head sticking out of her chest and a cherubic penis that squirts colored water into a plastic bucket. The romance has become so painful that each day you struggle with an overwhelming urge to smash the fucking thing to pieces with a hammer.”

— Nick Foster (“Life as a programmer”)

(via Owen)

The power of spam

When I registered my first domain name, toxiccustard.com, in November 1996, I didn’t keep my email address secret. It wasn’t obvious (at least to me) that spammers were picking up any valid email addresses they could find, left right and centre. The address: dbowen@toxiccustard.com. I can quote it now because it hasn’t been valid for many years.

But they keep distributing it, and keep spamming it. I know this because my web ISP told me last week that toxiccustard.com is now getting about five thousand e-mail messages PER DAY. Aye carumba.

In fact so much mail is coming in that before they realised the nature of it, they were saying they’d have to decline to provide me with shared web hosting for that domain in the future, because of the impact on other customers. As it is they’ve said okay they’ll live with it, since they’ll be upgrading their systems shortly so bouncing mail doesn’t impact them as much.

I’ve disabled mail completely on that domain in Plesk, and I’m looking into fiddling with the MX records, which hopefully should stop dead any mail way before it reaches anybody and starts costing them money. This may involve moving the domain to a new registrar, since the current mob doesn’t appear to provide this level of customisation.

The lesson: keep your email address secret. Once the spammers have it, expect a snowball effect. It may take 9 years, but eventually it’ll be unusable.

Virtual keyboard

From the way-way-way-too-cool department: the virtual laser keyboard. You press a switch and it laser-projects the image of a keyboard onto any surface, then detects your “key”-presses on it via bluetooth. No stuck keys, no getting food jammed in it, or coffee poured over it. At US$199, it’s not particularly cheap, but for pure cool points, it looks like a winner. There’s a gushing review here. (via David.)

ASP.Net first impressions

I’m enjoying mucking about with Asp.Net. For someone who’s done a fair bit of “Classic” ASP like myself, it’s a great step forward.

But maybe I’m way off the mark here, how on earth could they implement something as useful as a DataGrid HyperLink column or a <asp:hyperlink> tag and not include an easy way of setting the title attribute in the link? Nor does the syntax checker seem to recognise the <span> tag. Did the W3C go and depreciate these while I wasn’t looking? Don’t believe so…

(The solution for the DataGrid is to use an <ItemTemplate> and code it yourself.

Ditto the Hyperlink tag. For the <span> tag, well, what care I if the syntax checker puts a squiggly line underneath it and it shouts a warning during compilation. Ah, seems to allow <span> and other such niceties, you have to tell it your targetting IE5 (or later), rather than IE3/NS3. Makes sense.)

Outlook won’t undo

One of my long-term Outlook gripes: Undo can catch a lot of things, but one of the things I use it most for is when I’ve changed my mind about deleting an email, so I want it back out of the Deleted Items. But it only works if you deleted from the folder, not from within the email itself, which then returns you to the folder. Would it be that hard for the logic to say “hey, he pressed undo, he must mean undo the last action” (well duh) “so I’ll undo the mail delete he just did.”

Briefs

The weird bounces I was getting a while back are apparently due to a bug in QMail. They’re also causing some mails to be sent multiple times from webmail. Triffic. But I’ve switched webmails from SquirrelMail to IMP, and that seems to help. I don’t like IMP’s “This mail was sent by IMP” footer, but I do like its features, especially the timezone setting, which was never satisfactory in SquirrelMail.

A big batch of Microsoft patches are out. Through as someone at work pointed out, they shouldn’t be due to buffer overflows, ‘cos MS claimed years ago that they’d eliminated them in Windows XP. (Thanks Ian)

Mr 99Zeroes has apparently been sacked from Google. As Scoble remarks, the rule for blogging about work really needs to be: Don’t piss off your boss. The alternative is simply not to blog about work.

C/Net’s new online news/RSS reader/aggregator: NewsBurst. (via Steve Rubel who features on the latest G’day World podcast)

An Englishman was arrested after he used the text-only browser Lynx to donate money to a tsunami fundraiser. Apparently British Telecom technicians looking through the web site logs thought it was a hacking attempt.

Spam Karma

Well after deleting what seems like hundreds of bloody comment and trackback spams over the past week, I’ve installed Spam Karma (billed as a “fearless Spam Killing Machine”) on this blog. If it’s successful, I’ll be installing it on my other WordPress blogs.

It includes blacklists, captcha or email verification for suspicious comments, a myriad of settings, all that good stuff. For now I’ve set it to “lenient” mode until I get a feel for how strict it is. Feel free to leave junk comments here to see how it goes. (But beware of deliberately leaving spammy comments — for all I know it may decide to blacklist your IP address!

PS. Tuesday 21:25. The manual install as in the ReadMe worked for fine me, except that you can’t get to the config page through the menus, you have to activate it from the plugins page, then go to the URL it quotes. (This is apparently a known thing with WP1.2, but I guess it applies to WP1.2.2 as well, which we’re running here. Presumably it doesn’t apply to the current nightly builds or to the future 1.5.)

Also be sure to try the test captcha page (linked off the config page) to make sure that bit works (eg the correct PHP libraries are there somewhere. If they’re not, I guess you need to hassle your ISP. Works fine for me.)

PS. Wednesday 21:15. There is a hitch: the e-mail it sends out summarising what it’s done is encoded with something. I think this is an incompatibility with the PHP setup on my ISP… the same thing happened with WordPress 1.2’s password reminder messages. I’ll have to dig around for a fix.

It should also be noted that Tony has tried to plonk it onto a blog he runs, and is having some issues. So it’s not all beer and skittles.

On the bright side, it tells me it caught 20 spam comments in the last 24 hours. I certainly haven’t seen any get let through.

PS. Thursday 20:05. Some are getting through, but evidently nowhere near the total number being caught. Hmmm.

My favourite formats

Daniel’s favourite file formats for distributing multimedia to friends, on the web, that kind of thing. I know a lot of hardcore geeks will know all this stuff (and disagree with some of it), but I was asked recently about it, so here goes.

For pictures containing large blocks of colour, including most screendumps out of Windows… PNG. GIF used to do the job for this, but PNG supports more than 256 colours, and is now in widespread use. Even Windows XP Paint manages to handle it, though older versions don’t.

For pictures with lots of variance in colour, such as most photos, it’s gotta be… JPEG. Try out the various compression settings to see what works. You can often shrink files down a surprising amount with little in the way of visible detail loss. Of course, keep a pristine copy if it’s a picture you’ll need to work on in the future. Windows XP Paint can do JPEGs… uhh, kind of… no control over compression.

For sound, the cross-platform standard now is MP3. A nice balance of quality and file size. Playback software is standard on any computer of the last 5 years or so (and if not already installed ‘cos it’s some ancient beast, is freely available), and unlike WMA it’s supported on pretty much every portable digital music player ever made. (I’m with Cameron – Microsoft should retire WMA. They won’t, of course.)

Movies? MPEG-1. Don’t get me wrong, I love DivX. DivX good. And in comparison, MPEG-1 is not the most efficient of formats, but even ancient creaking Windows NT Media Player supports it. No mucking about with making people download extra codecs or special players – any setup can handle it. No RealPlayer or Quicktime nagware. No Windows-only WMV that the poor Mac and Linux people can’t handle.

And if you use a decent encoder such as TmpGenC (free!), you can do a fair bit of tweaking so you get a watchable movie that’s not too humungous. Fiddle the bitrates, try a variable bitrate, reduce the frames per second, crop unused parts of frame, use a efficient sound compression. Takes a bit of practice, but worthwhile in my opinion. Hopefully in the near future, more efficient versions such as MPEG-2 and MPEG-4 will become standard on all computers. But in the meantime, I’m sticking with MPEG-1.

Agree? Disagree? Comment?

75 digits of pi

(Does this count as a podcast?)

When I was a junior geek of 14 or so, some friends and I spent some time filling dead time in a maths class by learning digits of pi. I got to 75. Twenty years later, it’s still hanging about in my brain, wasting valuable brain cells.

Thank goodness it’s knowledge that is useful, rather than some pointless weird-arse geek party trick.

Click here to listen to 75 digits of pi. (171Kb, MP3, 21 seconds)