Beefy Boxes and Bandwidth Generously Provided by pair Networks
Clear questions and runnable code
get the best and fastest answer

Re^2: Should I leave behind beautiful code or readable code?

by bart (Canon)
on Mar 28, 2007 at 11:50 UTC ( #606986=note: print w/replies, xml ) Need Help??

in reply to Re: Should I leave behind beautiful code or readable code?
in thread Should I leave behind beautiful code or readable code?

You took the words right out of my mouth. Not that I'd have used the orignal snippet as an example of beautiful code...

It's time we snap out of this. If a maintainer can't understand code as simple as this, it's time for him to get educated. People should stop wasting time writing verbose code, and learn more elegant ways to do the same things. It's time they start to learn to recognize the typical Perl idioms, and stop trying to write a shadow of C in Perl.

Who in his right mind would dare to call lines like

for($i = 0; $i<$max; $i++) { ... }
"simple" and understandable? It's verbose, it's ugly, it's impossible to read, and the only reason why people think it's readable is because they have learned to read it. And to be honest, it probably took them a relative long of time to learn it.

It's time to learn something else.

Replies are listed 'Best First'.
Re^3: Should I leave behind beautiful code or readable code?
by Preceptor (Deacon) on Mar 30, 2007 at 10:44 UTC
    Isn't this the point of comments? I mean, so you can write code, which ... well is almost by definition not natural language, to do something, and then put a comment by it to explain how and why it does it?

    I don't care what a line of code does. I do care, that someone's taken the time and effort to document or comment what that bit does, if there's _any question at all_ about whether it's easy to understand or not.

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://606986]
and all is quiet...

How do I use this? | Other CB clients
Other Users?
Others drinking their drinks and smoking their pipes about the Monastery: (10)
As of 2018-06-25 14:26 GMT
Find Nodes?
    Voting Booth?
    Should cpanminus be part of the standard Perl release?

    Results (126 votes). Check out past polls.