http://qs1969.pair.com?node_id=209583


in reply to Re: Really bored at work JAPH
in thread Really bored at work JAPH


*sigh*, hopefully this will be constructive as well...

Essentially the problem i see is that you are making one of the first-poster mistakes while using a useful/interesting technique. This is a problem because of the axiom "whitespace does not an obfu make". If we apply white space to your code it becomes fairly obvious what you're doing.

The algorithm you use is a good solid place to start, and i think it's beauty. Unfortunately it's a one-trick pony. No offense, but your rehash isn't that obfuscated either since all that has happened is more code made it's way into the process. More code doesn't mean harder to read, just more to read.

If you want to obfuscate the code more you can't tell the audience where the data is originating and/or how it's set up. In the case of this piece you tell people you're using an array of arrays and you explicitly use $x and $y in your code, which is a dead mathematical giveaway.

So, you've got a good start: an original idea (to you at least). From there you've implemented it (an important step because it proves it can be done; i've not submitted many an obfu because i couldn't implement it to begin with!). The next step is to cull the code for redundancies and easy to read bits. As always, using built-ins and interesting names for variables is usually a plus. As an example, one direction you could have gone for a twist of this obfuscation is on my scratchpad...

jynx