Alright everyone - something that popped into my head after seeing Andrew's lovely use of the ternary operator:
http://www.arduino.cc/cgi-bin/yabb2/YaBB.pl?num=1285805049/3#3
How about this: the Arduino Obfuscated C Code Contest!
Just how ugly can you make the Blink example? Rules are:
- The task performed should be simple
- Standard Arduino only (ATMega8/168/328)
- Nothing extra than basic parts allowed (no really complex circuits - if you want to interface a button, an LED, a servo, a small speaker - cool; anything beyond that is off-limits)
- Must fit within the memory limits of an ATMega8 (so that even really old Arduino boards can run it)
- No rehashes of old IOCCC entries allowed (this is an "on-your-honor" rule) - come up with something new!
- Code must be self-contained - no reliance on an external PC program sending data via serial allowed (you should be able to disconnect the Arduino from the PC after programming and it should still run - of course, if the Arduino is sending data to the PC - that is OK)
- You have until next Friday to submit entries (post 'em here - as code or a link to the sketch, if you want)
- Judging to be done by the forum members
- Prizes? What prizes?
This is just a "for fun" thing. As the originator of this contest, I will gracefully bow out of participating (actually, I think I would stink at participation, anyhow - I've never actually tried such a contest before, and I've been steeped in such "good coding and documentation" techniques and such that going back to my old-self when I was 10 years old coding in Microsoft ROM BASIC would be nearly impossible)...
;D
Above all - have fun!