Beefy Boxes and Bandwidth Generously Provided by pair Networks
Think about Loose Coupling
 
PerlMonks  

comment on

( [id://3333]=superdoc: print w/replies, xml ) Need Help??
Sometimes I rewrite a little snip of confusing code, and I fall in love with my new "more elegant" solution. Then after some sleep, I realize that my new solution is just as ugly as the version I replaced, and less battle-tested.

With respect for your discussion and skills, I must admit that to me, this code doesn't look better than (either of) the perlfaq5 examples. It doesn't look worse, but it is not a pearl of truth in the darkness, either. Your code and that code both take a bit of time to get to understand why each statement is justified, and how it deals with edge cases. I don't see an improvement, I just see a difference.

The first time I became a manager, I had to learn how to accept that other people do things in a way that I would not have done them. If it passes the tests, and it's not a risk to maintenance, then I would just have to let it be. I'd have to accept the solution until there was a real need to change it, and there rarely was. If I didn't learn to accept others' solutions, I'd end up coding it all myself. It's a hard hurdle to cross but it's a worthwhile one.

--
[ e d @ h a l l e y . c c ]


In reply to Re^3: Commify numbers, the boring and straightforward way by halley
in thread Commify numbers, the boring and straightforward way by Aristotle

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 admiring the Monastery: (4)
As of 2024-04-25 13:37 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found