Beefy Boxes and Bandwidth Generously Provided by pair Networks
XP is just a number
 
PerlMonks  

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.


Comment on Re^2: Should I leave behind beautiful code or readable code?
Download Code
Re^3: Should I leave behind beautiful code or readable code?
by Preceptor (Chaplain) 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?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others drinking their drinks and smoking their pipes about the Monastery: (4)
As of 2014-08-23 20:26 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The best computer themed movie is:











    Results (178 votes), past polls