[net.unix-wizards] Disgusting Code

cim1@pyuxv.UUCP (G. Bogatko) (02/06/86)

	In music_land, there exists the "Max Reger Society".  Once a year, they gather together and give out an award to the person who can write the most
revolting chord progression while still maintaining even the smallest link
to the syntax of tonal music.

	Why don't we do the same thing, and have a "Most Disgusting Code"
award.  The rules are simple.  Just produce your favorite bit of
un-maintainable, or un-readable code. (something that would be too much for
the puzzle book).  Obviously, it must compile.

	Besides being a goof,  all of us might also learn some more of the
inner workings of C.  

	Here, to start the ball rolling, is my entry.

/* nasty.c */

main()
{
int a;

	printf("%s me\n",(a=getchar()-48)<4?&(a["\0\005\015\022"]["help\0abandon\0save\0lose"]):"wrong");
}

George Bogatko

gwyn@brl-smoke.ARPA (Doug Gwyn ) (02/09/86)

In article <168@pyuxv.UUCP> cim1@pyuxv.UUCP (G. Bogatko) writes:
> ...
>	Why don't we do the same thing, and have a "Most Disgusting Code"
>award.  The rules are simple.  Just produce your favorite bit of
>un-maintainable, or un-readable code. (something that would be too much for
>the puzzle book).  Obviously, it must compile.

Please, let's nip this in the bud.  It is all too easy to
find examples of disgusting code; there is no need to burden
the net with such garbage.  Some people even have to pay to
receive the garbage; surely that wouldn't be nice..

boykin@datagen.UUCP (02/09/86)

Seeing how easy it is to produce "disgusting code" the last thing
we need is a "Most Disgusting Code" award.  With good code (defined
as portable, readable and maintainable) being much rarer, much more
valuable to look at (and learn from), and (unfortunately) alot harder to find.
Perhaps what we need is a "Best Code I've ever seen" award.

Learning the "tricks" from code which is admittedly "disgusting" (and which
won't compile under most compilers) isn't the kind of trick
that you should be striving to learn.

Joe Boykin
Sr. Project Leader
Data General Corp.
Distributed Systems Group
{allegra, ihnp4, decvax}!datagen!boykin

goldste@uthub.UUCP (Jack Goldstein) (02/10/86)

> 
> 	Why don't we do the same thing, and have a "Most Disgusting Code"
> award.  The rules are simple.  Just produce your favorite bit of
> un-maintainable, or un-readable code. (something that would be too much for
> the puzzle book).  Obviously, it must compile.
> 
     Such a contest was held in net.lang.c during the summer.  I don't know
if people in that group want to see it again but PLEASE keep it out of
net.sources.  That is certainly not the type of article that belongs in
this newsgroup.  People who wish to submit entries to this 'contest':  Please
remove net.sources from the Newsgroups list.

  Jack Goldstein
  {decvax,allegra,ihnp4,linus,utzoo,uw-beaver}!utcsri!uthub!goldste

chongo@nsc.UUCP (Landon Noll) (02/11/86)

In article <168@pyuxv.UUCP> cim1@pyuxv.UUCP (G. Bogatko) writes:
 >
 >	Why don't we do the same thing, and have a "Most Disgusting Code"
 >award.  The rules are simple.  Just produce your favorite bit of
 >un-maintainable, or un-readable code. (something that would be too much for
 >the puzzle book).  Obviously, it must compile.

Such a thing already exists.  It is called the International Obfuscated C
Code Contest already in its 3rd year.  Rules and winners of the contest
will be posted to this newsgroup and will be published in a computer mag.
as well.

Watch this space for the 1986 contest rules in the comming weeks.

chongo <..> /\oo/\

cim1@pyuxv.UUCP (G. Bogatko) (02/11/86)

I apologize for having insulted so many people.

Consider the article canceled.

George M. Bogatko

chinn@butler.UUCP (David Chinn) (02/11/86)

>Why don't we do the same thing, ... a "Most Disgusting Code" award....

A trade (Info-world? DecWorld?, DecProfessional?) published the
results of the second annual "Obfuscated C-Code Contest"a couple of
months ago.

At one time I had a copy of the article, and the first, second,
third and honorably mentioned entries.  They were pretty disgusting.

I can't seem to find my copy of the article, but posting the results
would stimulate the creative flow of juices in us all.

    ... uw-beaver                                david m chinn
	   !{tikal,teltone}                      box 639
	       !dataio!butler!chinn     	 redmond,  wash 98073

(I can't think of a clever quote right now because I've a headache)

libes@nbs-amrf.UUCP (Don Libes) (02/12/86)

> A trade (Info-world? DecWorld?, DecProfessional?) published the
> results of the second annual "Obfuscated C-Code Contest"a couple of
> months ago.
> 
> At one time I had a copy of the article, and the first, second,
> third and honorably mentioned entries.  They were pretty disgusting.
> 
> I can't seem to find my copy of the article, but posting the results
> would stimulate the creative flow of juices in us all.
> 
>     ... uw-beaver                                david m chinn
> 	   !{tikal,teltone}                      box 639
> 	       !dataio!butler!chinn     	 redmond,  wash 98073
> 

Micro/Systems Journal published the 1st (1984) results of nsc!chongo's
Obfuscated C Code Contest in their Sept '85 issue.  The 1985 winners
will be printed in the May '86 issue.  I believe chongo will also
be presenting these at a BOF at the Summer Usenix.

Don Libes            {seismo,umcp-cs}!nbs-amrf!libes

boyd@inset.UUCP (02/13/86)

But we have net.sources?

Seriously, there's enough bad code already.


Boyd Roberts

+++
+   ..!mcvax!ukc!inset!boyd
+   boyd@inset.co.uk
+   boyd@basser.oz
+
+++ "Isn't that kind of severe?"

kludge@gitpyr.UUCP (Scott Dorsey) (02/17/86)

In article <168@pyuxv.UUCP> cim1@pyuxv.UUCP (G. Bogatko) writes:
> ...
>	Why don't we do the same thing, and have a "Most Disgusting Code"
>award.  The rules are simple.  Just produce your favorite bit of
>un-maintainable, or un-readable code. (something that would be too much for
>the puzzle book).  Obviously, it must compile.

   This would not be a fair contest.  I could send in a couple of the
assignments for our introductory programming classes and win easily.
I'm talking 
  IF A>B THEN ELSE WRITE('HI') 
 In Pascal here.  I wouldn't dare put anything worse up without ROT13.

-------
Disclaimer: Everything I say is probably a trademark of someone.  But
            don't worry, I probably don't know what I'm talking about.

Scott Dorsey
ICS Programming Lab, Georgia Insitute of Technology, Atlanta Georgia, 30332
...!{akgua,allegra,amd,hplabs,ihnp4,seismo,ut-ngp}!gatech!gitpyr!kludge