Here (in reverse chronological order) are some of the more eyeball-worthy postings I've made over the years to alt.hackers, a fun, low-volume, and generally pretty high-quality newsgroup. All posts must either answer a question, or contain a hack. The group is self-moderated; if you don't know what that means, you can't post to it until you find out! *8)

From: chess@theogeny.com (David M. Chess) Subject: Welcome to 19100! Date: 04 Jan 2000 00:00:00 GMT Message-ID: <84tpeq$m88$1@news.btv.ibm.com> X-Client: Newz/Ponga (alpha) X-Trace: news.btv.ibm.com 947022106 22792 (4 Jan 2000 21:41:46 GMT) Organization: IBM Global Services North -- Burlington, Vermont, USA NNTP-Posting-Date: 4 Jan 2000 21:41:46 GMT Newsgroups: alt.hackers X-Complaints-To: news@btv.ibm.com The only Y2K bug I've found so far (aside from the grocery being out of non-skim milk and most kinds of bread last Sunday): I successfully updated my personal Website using my usual set of Perl scripts to synchronize the site with my hard drive on 2000/01/01. Then I went to re-modify one of the files I'd just modified, and the script died with a complaint from timegm() within Net::FTP. Surely not a Y2K bug in Perl itself, or in such a standard library? Examination of the code showed that in fact it wasn't. Perl is doing the right thing, and the code in Net::FTP, while not Y10K-compliant, could handle Y2K just fine. But when parsing the reply to "MDTM foo.bar" from the server, there was junk in one field. I did the MDTM (using "quote") manually, and the reply was roughly the very amusing "191000101114137". The initial substring there should of course be "2000", not "19100"; someone messed up in the obvious way. I wrote to the owner of the machine to tell him, but also coded up a workaround, by subclassing Net::FTP thus: # Net::FTP_DC.pm # # Subclass of Net::FTP just to work around the bug in the FTP server # where MDTM returns "19100" in the year field from MDTM commands. # package Net::FTP_DC; use strict; use vars qw(@ISA); use Time::Local; use Net::FTP; @ISA = qw(Net::FTP); 1; sub mdtm { my $ftp = shift; my $file = shift; return undef if not $ftp->_MDTM($file); my $message = $ftp->message; if ($message =~ s/^19100/2000/) { # fix bug! if (not defined ${*$ftp}{DID_FTP_BUG_MESSAGE_1}) { print STDERR "Hacking around '19100' bug.\n"; ${*$ftp}{DID_FTP_BUG_MESSAGE_1} = 1; } } $message =~ /(\d{4})(\d\d)(\d\d)(\d\d)(\d\d)(\d\d)/ ? timegm($6,$5,$4,$3,$2-1,$1 - 1900) : undef; } Definitely a hack! *8) One bell/whistle included, where it will send a warning to STDERR once per Net::FTP object that shows the bug. This is so I can notice when they fix it. DC site: http://www.davidchess.com/ blog: http://www.davidchess.com/words/log.html work: http://www.research.ibm.com/people/c/chess/ joke: this guy walks into a bar; bounces right off!
From: chess@us.ibm.com (David M. Chess) Subject: Babelfish invariance Date: 27 May 1999 00:00:00 GMT Message-ID: <7ijdn0$3a7o$1@news.btv.ibm.com> X-Client: Newz/Ponga (alpha) X-Trace: news.btv.ibm.com 927808032 108792 (27 May 1999 12:27:12 GMT)