Wacky Programming Tales (Was Re: Why use Perl when we've got Python?!)
Matthew O. Persico
mpersico at erols.com
Sun Aug 15 15:22:02 EDT 1999
I once had to take over a MAJOR project from a consultant who was leaving.
This happened one week before my honeymoon. How major? Well it wrote and
sent settlement information for about 10-20% of the daily volume of equity
transactions in the entire United States.
Anyway, it took about six months of re-programming to evolve this morASS
(emphaisis mine) of code into something that behaved in a deterministic
fashion. As I hacked way at the underbrush, I kept coming upon all sorts of
references to a function called ocrap(). Eventually, I found the source
for the function (instead of just linking in the existing library) and
discovered it went something like this:
int ocrap(char *s) {
printf("Oh crap, what am I doing here: %s\n",s);
exit (5);
}
Abigail wrote:
>
> Brad Howes (bradh at mediaone.net) wrote on MMCLXXV September MCMXCIII in
> <URL:news:wjy7lmxbwh7.fsf_-_ at bradh.ne.mediaone.net>:
> &&
> && Hey! I actually worked on a project where someone did this! Also in their
> && funky include file was
> &&
> && #define AND &&
> && #define OR ||
> &&
> && It was the most bizarre thing I ever saw -- not so much the include file,
> && but the resulting code. As if a Pascal moths had come in, eaten at some
> && code and left little Wirth fragments sprinkled around. Has anyone else
> && encountered such strange programming behavior?
>
> Well, uhm, yeah. I once wrote a C program implementing red-black trees
> that almost read like English. Except for parens and the one #include
> line, no punctuation chars where needed. It had things like:
>
> if (I am red and my uncle is black)
> we do ....
>
> Unfortunally, that code didn't survive an extreme quota regime.
>
> Abigail
> --
> perl -MNet::Dict -we '(Net::Dict -> new (server => "dict.org")
> -> define ("foldoc", "perl")) [0] -> print'
>
> -----------== Posted via Newsfeeds.Com, Uncensored Usenet News ==----------
> http://www.newsfeeds.com The Largest Usenet Servers in the World!
> ------== Over 73,000 Newsgroups - Including Dedicated Binaries Servers ==-----
--
Matthew O. Persico
You'll have to pry my Emacs from my cold dead oversized
control-pressing left pinky finger. -- Randal L. Schwartz
More information about the Python-list
mailing list