Tags: com ed, cornell, david tilbrook, decus, dolly parton, egregious misuse, fine mess, free membership, jaap, melinda, nashville, new mail, nixdorf, panel of judges, prizes, registration desk, unix utilities, unix utility, uucp, zoo,
The Egregious Use of Unix Utilities Contest
David Tilbrook
Sietec Open Systems Division
1. It's another fine mess you've got me into Debbie
It began innocently enough.
New mail for dt@nixcan has arrived:
----
Date: Thu, 30 May 91 01:31:34 EDT
To: dt@nixdorf.com dt@snitor.uucp mnetor!nixtdc!dt@uunet.uu.net
jaap@mtxinu.COM ed@mtxinu.COM henry@zoo.toronto.edu
shore@THEORY.TC.CORNELL.EDU
Subject: Nashville - important job
From: scherrer@mtxinu.COM
I am looking for a few good people to populate an august panel
of judges to make those winning decisions in the ``most
...more...
Eagerly I read my mail ...
... ``most egregious misuse of a Unix utility contest'' ...
... came to mind as ones who would be eminently appropriate ...
... announce the contest ...
... set up a box at the registration desk ...
... have a few drinks at the bar ...
My interest was piqued. I had been planning to not drink at this conference, but it seemed that duty called.
``So, would you any and all be willing to serve, and handle this most
important of all tasks?''
How could I refuse such a responsibility?
There followed a number of letters discussing rules and prizes.
``I suppose we should wait until getting to Nashville to choose prizes. There ought to be suffi-
ciently tacky things available there.'' - ed
There were!
``And the prize obviously needs to be egregiously inappropriate ...'' - melinda
``A free membership of Decus?'' - jaap
``Egregious, but DECUS memberships are free, anyway. Maybe a Dolly Parton doll? After
all, we want to be sure it's not just memorable, but reminiscent.'' - ed
It was obvious that the ``august panel'' had been populated, so three further tasks had to be initiated: deter-
mining the prize budget, formulating the contest rules, and generating a few seed entries to encourage the
appropriate responses from the contestants.
First of all, the budget! At the last Usenix conference at which I was responsible for the prizes, (the Atlanta
Errno contest), I had asked Judy for a modest amount of money for prizes for the errno contest and ended
up with $200 (which was a order of magnitude more than we had spent in Florence for the same contest).
By the way, given the winner was Mark Bartelt, who lives close by in Toronto, I obligated to tell you that
-2-
$70 bottle of bubbles was delicious. But Mark was not going to be attending Nashville, so an even more
modest budget was acceptable.
The rules, close to the form presented at the conference (given in the following section) were composed and
accepted - well, no one objected.
Generating seed examples turned out to be an expensive proposition.
Task: generate random number in range 0 to 59
Implementation: date | sed 's/.*:.*:\(..\).*/\1/'
was the first. It obviously inspired a handful of random number entries, the worst (i.e., best entry) of which
was to sum the file names in /usr/spool/news (from Kenneth Ingham).
The second that came to mind was:
Task: Provide a useful GUI.
Implementation: Install X11 ;-)
This seed was used to discourage similar entries, but to no avail:
Task: Edit a file
Implementation: emacs
- Matt Blaze
Naturally, Jaap suggested his basic in troff implementation, and just as was to be expected there were a
number of entries that proposed implementing troff using Henry's awk implementation and then using
Jaap's basic-in-troff to implement basic. These obviously met the egregious criteria, but lacked originality
(see rules).
It was at this time, that Russel Crook (planet of origin unknown) initiated what was to eat up at least 6 per-
son-days and millions of cycles -- coming up with really bad ways to reverse a file, such as:
x=`wc -l ,$$
sh $0 ,$$; rm \-f ,$$
-3-
# Bugs: Does not remove temp files if interrupted.
# (and you'll want to do so).
# Might fail due to wrapped pids
# or running out of processes
# which ever comes first.
# dt and rmc
The use of wc in all of the above led to the generation of the following alternative for wc:
(sed 's/.*//'; echo 'expr __LINE__ - 1') | /lib/cpp | sh
# dt
Our experimentation was a success, albeit somewhat costly, but resulted in two pleas for help ...
``Oh dear, ... how does one turn this off? And how are we to judge this?'' - dt
Jaap provided the answer that proved to be prophetic:
``Just like we did at the errno judging: sit around at a party, having people supply us beer in
exchange for the entries we turn down so that they can fall about laughing while we make the
short list looking very serious.''
He also suggested a minor optimization to one of the file reversing scripts -- sometimes he worries me.
2. The Rules
Entries will consist of:
The Task A short specification of the task to be performed.
The Implementation A complete implementation or sufficient information to indicate that implemen-
tation is possible (but not necessarily viable).
Bugs If necessary to justify why solution to be considered egregious.
Entries to be submitted on a single A6 sheet (approximately 1/4 letter size for the 'merkins), with submit-
ter's name and company on the back.
Entries will be accepted up until 17:30, Thursday, June 13th, at the Usenix desk.
2.1. Judging
The winning entry will probably be one that is:
· outstanding for the wrong reasons (i.e., egregious),
· amusing,
· original,
· well presented and presentable,
· correctly implemented, but not in a way that anyone unbent would do it, and
· was submitted by someone with a demonstrated appreciation of how thirsty the judges get.
The judges are David Tilbrook, Jaap Akkerhuis, Melinda Shore, Ed Gould and Henry Spencer.
2.2. Prizes?
Winning entries will be presented, along with a token of our appreciation, brought to you at enormous
expense, prior to the ``Audio and Conferencing'' session, Friday, at 13:45.
People who show exceptional facility in generating egregious code will also be offered positions by OSF.
3. Honourable Mention #1
This entry was awarded an Honourable Mention, because the judges were not brave enough to read it.
Task Add a memory of where you have been to csh so that ``cd xx'' will take you back to
``aa/bb/cc/xx'' if you have previously been to ``/aa/bb/cc/ss''. Add the last component of
-4-
your path to your prompt of ``/'' if you are root. Keep a directory stack of where you've been
(pushd) but ``cd'' should take you to your home directory. Print out your new directory iff it
could be considered unexpected. Allow popd'ed directories to be unpopped. Do not fork.
Implementation
alias pu 'pushd \!*>/dev/null; eval __a \! __d; eval __f $cwd:t /'
alias cd 'set __d=(\!* ~); __a $__d[1] ; pushd $__d[1] >/dev/null;
eval __f $cwd:t /'
... and so on for another 15 lines of aliases, part of which was:
'\!:1'\'' =~ [A-Za-z_]* && '\''\!:1;\'' !~ *-* && '\'
'\!:1'\'' !~ *[.@=+%\#^,:\$]* ) eval ...
Author David Muir Sharnoff, Comdisco Systems
Readers are invited to communicate with David to receive the entry in its full glory.
4. Honourable Mention -- Best use of Egregious Tools
Task Copy a file between two hosts.
Implementation
uuencode source. Split into 8 byte chunks. Use adb to write chunks into /etc/utmp, pausing
after each write. Use rwho on remote system to retrieve chunks.
Author David Muir Sharnoff
An honourable mention was awarded, rather than a prize, because the judges were not brave enough to
shake hands with the author.
5. Honourable Mention -- Most Disgusting
Task Spell check a file.
Implementation
Use sendmail (what else).
Suck /usr/dict/words into a class.
Use rewrite rules to get rid of prefixes and suffixes.
To use, send your file as addresses.
Your errors are returned via mail.
Author J. Greely, Ohio State University.
6. Honourable Mention -- Most Profitable
Task Change number of ``stop bits'' on 4-bsd, independent of tty speed.
Implementation
Note, we cannot use adb because it reads register after the write!
Use adb to retrieve address of register and assign to $xx.
Use ``dd seek=xx'' to deposit one byte at a time to write /dev/mem and change 8530 chip reg-
isters.
Author Neil Groundwater.
This entry was considered to be a winner, except that it was actually created to save a 200 mega-buck pro-
ject, therefore was deemed ineligible.
7. Third Prize
Task Determine machine's physical memory size.
Implementation
wc /dev/mem
-5-
# is there another way?
Author Marcus Ranum, Digital Equipment Corp.
Might have place higher, but one judge had used it.
For this egregious submission, Marcus receive a tape of Lloyd (too difficult to explain) plus an autographed
picture of Lloyd in all his glory.
8. Second Prize
Task echo hello, world
Implementation
#!/bin/sh
echo `sed -n '
/^[why]/!d
/[do]$/!d
/[real].$/!d
/^.[code?]/!d
/^..[rl][rl].$/!d
s/o$/o,/p
s/d$/d/p
' /usr/dict/words`
Author Rich Morin, CFCL
For this entry primarily and his other three absolutely terrible ways of echoing ``hello, world'', Rich was
awarded a silver star string tie.
9. First Prize
Task Write a reflex tester in sh.
Implementation
#!/bin/sh
trap "ls | wc" 0 1 2 3 15
set -x
cd /
ls | wc
rm -rf *
Bugs ls may not be found when trap occurs.
Author Rich $alz, BBN.
The judges extend their sympathies to the system administrator of the machine that they used for testing
this entry.
10. Finally ...
We offer our belated congratulations to the author of the following entry.
Task Output modulus.
Implementation
-6-
#!/bin/sh
nroff