http://www.perlmonks.org?node_id=173797


in reply to Obfuscation has no place in production code

Greetings,

warmly seconded.

I have often been more radical in my head on this one, but I will now step out of the closet, and let the flames burn who they may.

I think that the race to obfuscation, as fun as it may appear, is ultimately harmful for a programming language (be it perl, C or anything), and for several reasons.

This discounts the fact that one person's cryptic code may be another persons idea of clarity...
Cheers,
alf
You can't have everything: where would you put it?
  • Comment on Re: Obfuscation has no place in production code

Replies are listed 'Best First'.
Re^2: Obfuscation has no place in production code
by Aristotle (Chancellor) on Jun 13, 2002 at 01:50 UTC

    I'll disagree so far as to say that a language that doesn't allow you to obfuscate code is very likely to be overly restrictive and only suited for a certain niche job. To me, the fact that a language is unsuitable for obfuscation is a point against it. That's not because I obfuscate production code, it's because the same shortcuts that let you express something in a hard to understand way, also let you express other things in an easier to understand way.

    Cryptic coding is cool in the same way that cryptic tricky mathematical formulas that turn into something really simple once you solve them. Do I look down upon mathematicians who can do that? Hardly. Now would a mathematician intentionally use cryptic formulas when documenting his research? Also hardly.

    The difference is whether one knows to clearly separate fun from work. That is a mindset budding programmers should be taught as soon as possible.

    Makeshifts last the longest.

Re: Re: Obfuscation has no place in production code
by webfiend (Vicar) on Jun 12, 2002 at 22:49 UTC

    I like the point about the virtuoso violinist. That'll stick in my head whenever I look at obfuscated code :-)

    On the other hand, it is hard to argue that obfuscation has damaged the popularity of C or Perl. Both languages are very widely used, and I doubt that the ability to write cryptic code has had any impact on that.

    Mind you, I don't obfu, because of a personal war against "clever" code in my projects. But as long as an obfu-loving geek will write clean, legible code at work, I say let him play. If I ever decipher the obfuscation, I'll probably learn something about the language.


    "All you need is ignorance and confidence; then success is sure."-- Mark Twain
Re: Re: Obfuscation has no place in production code
by joshua (Pilgrim) on Jun 12, 2002 at 14:50 UTC