Register
Email: Password:
Forum » Friendly Obscure Code Programming "Contest"

Friendly Obscure Code Programming "Contest"

E_net4 13 years ago
After what happened here, I figured: "Let's code some more, but this time make it as obscure as possible! "
Not only obscure, but also amusing. The quotes around the "Contest" mean it's not just a contest, but something to have fun with.

So now I summon all programmers!
#
Narvius 13 years ago
Okay... but some kind of objective would be a minimal requirement.
#
E_net4 13 years ago
"Narvius" said:
Okay... but some kind of objective would be a minimal requirement.
The requirement is to make it DO something... How about printing a set of numbers? The fibonacci? Calculate Pi? Print a sonnet? It's up to you!

Edit: I guess here comes the first example. It only means I'm sort of bored, not high.
Here are some recommendations before taking a look at the code:

- The program was made in Linoleum, and it prints a few Fibonacci numbers. The last one is over one thousand. Also, screw the zero.
- It is not recommended but advised to read the code while listening to unfitting music, for awesomeness.
- Again, I'm not high.
- Also, stay out if you're afraid of rabbits.

Here it is.
#
Venom31 13 years ago
Well then "find and replace" is your friend - simply write ordinary program in your usual style, replace all names into most obscure ones, break the indentaion in random places, mix it all up with obscure comments, probably citing some lyrics - whatever. Obscure Code Complete!
#
E_net4 13 years ago
"Venom31" said:
Well then "find and replace" is your friend - simply write ordinary program in your usual style, replace all names into most obscure ones, break the indentaion in random places, mix it all up with obscure comments, probably citing some lyrics - whatever. Obscure Code Complete!
Then do it.
#
Pete 13 years ago
Ah, but that is just the beginning! Instead of using constants, use methods that return two on a sunday and seventeen point three in the rest of the week unless its a leap year in which case the application goes into sleep mode until its not a leap year, a method that loads a random picture from a random directory somewhere, then selects the pixels three lines from the bottom and seventeen pixels to the right of the first black pixel and uses the color of that pixel as the name of the file that it dumps all the data in, while also picking a random directory x folders deep where x is the number of times the application has been ran since the last time mspaint has been opened, and methods that simply do nothing, or maybe they do if they feel like it!

...hm, maybe I missed the point a bit. Still, that was a fun thought process.
#
E_net4 13 years ago
Still, a good approach to obscureness. There could be a rudimentar interpreter in the software, along with a vector of bytes representing the actual program. It cannot be decoded until we know how the interpreter works.
#
MageKing17 13 years ago
See, I was confused until I actually read your code. The word you want is not "obscure" but "obfuscated". This is an obfuscated code "contest". Python's not a good language for obfuscation, though, due to the forced indentation. Perhaps I should learn Lua...
#
E_net4 13 years ago
"MageKing17" said:
See, I was confused until I actually read your code. The word you want is not "obscure" but "obfuscated". This is an obfuscated code "contest". Python's not a good language for obfuscation, though, due to the forced indentation. Perhaps I should learn Lua...
Ok, make it Friendly Obscure/Obfuscated Code Programming "Contest". And I don't think I can make obscure code with a low-level language, so it's only based on obfuscation. Linoleum compilers simply ignore all characters of code equal or lower to 32, and everything between parenthesis. So making bunnies out of this was fun.
#
Vacuus 13 years ago
"MageKing17" said:
See, I was confused until I actually read your code. The word you want is not "obscure" but "obfuscated". This is an obfuscated code "contest". Python's not a good language for obfuscation, though, due to the forced indentation. Perhaps I should learn Lua...

Lua isn't obfuscated either, everything is neatly encapsulated with declaration/end statements which makes it just as easy to read as python once you've had some experience. But yes you should learn lua regardless.

There's more to obfuscating something than just bunching everything up on a couple of lines - worst I've seen is a telnet server with limited automation support that had one-letter variable/class/function names (until it overflowed at which point it became a0 and so on), no form of flow, no documentation, no dividing blocks and nothing separated into separate methods for different functions. All of that was done by a crack-addicted junkie who did it in the name of 'protected his code'. I hope he OD'd.

Mind you, I would be keen for some sort of programming contest with a stricter set of guidelines.
#
Venom31 13 years ago
"Vacuus" said:
...one-letter variable/class/function names (until it overflowed at which point it became a0 and so on)...
"Venom31" said:
...replace all names into most obscure ones...
"Vacuus" said:
...no dividing blocks and nothing separated into separate methods for different functions.
And method substitution is a find! I give him "A" for crap-coding
And yes, there are many guidelines to good code, but bad one? Which is obfuscated and obscure? Nah - I just recently read that article about pessimal algorithms and it still felt like a joke - so what to say about pessimal style =/
#
Forum » Friendly Obscure Code Programming "Contest"

Post Reply


Your email:
Your name: