[net.sources] 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

bart@reed.UUCP (Bart Massey) (02/09/86)

IN Article <168@pyuxv.UUCP>, George Bogatko says:
> ... 
> 	Why don't we ... have a "Most Disgusting Code" award?
> ... 
> 	Here, to start the ball rolling, is my entry.
> ... 
> 	printf("%s me\n",(a=getchar()-48)<4?&(a["\0\005\015\022"]["help\0abandon\0save\0lose"]):"wrong");

Sorry to pick your article to pick on, but
(strike match, open valve, FLAME ON)

I CAN'T STAND IT ANY MORE!!!!!!  It's not just that we archive net.sources
here (although we do, and it's filling up even faster than one would expect).
It's not even just that I'm sick and tired of three of four net.sources
articles being something other than useful sources (although I am).
It's the fact that no one even bothers to complain any more!  The legitimate
users of this group (the people who want to post and receive useful sources)
seem to have given up altogether.

But it's not strictly anyone's fault.  My Followup-To line should indicate
one major problem.  NET.SOURCES.D is needed badly!!   Then those of us who
want to see just the new sources can -- the only purpose of newsgroups!

By the way, Mr Bogatko, your "idea" happens about every six months in
net.unix-wizards and other groups.  This is one of the reasons I don't
subscribe to them.  Nothing personal -- I guess your site doesn't keep
news archives.  But I just thought you should know...

(cover eyes, step forward, close valve, flame off...)

My apologies for posting this diatribe to net.sources.  I guess I just
thought I'd make one last-ditch attempt at heading back toward "all sources"
in this group.  Please move discussion at least to net.sources.bugs
at this point (at least it's a discussion group, although clearly not
the right one.  Is there any right one in existence?  Am I missing something?)

					Wearing out the 'n' key...
						Bart Massey
						..tektronix!reed!bart

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)

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?"