
LOC is a metric that is meaningless, the only folks that use it are the idiots in management that don't understand SFA about code.
Which is better code?
main( int argc, char **argv )
{
int i, x;
for( i = 0 ; i x = ( 80 - strlen( argv[i] ) ) / 2;
printf( "%*.*s%s\n", x, x, "", argv[i] );
}
}
main(
int argc,
char **argv[]
)
{
int i;
int x;
int n;
for(
i = 0
i i = i + 1
)
{
x = strlen( argv[i] );
x = 80 - x;
x = x / 2;
for(
n = 0
n &nt; x
n = n + 1
)
{
printf( " " );
}
printf( "%s", argv[i] );
}
}
More lines of code does not make better code. I can crank out a more lines of code just by screwing with whitespace and the formatting as I did in the above example.
In case of atomic attack, all work rules will be temporarily suspended.