Please create an account to participate in the Slashdot moderation system

 



Forgot your password?
typodupeerror
Check out the new SourceForge HTML5 internet speed test! No Flash necessary and runs on all devices. ×
Slashback

Contests: Mind-Twisting Winners And Tiny Entrants 34

leob writes: "The names of the winners of the 15th International Obfuscated C Code Contest along with the one-line descriptions of the winning entries have been posted. The winners have been notified and are given some time to review and amend their entries. The source code of the winning entries will be released after January 15, 2001." I think I like Don Yang's entry best -- "A program that prints a program that prints a program that prints a program that prints the second program." Huh?! Those with smaller ambitions will be pleased to know (via Virtex) that there will be a new 5k Web contest contest for 2001. "The rules? Simple. Just create a Web page or site that is no larger than 5K, including all html and graphics. Oh, and there's no server-side scripting allowed (client side scripting is OK, though). Interested? The contest officially kicks off March 1, but why wait until then?" (Last year's iteration drew some pretty wacky entries.)
This discussion has been archived. No new comments can be posted.

Contests: Mind-Twisting Winners And Tiny Entrants

Comments Filter:
  • The program is on my homepage here [ucsd.edu].
  • Why didnt anyone ask this question? These look like the same stuff that was posted 1 year ago here. If you look at the Winning Entries you'd notice that it ends in 1998 (Which was the 14th contest), and thus by the magic of mathematics, the 15th contest would be on 1999. 16th on 2000 and the 2001 contest would be the 17th. Also if you hadnt noticed, there was no contest in 1997. Could someone clarify this?
  • i mean, come on, obfuscating c just ain't that hard. ;)

    Heck, I want to see the unobfuscated APL contest... :)
  • My one liner from 4 or 5 years ago that didn't make it:

    main(a,b,c,d,e,f,g,h){ return aa?main(!a,-24):!a?!b?b:main(-79,++b,a):!c?putchar (((c=main(a,b,1, main(a+1,b,0),0,0,0,0))&&a+79?c:0)["\n .,-+;=<(l!?t1aeCj2496GpA0&#$RBWMQ"]):c -37?f+h>>10?c:main(a,b,++c,f-h-(a+60)*3,g+g+(b+11) *7 ,d*d/80,d*e/80,e*e/80):1; }
  • on an old mainframe. Since there was nothing else to do whilst waiting for shift-end after all the production run had been taken care of, I made up the following for entertainment's sake:

    1. Select dataset at random.
    2. Stuff into input of PL/I compiler, with all warnings turned off.
    3. Link, load, run, and view output, if any.
    4. Use reverse compile option to produce source code from above module.

    As I said, I was bored. What came out the bottom of this process bears an amazing similarity to the obfuscated programs presented on the contest web site.

    Has anyone tried compiling web pages at random?

  • Forgot about those <'s

    main(a,b,c,d,e,f,g,h){return a<<1>a?main(!a,-24):!a?!b?b:main(-79,++b, a):!c?putchar(((c=main(a,b,1,main(a+1,b,0),0,0,0,0 ))&&a+79?c:0)["\n .,-+;=<(l!?t1aeCj2496GpA0&#$RBWMQ"]):c-37?f+h >>10?c:main(a,b,++c,f-h-(a+60)*3,g+g+(b+11)* 7,d*d/80,d*e/80,e*e/80):1;}
  • how do you come up with things like that? i mean, how do you plan/organize it?
  • Aside from this I often find the smaller something is the higher quality it is, at least in the computer world ;-)
    3D demo's especially and anyone who's seen the 70k "Please the cookie thing" demo might agree with me.
  • Can anyone find the source for the winner enteries?
  • some of the entries are really cool - such as the program whose output really depends on the phase of the moon, or the program that is its own build script and makefile.

    i only wish these contests went more into the extremes: use languages that really lend themselves to obfuscation - such as perl, the king of polymorphic semantics - or abuse the hell out of languages that were designed to be pristine clean - such as scheme or smalltalk (to a degree).

    i mean, come on, obfuscating c just ain't that hard. ;)
  • www.slashdot.org [slashdot.org] Now that was only about 40 bytes...
  • Is that these is real world code just as unreadable as these. I mean, these things look like binaries; they belong in museums, not in production.

    It's sad that it's so much easier to write obfuscated code than it is to write elegant code. Someone should start a contest for the most small and interesting code that is the most obvious and elegant.

    What we need is a language that promotes concise but readable code. Then these could be purely academic exercises. I work in Perl, and believe me, some of these could win clairity contests.

  • The program the prints the source thingy(read the article, you'll understand) reminds me of a program I wrote in Fortran once.....

    The teacher gave us the assignment and told us that it didn't matter if we did it his way, only that it worked. He (remaining namless) got on my bad side earlier that week by waking me up in the middle of my nap. To get back at him I put two or three format statements on each line of code. To further anger him, I used half a dozen subroutines just to set up the Read statements.

    Oh Well

    {/. should put a time of day filter, I'm sure that 90% of the crap posted wouldn't be if posts weren't done at 4 AM}
  • I love contests like this and with people posted more like it. I know a lot of people out there who are creative and work well with computers but need a challenge.
    This is just the thing to get those creative juices flowing!

  • by Glowing Fish ( 155236 ) on Wednesday December 27, 2000 @03:09AM (#539988) Homepage

    If you were watching the Harlem Globetrotters play basketball, would you complain that they wern't getting to the basket as quickly as possible?

  • I heard a rumour that FP is hiding the source at www.transbarbiedollhautecouturelover.org
  • http://mindprod.com/unmain.html will answer your question. To put it short it is a powerfull weapon in the war Developers VS Maintainer.
  • The point is to have fun. Anyone can write drool-proof code (that's code that is so easy to understand that even a baby can do it. usually involves commenting every line). It's difficult to write code that looks as if an epileptic cat jumped on the keyboard that does something. (It's easy to write garbage code that does nothing.)

    Ever seen the Obfuscated "Twelve Days of Christmas" code? It not only looks like it doesn't do anything, it looks like it would be impossible to do anything. Much less print out a single character. But it does.

    It's a challenge. Why do people climb mountains? Because they're there. Why do coders write obfuscated code? Because they can.

    Kierthos
  • the easiest way to code like a dying cat is to omit tab stops and CRs. One of my coworkers went to edit a page of mine that I DIDN'T write in our 'holy grail' thas is Cold Fusion Studio. He saw what he called a garbled mess. I had multiple TDs on one line(heaven forbid) and I didn't explicitly state what HTML version I was coding for in the first line. Oh well, he lived

    Enuf Rant 4 Now
  • I think I like Don Yang's entry best -- "A program that prints a program that prints a program that prints a program that prints the second program." Huh?!

    Hmm sorta sounds like a program I wrote a while back in perl and c and shell script that does something like this. its at http://www.irni.net/software.php3 [irni.net].
  • {/. should put a time of day filter, I'm sure that 90% of the crap posted wouldn't be if posts weren't done at 4 AM} 4AM in what time zone exactly?
  • Several reasons. One is for the obvious reason that people do crossword puzzles; it's an interesting puzzle, and it's recreational.

    Another is for the other reason that people do crossword puzzles; it is a way to exercise and stretch your use of a language, and that makes you better at using the language *even in non-obfuscated contexts*.

    Another is that studying *why* bad code is hard to read helps you avoid the pitfalls that lead to it.

    In short, it's fun and educational.
  • we did tons of programs like this in Scheme...functions that return functions that return finite functions that make variables "obsolete"...
  • What we need is a language that promotes concise but readable code.

    I believe that was one of the goals of Python [python.org]. If nothing else, it forces you to indent your code properly.

    --
  • by Anonymous Coward
    What an obfuscated web page.
  • I sorry that a parcel irony never arrived at your door.

    My hole point was that why post the stuff before we can see the source-code. There isn't much fun in just the name of the winners.
  • It doesn't seem to be out yet. Reading the old entries is fun, though, even if you've read them before. Most of the Wesley ones are brilliant.
  • Thank you very much. It seems like your out of x-mas spirit.

    My hole point was that why post the stuff before we can see the source-code. There isn't much fun in just the name of the winners.

    - Don't serve irony to angry people
  • some of my undergrad profs had been long-time lisp hackers, and i got to see some really crazy code in AI classes. not that it was syntacticaly obfuscated, the way perl often ends up being, but they were able to cram an incredible amount of semantics into tiny, clean procedures. really cool stuff.

    but then they started introducing macros, and we were back to syntactic obfuscation. :)
  • . Anyone can write drool-proof code (that's code that is so easy to understand that even a baby can

    Really? that's the opposite of what OO experts say. I forget which one said "Anyone can write code that the machine can understand. The trick is to write code that another programmer can understand."

  • Page under 5k
    communicates so little
    downloads quickly, though

  • how do you come up with things like that? i mean, how do you plan/organize it?

    It's a bit difficult to do if you don't plan. I started by coming up with the idea of what I wanted the program to do. I then wrote the program out. Then I stepped back and tried to figure how could obfuscate it by doing things like using recursion instead of loops and then seeing if I could fit all my recursion into one function, then seeing if all my recursion and logic would fit on one line, and then I modified the main function so I wouldn't have to make a fuction call to get things started.

    There are a lot of ways that you can obfuscate as well, like giving all of your variables similar names like combinations of o, O, and 0 or i, I and 1. You can also add redudant information like !I||!1.

Hard work never killed anybody, but why take a chance? -- Charlie McCarthy

Working...