Beefy Boxes and Bandwidth Generously Provided by pair Networks
laziness, impatience, and hubris
 
PerlMonks  

comment on

( [id://3333]=superdoc: print w/replies, xml ) Need Help??

Others have already commented on Perl's allowance for expressiveness, and I think that is a direct factor. Also there is the statement of 'less code equals less bug opportunities'.

Personally I have found myself doing the same thing, and at some point I step away and simply leave a #TODO: blah on the lines preceeding and move on. Other times I have fought the battle and won or lost. Every time I have found myself in this situation though, I end up in the docs. Just about everytime I'm in the docs poking around I tend to remember something I wanted to look up, or happen to read an entry I haven't seen before. I seem to always learn/refresh something during these times, which is always a good thing.

Is the behaviour right or wrong? Depends on the situation. There is a reason the terms 'magic' and 'deep magic' exist. Someone spent the time, somewhere, to figure out exactly how to get the best performance out of a given piece of code. What happens if someone spends the time now, wrestling with a few different problems along this line? Next time they encounter the same situation, they can pull from past experience and apply the knowledge now. Read be more efficient. Whether that be with less code, or less time spent due to already having an answer. Now look at the flip side. Eh.. it's good enough as is. Probably can't/shouldn't do anything else with it. Then something isn't fast/efficient enough and the crunch is on. Bad time to start attempting to streamline code.

Hacking code is, or should be in my opinion, fun. It's gratifying to be able to take something x lines long and reduce by y, while possibly adding functionality and/or abstraction at the same time. Someone's sig around here is something to the effect of 'I know I'm on the right path, when by deleting I'm adding functionality'.

</ramble>
Personally I think the behaviour should be encouraged. I don't think that answers should necessarily always be given to questions of this type, but rather general pointers about technique, and references to relevant docs/modules.

use perl;
Everyone should spend some time pounding nails with their forehead for a while before they graduate to complicated stuff like hammers. - Dominus


In reply to Re: All in one by l2kashe
in thread All in one by duff

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 scrutinizing the Monastery: (2)
As of 2024-04-25 02:17 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found