Beefy Boxes and Bandwidth Generously Provided by pair Networks
No such thing as a small change
 
PerlMonks  

comment on

( [id://3333]=superdoc: print w/replies, xml ) Need Help??
So you try to predict the future; ie, guess.

No. I simply try to develop coding habits that make the inherently unpredictable nature of the future less error-prone and less fraught. Basing those habits on repeated patterns of behaviour and outcome I have identified from observing the past.

I'm very firmly of the opinion -- based on my years of experience -- that premature generalisation has cost this industry far more, in both financial and in terms of its reputation for spending a fortune developing huge, all encompassing, singing & dancing solutions that never work, and quietly or otherwise, just end up in the bit bucket; than premature optimisation ever has or ever will.

I'm sure you're right. But you seem to be berating me for something I neither suggested nor advocate.

It didn't prefer the regex solution because it was already more generalized; I preferred it because it was more descriptive (to me), less error-prone (for me), and easier to rework or enhance (by me) should that eventually become necessary.

And I definitely wasn't suggesting premature optimization. After all, I'm not the one who would:

...willingly and knowingly trade the near 3 orders of magnitude performance gain for that task now, against any potential savings against potential future maintenance costs.

;-)

I was merely saying that I believe that code maintainability is generally more important than code performance. Which is why I still prefer the regex-based solution, even through it's three orders of magnitude slower.

I doubt we're ever going to agree on this...which is fine. But I'm certainly not going to apologize for making maintainability my own higher priority, nor for advocating it as a priority for most developers.

Damian

In reply to Re^8: Finding repeat sequences. by DamianConway
in thread Finding repeat sequences. by BrowserUk

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 exploiting the Monastery: (6)
As of 2024-04-20 00:48 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found