It's possible to write unmaintainable code in any language; but it shouldn't be easy. What's more, choice of language can sometimes simplify cleanup.

Assembly language is horrible to maintain, because it's easy to make code self-modifying. I debugged self-modifying System 370 assembly language on my second co-op term; it took a day to guess what the code was trying to do, and almost a month to prove that it was doing what it should. Most of the program was dead code; but in one case, the program modified itself to reach otherwise unreachable code. I spent those extra 29 days searching for a another way the program might reach the rest of the "unreachable" code; but it didn't actually exist. The code was just dead code; leftover and unused. 29 days wasted because of sloppy code maintence, and a performance hack!

Perl is better than Assembly; but there's still great room for improvement. Productivity tools like perltidy don't work as well as they might, because perl is just so complex, exception riddled, and inconsistant. That's a shame, because it didn't need to be like that. It's bad when you can't be sure the tool you're running to format whitespace didn't mis-parse your program and introduce new bugs. I don't know anything else about Python, but I know you can't fail to indent code and have it run in production. Language design does matter!

A simpler, cleaner language requires that the malicious programmer work harder to accomplish the same obfuscations in the same amount of time, and that's a win for me. At some point, they do get fired...

--
Ytrew


In reply to Re^5: RFC: feature proposal re code in @INC by Anonymous Monk
in thread RFC: feature proposal re code in @INC by blazar

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.