ATTENTION: You are viewing a page formatted for mobile devices; to view the full web page, click HERE.

Other Software > Developer's Corner

Is Beautiful Code A Succubus

<< < (4/5) > >>

Ehtyar:
Joto said something to me last night on the IRC channel that, to me, represents the practical importance of aesthetically pleasing code (of course i also believe that beautiful is just good all by itself :P).
He had a friend who had a php script, and it had an error that needed fixing. His friend could not find this error, and asked for his help. When Joto received the code, his friend had his code all bunched up on single lines to the edge of the page (much as you might format a document in word). Joto found, that after properly formatting and indenting the code, that his friend had left a command outside of a loop, when it would have been within. It would have been an extremely simple mistake to pick up had the code been formatted properly from the beginning.
I am of the opinion that clean code is just as important as any other aspect of good programming.

Ehtyar.

f0dder:
I just ordered "Beautiful Code" after mouser pasted the TOC - it's been some months since I've had my last Amazon fix :-[

Ehtyar: I hope JoTo's friend doesn't code like that, but that linebreaks/indentation went AWOL in the process of sending the code... :o

Ehtyar:
Yeah, bunch of crlfs floating around in cyber space. I hope my docs don't catch them, that would look awful :P

Ehtyar.

Darwin:
I just finished reading (the highlights of) this thread...

My own (nocoder, mind you) defniition of beautiful code would be code that is simple, clean and does what it's supposed to do. I guess I'm trying to say that it should be very efficient and functional. But what do I know?!

tinjaw:
To me, defining beautiful code is like defining porn; you can't define it but you know it when you see it. Beautiful code is probably easy to read, but it need not be. It will invoke similar feelings to those experienced when admiring the best work of a universally acclaimed virtuoso. It's foundations will be new and innovative, but appear obvious in hindsight. The application of the actual source code will most likely be specific, but the essence of its structure will be universally beneficial. It will be something that needs to be experienced to be truly appreciated.

Navigation

[0] Message Index

[#] Next page

[*] Previous page

Go to full version