Click to See Complete Forum and Search --> : Good Programming...


lord loh
February 10th, 2003, 01:11 AM
What is (or should be) the criteria to call a source code good?
(Maintainability, understandability and all that)

The few that I can thin of are...

Indentations
Comments (how much comments are needed? every line?)
As little dead code as possible
Put repetitive codes in functions.
Least memory requirements...

Tell me more....

Is it necessary to use classes? or just an unclassed function is good enough?
What I always think is...If I make a draw class with function circle, box, paint, fill, etc... and mostly one never uses every function defined in the class...

So should one really make a class or keep unclassed functions in separate files and include them at necessary points...

Contribute by posting to make up a sort of guideline for good programming...

Cuboidz
February 24th, 2003, 09:43 AM
These are the coding guidelines I follow most of the time: C++ Programming Style Guidelines (http://geosoft.no/style.html)