Writing Elegant Code

 < Day Day Up > 



I’d like to expand on the last sentence of the previous paragraph. Writing code is closely related to writing a story or a novel. You will find that as you are happily programming along you will write whatever code pops into your mind as you type along. As with ordinary writing, rarely will you write code that can’t be improved to a certain degree, either in function or appearance, from editing or a complete rewrite. Experience brings with it the ability to edit on the fly.

However, don’t try too hard to write “beautiful” code. Rather, ensure you have chosen, or developed, the optimum algorithm with which to solve a particular problem. Implement the algorithm with your best possible effort and let the optimizing compiler do its magic.



 < Day Day Up > 



C++ for Artists. The Art, Philosophy, and Science of Object-Oriented Programming
C++ For Artists: The Art, Philosophy, And Science Of Object-Oriented Programming
ISBN: 1932504028
EAN: 2147483647
Year: 2003
Pages: 340
Authors: Rick Miller

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net