Beefy Boxes and Bandwidth Generously Provided by pair Networks
We don't bite newbies here... much
 
PerlMonks  

Re: Code for elegance, code for clarity

by mcogan1966 (Monk)
on Jan 12, 2004 at 18:17 UTC ( [id://320717]=note: print w/replies, xml ) Need Help??


in reply to Code for elegance, code for clarity

And as I read these posts, I see above "Code for elegance, code for clarity".

To me, elegant code works correctly, and works efficiently. This is something that I've had to work hard at with my recent project. Taking code that works, and making it code that works faster is how I found my 'elegant' code. But now, I'm leaving it alone since there is little more that can be done without making some of the code unreadable. Someone else may have to look at this down the line, it shouldn't be impossible (just very difficult).

  • Comment on Re: Code for elegance, code for clarity

Replies are listed 'Best First'.
Re: Code for elegance, code for clarity
by dd-b (Monk) on Jan 13, 2004 at 03:30 UTC

    I think "elegant" is often a term for code that's clear to good enough programmers, and often rather unclear to less good programmers. However, really elegant code is good code to study to improve your own abilities.

    Then again, my degree is in mathematics, where "elegance" is very often not the clearest way to express things.

      On the mathematics line, some physicist... (I forget the name Kinku? First name was Michael I believe), had an interview/show on TechTV about his perceptions of finding a Grand Unified Theory.

      He said routinely rejected theories and equations because they were too complex, every time saying God's universe would be governed by beautiful (&simple*) equations. Though I think String Theory is off in unprovable never-never-land, there was a lot that I learned from that statement.

      * = By simple, I mean short an elegant, without a lot of fudge constants and operators, I'm not saving the Creator would be afraid of a flux integral or something like it :)

        There seems to be a strong human prejudice for simple explanations of reality. It has a history of working pretty well; which I find startling.

        Then again, I suspect Planck's constant, for example, is just a fudge factor.

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others surveying the Monastery: (3)
As of 2024-04-16 21:32 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found