"Amali" wrote:
What is meant by programming "style" and why it is important
Hak...@gmail.com wrote:
It's important because it makes your code more readable.
Some conventions like where to put the brackets might seem odd to you,
but if everyone puts them in similar places, it's easier to read
everyones code.
Many people have died over long winded discussions of format, spacing
and such.
There is far more to style than mere indentation. Where you place your braces
isn't style, it's formatting. Style is whether you use compact algorithms with
solid invariants and good error checking, or if you just slap together some
crude loops and hope it works. Style is anally javadocing everything in sight,
vs. letting the next schnook forensically discern your intentions. Style is
choosing whether to make a method public final or protected inheritable. Style
is making nicely encapsulated, beautifully cooperating modules that emergently
produce magic and cannot break or fail in the face of the most outrageous user
input. Style is coding an application at sixty-four times the industry average
and having a fraction of the bugs, and leaving easy room for every future
enhancement the customer wishes.
As long as you remain focused on the braces and indents, you will never see
the grasshopper.
- Lew
Or, using javadoc to bury the smell of bad naming conventions.
// Ask the scenes forensic-material-team to scout the scene.