Path:
cis.ohio-state.edu!zaphod.mps.ohio-state.edu!rpi!uwm.edu!linac!att!princeton!onion.princeton.edu!rjcFrom:
rjc@onion.princeton.edu (Raymond Chen)
Subject: Re: internet soda
Organization: Princeton University
Date: Mon, 30 Mar 1992 00:27:33 GMT
 
From my personal archives of alt.folklore.computers.
 
From: tgl@zog.cs.cmu.edu (Tom Lane)
>Newsgroups: alt.folklore.computers
Subject: The only Coke machine on the Internet
Date: 11 Dec 89 15:45:34 GMT
 
This story is old news to ex-CMU folk, but may be amusing to others.
 
Since time immemorial (well, maybe 1970) the Carnegie-Mellon CS department
has maintained a departmental Coke machine, which sells bottles of Coke
for a dime or so less than other vending machines around campus.  As no
Real Programmer can function without caffeine, the machine is very popular.
(I recall hearing that it had the highest sales volume of any Coke machine
in the Pittsburgh area.)  The machine is loaded on a rather erratic
schedule by grad student volunteers.
 
In the mid-seventies expansion of the department caused people's offices
to be located ever further away from the main terminal room where the Coke
machine stood.  It got rather annoying to traipse down to the third floor
only to find the machine empty; or worse, to shell out hard-earned cash to
receive a recently loaded, still warm Coke.  One day a couple of people got
together to devise a solution.
 
They installed microswitches in the Coke machine to sense how many bottles
were present in each of its six columns of bottles.  The switches were
hooked up to CMUA, the PDP-10 that was then the main departmental
computer.  A server program was written to keep tabs on the Coke machine's
state, including how long each bottle had been in the machine.  When you
ran the companion status inquiry program, you'd get a display that might
look like this:
 
                EMPTY        EMPTY        1h 3m
                COLD        COLD        1h 4m
 
This let you know that cold Coke could be had by pressing the lower-left
or lower-center button, while the bottom bottles in the two right-hand
columns had been loaded an hour or so beforehand, so were still warm.
(I think the display changed to just "COLD" after the bottle had been
there 3 hours.)
 
The final piece of the puzzle was needed to let people check Coke status
when they were logged in on some other machine than CMUA.  CMUA's Finger
server was modified to run the Coke status program whenever someone
fingered the nonexistent user "coke".  (For the uninitiated, Finger
normally reports whether a specified user is logged in, and if so where.)
Since Finger requests are part of standard ARPANET (now Internet)
protocols, people could check the Coke machine from any CMU computer by
saying "finger coke@cmua".  In fact, you could discover the Coke machine's
status from any machine anywhere on the Internet!  Not that it would do
you much good if you were a few thousand miles away...
 
As far as I know nothing similar has been done elsewhere, so CMU can
legitimately boast of having the only Coke machine on the Internet.
 
The Coke machine programs were used for over a decade, and were even
rewritten for Unix Vaxen when CMUA was retired in the early eighties.
The end came just a couple years ago, when the local Coke bottler
discontinued the returnable, coke-bottle-shaped bottles.  The old machine
couldn't handle the nonreturnable, totally-uninspired-shape bottles, so it
was replaced by a new vending machine.  This was not long after the New
Coke fiasco (undoubtedly the century's greatest example of fixing what
wasn't broken).  The combination of these events left CMU Coke lovers
sufficiently disgruntled that no one has bothered to wire up the new
machine.
 
I'm a little fuzzy about the dates, but I believe all the other details
are accurate.  The man page for the second-generation (Unix) Coke programs
credits the hardware work to John Zsarnay, the software to David Nichols
and Ivor Durham.  I don't recall who did the original PDP-10 programs.
 
-- 
                                tom lane
Internet: tgl@cs.cmu.edu
UUCP: <your favorite internet/arpanet gateway>!cs.cmu.edu!tgl
BITNET: tgl%cs.cmu.edu@cmuccvma
CompuServe: >internet:tgl@cs.cmu.edu
 
 
 
Newsgroups: alt.folklore.computers