Obfuscations Employed
Due to the nature of the contest, entries often employ strange or unusual tricks, such as using the C preprocessor to do things it was not designed to do, or avoiding commonly-used constructs in the C programming language in favor of much more obscure ways of achieving the same thing. For example, some quotes from 2004 winners include:
To keep things simple, I have avoided the C preprocessor and tricky statements such as "if", "for", "do", "while", "switch", and "goto".
We still aren't sure whether or not this is a useful program, but it's the first atomic fission we've seen in the IOCCC.
Why not use the program to hide another program in the program? It must have seemed reasonable at the time.
The program implements an 11-bit ALU in the C preprocessor.
I found that calculating prime numbers up to 1024 makes the program include itself over 6.8 million times.
Some ways in which contributions are notable include:
- The appearance of the source code, formatted to resemble images, text, etc., after the manner of ASCII art.
- Preprocessor redefinitions to make code harder to read.
- Self-modifying code.
- Worst abuse of the rules. In several years, an entry was submitted that was so patently absurd that it required a new definition of some of the rules for the next year. This is regarded as a high honor. An example is the world's shortest self-reproducing program. The entry was a program zero bytes in length that if run printed zero bytes to the screen (simply an empty file).
In the effort to take obfuscation to its extremes, contestants have produced programs which skirt around the edges of C standards, or result in constructs which trigger rarely used code path combinations in compilers. As a result, several of the past entries may not compile directly in a modern compiler, and some may even cause crashes.
Read more about this topic: International Obfuscated C Code Contest
Famous quotes containing the word employed:
“I think that for once the Sharps rifles and the revolvers were employed in a righteous cause.”
—Henry David Thoreau (18171862)