[comp.lang.c] A Non-Obfuscated C Code Contest

socha@drivax.UUCP (Henri J. Socha (x6251)) (06/26/87)

In article <9185@amdahl.amdahl.com> chongo@amdahl.amdahl.com (Landon Curt Noll) writes:
>X
>X          1987 International Obfuscated C Code Contest Winners
>XObfuscate:  tr.v.  -cated, -cating, -cates.  1. a.  To render obscure.
>X	b.  To darken.  2. To confuse:  his emotions obfuscated his
>X	judgement.  [LLat. obfuscare, to darken : ob(intensive) +
>X	Lat. fuscare, to darken < fuscus, dark.] -obfuscation n.
>X	obfuscatory adj.

    [ etc. with many lines of truly unreadable C code for our amusement.]

  Hey! It's neet, I enjoyed it.

But it reminds me of all those people who screamed loudly at
  APL  programmers because of the supposed emphasis on  1-liners.

Now to not get into any BIG arguments or FLAMES about the good/bad/indifferent,
I see too many programmes and even books that show some pretty UGLY C.

	Uncommented, undocumented and unsupportable.

Now, how many of the winners would be willing to hand out an example of
well written maintainable C and share it with the net?  
To prove they can do it right!

I DARE YOU!   I DOUBLE DARE YOU!

This could be just as entertaining and also help improve all our programming
styles.

Rule #1:  Must use typedef, enum, full function prototyping, etc.

Rule #2:  Must be compileable under a STRICT  ANSI C compiler.
-- 
UUCP:...!amdahl!drivax!socha                                      WAT Iron'75
"Everything should be made as simple as possible but not simpler."  A. Einstein

jfh@killer.UUCP (John Haugh) (06/30/87)

Sounds like a truly wonderful idea except my compiler doesn't support
function prototypes and many other wonderful ANSI concepts.

So, how about just maintainable, documented, readable, etc.  Leave
out the ANSI garbage.

- John.