Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl: the Markov chain saw
 
PerlMonks  

Re^2: Commonly accepted style guide?

by chromatic (Archbishop)
on Sep 26, 2005 at 00:24 UTC ( #494985=note: print w/ replies, xml ) Need Help??


in reply to Re: Commonly accepted style guide?
in thread Commonly accepted style guide?

...that person ... thinks style is just as important as functionality.

I think it is, if you have to maintain code. Certainly working code is important. If it's truly a one-off and you never have to maintain it, style isn't as important as completeness and correctness.

I think it's a bad habit to write unstylish code even for one-offs, though. I've maintained too many programs that managed to stick around far longer than anyone expected. I've also seen too many buggy sections of code written poorly because someone rushed to make a fix. If you don't have the discipline to write code well even when you're experimenting, do you have the discipline to write code well when you're under pressure?

Even worse, the respondent has forgotten that TMTOWTDI.

That's a silly argument. It's stupid to pound nails in with a rock (or your forehead) when there's a perfectly serviceable hammer right next to you.

You don't have to take style advice, but it's free and it comes from a community that has, as a whole, orders of magniture more experience designing, developing, and maintaining programs than any one poster. I think failing to consider that advice, because Perl allows you to solve problems in many ways, is a mistake.


Comment on Re^2: Commonly accepted style guide?
Re^3: Commonly accepted style guide?
by Juerd (Abbot) on Sep 26, 2005 at 15:55 UTC

    Your post is very good and matches the way I feel very closely. ++

    If it's truly a one-off and you never have to maintain it, style isn't as important as completeness and correctness.

    Agreed. But I would like to add that I don't expect code I get to see to be a one-offs, and criticize all style flaws in code I'm asked to comment on.

    In other words: one better not bothers others with one-offs.

    Juerd # { site => 'juerd.nl', plp_site => 'plp.juerd.nl', do_not_use => 'spamtrap' }

Re^3: Commonly accepted style guide?
by wolfger (Deacon) on Sep 28, 2005 at 16:44 UTC
    [TMTOWTDI]'s a silly argument. It's stupid to pound nails in with a rock (or your forehead) when there's a perfectly serviceable hammer right next to you.

    But who is to say which way is the forehead, and which is the hammer? More important is that the nail achieves its final destination. Maintainability is secondary to that. The tool used for the job is a far-distant third, or possibly even fourth (Forth?).

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://494985]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others meditating upon the Monastery: (13)
As of 2014-07-28 14:40 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    My favorite superfluous repetitious redundant duplicative phrase is:









    Results (200 votes), past polls