Donald E. Knuth Rules

He hasn’t had an email address since 1990 and he wrote one of the 12 most significant scientific monographs of the 20th century. He rules.
This isn’t news but in case you haven’t seen it here is the classic Knuth (Ka-NOOTH) quote:

On March 22, 1977, as I was drafting Section 7.1 of The Art of Computer Programming, I read four papers by Peter van Emde Boas that turned out to be more appropriate for Chapter 8 than Chapter 7. I wrote a five-page memo entitled “Notes on the van Emde Boas construction of priority deques: An instructive use of recursion,” and sent it to Peter on March 29 (with copies also to Bob Tarjan and John Hopcroft). The final sentence was this: “Beware of bugs in the above code; I have only proved it correct, not tried it.”

Donnie Darko

I saw Donnie Darko last night.

And as soon as I got out I wanted to know what possible explanation there could be for the story and (most importantly) for the ending. It took me a long time to come up with any satisfactory explanation so for the benefit of others here are the sites that really helped:

28:6:42:12 an MSN group that has (amongst other things) the complete text of ‘The Philosophy of Time Travel’

The best explanation I could find (I’m not entirely happy with it but as the film was clearly left ‘open’ it may be the best I’m going to get it)

Its also clear to me from reading the comments of others that the director’s commentary track on the DVD goes a long way towards giving a full explanation (but doesn’t quite give you everything). I plan to get hold of the DVD and will post another story if my findings are interesting enough

Converting Month Number to Month Name In Java!

How long have I wanted to know how to do this! So long so many months! Finally:

import java.text.*;

String getMonthForInt(int m) {
    String month = "invalid";
    DateFormatSymbols dfs = new DateFormatSymbols();
    String[] months = dfs.getMonths();
    if (m >= 0 && m <= 11 ) {
        month = months[m];
    }
    return month;
}

Praise the lord! Praise the lord!

iPod for Windows

So, I finally gave in and bought an iPod. The release of the Windows version (the difference is only in software supplied). Here’s some things that surprised me (other than this everything you’ve read is true). Observations refer to 20GB Windows version purchased from Micro Anvika on Tottenham Court Road, London, UK.

  • Spinning wheel in the centre is not like all those I played with in displays in stores – it is solid state and in some way touch-sensitive. Its just as cool if not more so and will probably last longer now
  • Formatted capacity is actually 18.xGB but holds more than the stated 4000 songs (I think they’re estimating for 5min songs at 192kbit/sec whereas my songs are shorter on average and mostly encoded at the more common 128kbit/sec)
  • The Windows software (MusicMatch jukebox) is crap. Really slow to recognize the iPod and with my setup only transfers at about 1MB/sec (MUCH less than the ~50MB/sec I was expecting) – but there is 3rd party software that’s better. I expect the iTunes/Mac experience is a lot better than any PC alternative though
  • Transfer speeds are generally lower than I expected – I managed to get 4MB/sec with ephPod and others online have reported up to 10MB/sec. I’d love to hear from anyone getting nearer to the apple quoted speeds of up to 50MB/sec
  • Because the HDD in the iPod is formatted to FAT32 for Windows but HFS+ for Mac you can’t take your iPod between Macs and PCs unless you use something like XPlay on the PC
  • I now have to sort out all the ID3 tags on my MP3z as iPod relies solely on them to categorize your music. There are tools to help you do this (its MusicMatch Jukebox’s only strong point) but its still a pain with 4000 MP3s to sort out
  • PCMCIA firewire cards can’t pass power through so the battery drains when using it connected to a laptop

All that said, its an amazing machine and the UI is just fantastic. Once its plugged into your computer its less fun – especially if you’re using it on two machines like I am. But the thing in and of itself is just brilliant. And the “wow” factor from the non-technical is quite funny too: “What have you got on it?” “Well, name something – I’ve probably got it”.

If you’ve got any questions you can’t find the answer to I’d be happy to answer them for you: bakert+ipod@gmail.com

Democratization of Song Titles

I try not to alter the names of the files that I download or any of their metadata (the ID tags in MP3s for example) so that it is obvious to all filesharing programs that the file I have is the same file as others

But this does lead me to some metaphysical wranglings. For example, ‘Dreadlock Holiday’ by 10cc is more often called ‘I Don’t Like Cricket’. ‘Flagpole Sitta’ by Harvey Danger is now called ‘Paranoia’ after its best line (Paranoia! Paranoia! Everybody’s coming to get me!) or ‘I’m Not Sick But I’m Not Well’ after the chorus, but only rarely ‘Flagpole Sitta’ (and the spelling varies there)

So my question is, should I leave the files as they are so that they are more likely to be found by other searchers and also identified as the selfsame files for multiple-source downloads? Or should they be altered to be more accurate? Will ‘Cross the Tracks’ by Maceo and the Macks forever be known as part of the Snatch soundtrack?

And it goes further than song titles – democratization is now spelt with a zed because US English is the language of the internet. I’ve recently changed my programming style so that variables and text within my programs are spelt the American way. Variables called colour or organiser are now called color and organizer

I suppose the real question here is: are these lowest-common–denominator changes? Or does this represent the refinement of the polyglot of human thought into the single über-language? I leave that to y’all

Ares – More Freeware Filesharing

Alberto Treves of Softgap wrote to me about their freeware filesharing program Ares

He says:

Ares is a next generation Gnutella client being able to search and quickly download any type of file.
Ares can find music, movies , games , images, documents…
Ultrapeer protocol grants low bandwith usage.
Ares features multiple sources downloads, an integrated audio/video player with playlist, a web-browser and an easy to browse library to manage your shared content.
Ares is FREEWARE and doesn’t install spywares or co-bundled softwares.

I downloaded the software and it is very similar to KaZaALite but somewhat cleaner and better implemented (you can actually sort by all the clickable columns in the transfer window, for example). As for the network there’s certainly a lot on it – not sure if its as good as KaZaA though.

Ares’ main advantage over KaZaALite is in usability. Ctrl-Click and Shift-Click for multiple download cancel works and little touches like that can make all the difference. Give it a spin

All these notes added to my filesharing page where there is also a list of filesharing programs

Update 2004-04-24: Changed link as Ares now has its own homepage at aresgalaxy.org.