Can code be obfuscated?

There was a discussion on the forums where I was responding that code that can be obfuscated wold make it difficult for others to read but still work. However it is not as simple to obfuscate code, not only to obfuscate code but also to
Interested? Well if you are reading on, yes you are...

Now obfuscation is easy, you can change variable names, change the function names and the casual reader is confused. However what if... not only is the code obfuscated but also turned into Art? Impossible you say, well, it does not turn into the Mona Lisa but it becomes ASCII images and it is obfuscated. I found two brilliant examples on the word wide web for Lua obfuscation and they by no means are any less impressive.

Now I do not recollect the source and the author (sorry for my poor referencing skills) but this code looks like bottles and what it does is related, any guesses?
I cannot even paste the code in plain text as it messes up the html tags and renders incorrectly, so here's an image instead.


Now, what you see can be read upto an extent, but this program when run in lua will print the entire song of 99 beer bottles on the wall... down to the last one. The trick or the key to running this code in lua is the dostring function, which is not available in CoronaSDK. So this will require a proper full fledged Lua interpreter. See if you can understand how the program works, I am also attaching a text file with the source that you can download from here .

So here's something for you to marvel at over the weekend

Another piece of code that I found was in Image form only, and it is a simple Hello World App, but is it really simple?

Well, I am sure that achieving that sort of obfuscation might not be a goal I would aim for at this point of time, however it is interesting to know how Coding can be an Art ;)

Comments

Post a Comment

Popular Posts