Beefy Boxes and Bandwidth Generously Provided by pair Networks
Keep It Simple, Stupid
 
PerlMonks  

comment on

( [id://3333]=superdoc: print w/replies, xml ) Need Help??
I would never put a complex expression with side effects inside a comparison anyway. I prefer simple code; if I have to have a complex expression, I'd evaluate it separately, then go on to do the comparison.

I hate those map-grep-map-fold-spindle-mutilate commands where everything is done in a single, incomprehensible line riddled with nested ternary operators and uncommented regexps. When the code breaks, there's no intermediate stages to check for correctness; there's just a mess of nested context and conditional return values that are supposed to work, but somehow don't.

Yes, I'm bitter. My boss got fired, and I have to maintain the code he left behind, most of it undocumented, and often attempting to solve problems we don't actually have, and may never encounter. Sometimes code that is probably never hit looks buggy; but it's hard to tell because of all the state and flags flying around.

It's done nothing to lessen my hatred for complex expressions where simple ones do the job. If you really need complexity, fine. If you don't, just do what's simple and obvious; don't waste someone else's time fixing your mistakes just because you thought it would be fun to be clever. --
Ytrew


In reply to Re^3: numbers with chainable comparisons by Anonymous Monk
in thread numbers with chainable comparisons by Irrelevant

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



  • Are you posting in the right place? Check out Where do I post X? to know for sure.
  • Posts may use any of the Perl Monks Approved HTML tags. Currently these include the following:
    <code> <a> <b> <big> <blockquote> <br /> <dd> <dl> <dt> <em> <font> <h1> <h2> <h3> <h4> <h5> <h6> <hr /> <i> <li> <nbsp> <ol> <p> <small> <strike> <strong> <sub> <sup> <table> <td> <th> <tr> <tt> <u> <ul>
  • Snippets of code should be wrapped in <code> tags not <pre> tags. In fact, <pre> tags should generally be avoided. If they must be used, extreme care should be taken to ensure that their contents do not have long lines (<70 chars), in order to prevent horizontal scrolling (and possible janitor intervention).
  • Want more info? How to link or How to display code and escape characters are good places to start.
Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others wandering the Monastery: (7)
As of 2024-03-28 10:35 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found