Write a snippet, a function, a programm, ... that is obfuscated in a way that it looks clear at the first sight that it does something else.
For example: write a bit of code that adds two number, but when you ask someone "what does it do?", he will tell you it prints "Hello, World!".
- The code must be readable for someone who roughly knows the language you use (avoid intrinsic obfuscated language like APL, in your own interest).
- The code must do something unexpected that the reader initially couldn't predict.
- When you ask different readers, they must have the same (wrong) opinion about what the code does.
- Please read other contestants' codes during maximum 10-20 seconds, just to have a good idea of what happens there.
- Add a comment to the answer saying what you think the code does. If the answer you want to give is already there, simply +1 the comment. (if you miss that answer and add another comment, don't worry, it won't be counted as another answer).
- The points will be awared this way: (
totalOpinion(see example below).
- Rate other contestants with fairplay and don't comment your own code.
- Only add useful comments. Avoid "I don't know" and "good one!", they are not taken into account for the rating, but it's the code and not the ratings that must be obfuscated.
The snippet adds two numbers. The comments say:
(3) It displays "Hello, World!"
(1) It substracts 2 numbers.
(2) It adds 2 numbers.
The total amount of points is the maximum number of opinions (3) - the number of good guesses (2) divided by the total amount of guesses (3 + 1 + 2 = 6). Result: (3 - 2) / 6 = 1/6 = 16.67%.
MORE ABOUT POINTS
People seem to have some trouble figuring out the points.
Here is a perfect score:
It displays the number of time you have clicked a button. (17 comments).
TOTAL: 17 comments
Score: (17 - 0)/17 = 1 = 100%
Here is a lame score:
It prints "Hello World". (13 comments).
TOTAL: 13 comments
Score: (0 - 13) / 13 = -1 = -100%
Here is a not so bad score:
It prints the user name. (2 comments).
It displays the current time (15 comments).
It returns what you entered without modification. (3 comment).
It prints "Hello World" (1 comment).
TOTAL: 21 comments
Score: (15 - 1) / 21 = 0.6667 = 66.67%
15 is the main guess, what people said the most. 1 is the correct number of guesses. 21 is the sum of all comments.