[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Sv: Misc. convention stuff



>>You find this easy to read? I find it to be very alien to anything I've
ever
>>seen, thus I don't find it easy to read.
>
>I thought a bit about this issue...
>I found that I'm rather often looking through completely different code -
>be it the examples in Uni, the code of friends I help to debug, the code of
>some MUD that's too unbalanced for my taste, some app that doesn't compile
>correctly or something else.
>Perhaps because of that I actually don't expect anything from code - except
>perhaps that it has *some* recognizable style.
>
Then it would be fair to say that you have much more intelligence weaved
into the area of your brain that handels C/C++ code parsing than the average
programmer. Most companies have very strict coding standard, so I don't
think the average programmer gets to see that many different kinds of
programming styles.

That its easier to read completely uniform code is only one of the arguments
presented in the appendic, though, even if it is one of the most important.

>Another thing: One of your arguments for a very consistent style was that
>inconsistency would put off potential new developers because they find it
>harder to read the code.
>But imagine they actually decide to contribute some code and we say -
>thanks, that's great - but your code has to follow exactly this style.
>Free software developers are volunteers, and about 80% of them would leave
>if presented with that choice.
>
I remember someone mentioning a tool that would make the indentation in a
file fit a specific pattern. We'd just run whatever contributions we got of
that kind through that.

An idea that I think would perhaps appeal more to you would be to not have
any indentation rules, and then run all released code through this
indentation utility before it was released.

We could also say that all committed changes must follow a specific
convention, and then just distribute the indentation utility and an
"indentation pattern file" (or whatever that utility calls it) among us. I
don't think it would be any major inconvenience to just run this utility on
the code we commit, and I do think we'd get used to the new convention
rather quickly, provided it was well thougth out.

Thinking about it, I think I almost like the idea of running an indentation
utility on all released code, but keeping the code in the cvs tree the way
it is now, better than running an indent tool on all committed code. Only
almost, though.

Btw, you sometimes mix spaces and tabs in your source code. Not often, but
every once in a while there is is a line that is indented with spaces rather
than tabs (it's quite easy to see for me because I use tabsize 4).