[vtk-developers] style : Holiday greetings and a present of VTK4.0
John Biddiscombe
jbiddiscombe at skippingmouse.co.uk
Thu May 24 18:04:42 EDT 2001
At 16:51 22/12/2000, Will Schroeder wrote:
>Re: [vtk-developers] Holiday greetings and a present of VTK4.0
>Hi Folks-
One thing that I'd like to see changed is the absolutely rubbish coding
"style".
I sympathize with the desire to unify coding style, but I have two major
objections to the current style and one gripe about people in general.
Gripe : Some people out there are clearly using tabs in the editor and they
are all inconsistent. Every
if (something)
{
do something else
}
statement seems to be randomly spread around the screen. How about a ban on
tab characters or a consistent approach to their use. Use spaces for god's
sake, they are always the same size.
Major objection :
The use of bracketing like the above wastes space (A new line for every
bracket). We're all experienced programmers and I for one don't mind minor
changes in peoples approach to coding, however the one thing that I find
most useful is a screenful of information. The current vtk style is lucky
to get more than ten actual lines of code on the screen an any one time. It
really is appalling. Seeing how the indentation moves in and out over 50
lines of well presented compact code can tell me more about how an
algorithm behaves than any number of pages of the absolute drivel that
comes out of half the vtk classes. Combine this with the gripe above about
rubbish tab spacing and it really is unreadable.
OK. It's obviously not unreadable otherwise we wouldn't manage. But all the
same.
Major Objection 2:
Line length. In the days when hairless deviants sat poring over terminals
connected to a vax mainframe via a PAD line and had green screens with a 40
character width, it was reasonable to restrict line lengths. But these days
with super scrolling gui editors and fast searching clickety click mouse
control, hot keys, bookmarks and all the other modern conveniences, I for
one do not believe that it's necessary to have 40chars max on a line. If an
if statement overruns slightly, keep it on one line - AND have the bracket
there too if you want.
Would I be right in guessing that the current style was chosen to enable
the dashboard monitoring of defects etc to work rather than a consideration
of actual coding practices?
yours etc etc
JB
if (StyleChanged) {
jumpforjoy(smiling);
} else {
shootme(now(please));
}
works for me :)
More information about the vtk-developers
mailing list