in reply to Re: Can anyone figure this out?
in thread Can anyone figure this out?

This node falls below the community's threshold of quality. You may see it by logging in.

Replies are listed 'Best First'.
Re: Re: Re: Can anyone figure this out?
by srawls (Friar) on Jun 04, 2001 at 02:06 UTC
    for if you can't, what right to you have to condescend the code?

    First of all, I wasn't condescening your code, I was providing suggestions. Also, you seem to be rather proud of that code, but it is rather easy to figure out. You do that little substitution, replacing each digit, but the replacement doesn't matter, s/// returns the numbers of times it matched, so when you match \d, it returns the number of digits in the string, not very obfuscated. The only thing obfuscated was the little diversion, trying to make people think your code had something to do with the values with which you replaced the digits in the string.

    The 15 year old, freshman programmer,
    Stephen Rawls

      You tell him. The code as posted does not even compile (you need to remove the } not the { damn typos! :-) and as you point out is simplicity itself.


Re: Re: Re: Can anyone figure this out?
by BooK (Curate) on Jun 04, 2001 at 23:53 UTC

    Code is a language used by people to be understood both by the machine and other people. Obfuscated is this very same language used in a way that only the machine can understand (though other people can try and understand what the $@%&* you tried to do...)

    If obfuscated can can automatically be translated (by -MO=Deparse for example), it's not really worth it. Using $" to mean space or $^F for 2 is not really that intersting. I won't talk about the use of crypt() to get the string you want after hours of computing... (besides, it depends on the local crypt(3) system call, so it's not portable).

    Automatically obfscating code is like producing automated poetry. Who wants to read and understand that? So yes better obfuscated code is not the product of poorly written code. To my mind, it's the result of a process: the alteration of an algorithm so that not many people can understand what the machine is doing, and how. Even though the variables values are know, and the whitespace is still here.

    (no I don't know why I posted this here, but I'll do a long something about obfuscation here when my thoughts are clear on this issue...)