* Re: [patch] checkpatch: putting the && or || on the wrong line
@ 2011-01-05 17:38 ` Krzysztof Halasa
0 siblings, 0 replies; 44+ messages in thread
From: Krzysztof Halasa @ 2011-01-05 17:38 UTC (permalink / raw)
To: Joe Perches
Cc: Samuel Thibault, J. Bruce Fields, Dan Carpenter, Andy Whitcroft,
linux-kernel, kernel-janitors
Joe Perches <joe@perches.com> writes:
> As do I, but perhaps coding style in a project like this
> shouldn't be personal but collective.
I think there is nothing like a collective style.
What you can eventually achieve is a style everybody hates.
> The trailing style outnumbers the leading style ~ 5:1.
>
> $ grep -rP --include=*.[ch] "(\|\||&&)[ \t]*$" * | wc -l
> 39890
> $ grep -rP --include=*.[ch] "^[ \t]*(\|\||&&)" * | wc -l
> 8244
>
> If you take out drivers/staging, trailing is used ~ 6:1.
>
> I think that high enough to be declared the preferred style.
This is a very weak reason (if any at all) to do so. Increasing e.g.
readability of the code would be a good reason, but statistics?
Maybe: Microsoft Windows outnumbers Linux X:1, so it should be declared
the "preferred" system (= the only allowed, as with CodingStyle and
checkpatch "errors").
Or: cars outnumber trucks X:1, declare the trucks illegal.
Coffee drinkers outnumber tee drinkers, kill the later.
Yes, we need some basic common style (tabs length, unless/until we can
use any tab length), K&R (or other) parentheses, void *var instead of
void* var (void* var1, var2 bugs), (no) spaces etc. Anything less make
the code unreadable or less readable. We should stop dictating the
details when the benefits end, and they end pretty fast.
--
Krzysztof Halasa
^ permalink raw reply [flat|nested] 44+ messages in thread
* Re: [patch] checkpatch: putting the && or || on the wrong line
2011-01-05 17:38 ` Krzysztof Halasa
@ 2011-01-05 17:45 ` Joe Perches
-1 siblings, 0 replies; 44+ messages in thread
From: Joe Perches @ 2011-01-05 17:45 UTC (permalink / raw)
To: Krzysztof Halasa
Cc: Samuel Thibault, J. Bruce Fields, Dan Carpenter, Andy Whitcroft,
linux-kernel, kernel-janitors
> Increasing e.g.
> readability of the code would be a good reason, but statistics?
Standardization of style in a large project increases
readability and decreases errors full stop.
Outside of that, it's _all_ bikeshedding.
cheers, Joe
^ permalink raw reply [flat|nested] 44+ messages in thread
* Re: [patch] checkpatch: putting the && or || on the wrong line
@ 2011-01-05 17:45 ` Joe Perches
0 siblings, 0 replies; 44+ messages in thread
From: Joe Perches @ 2011-01-05 17:45 UTC (permalink / raw)
To: Krzysztof Halasa
Cc: Samuel Thibault, J. Bruce Fields, Dan Carpenter, Andy Whitcroft,
linux-kernel, kernel-janitors
> Increasing e.g.
> readability of the code would be a good reason, but statistics?
Standardization of style in a large project increases
readability and decreases errors full stop.
Outside of that, it's _all_ bikeshedding.
cheers, Joe
^ permalink raw reply [flat|nested] 44+ messages in thread
* Re: [patch] checkpatch: putting the && or || on the wrong line
2011-01-05 17:45 ` Joe Perches
@ 2011-01-06 12:11 ` Martin Knoblauch
-1 siblings, 0 replies; 44+ messages in thread
From: Martin Knoblauch @ 2011-01-06 12:11 UTC (permalink / raw)
To: Joe Perches, Krzysztof Halasa
Cc: Samuel Thibault, J. Bruce Fields, Dan Carpenter, Andy Whitcroft,
linux-kernel, kernel-janitors
----- Original Message ----
> From: Joe Perches <joe@perches.com>
> To: Krzysztof Halasa <khc@pm.waw.pl>
> Cc: Samuel Thibault <samuel.thibault@ens-lyon.org>; J. Bruce Fields
><bfields@fieldses.org>; Dan Carpenter <error27@gmail.com>; Andy Whitcroft
><apw@canonical.com>; linux-kernel@vger.kernel.org;
>kernel-janitors@vger.kernel.org
> Sent: Wed, January 5, 2011 6:45:29 PM
> Subject: Re: [patch] checkpatch: putting the && or || on the wrong line
>
> > Increasing e.g.
> > readability of the code would be a good reason, but statistics?
>
> Standardization of style in a large project increases
> readability and decreases errors full stop.
Anything that prevents errors from happening is good. No question.
Anything that enforces "style" for no good reason is just counterproductive
"readability" is a personal thing. It cannot be increased by enforcing "style".
Not for everybody.
And when discussing this issue we should not forget the environment. If I am a
programmer working for a big$$$ company, I better follow their style-guide (if
they have one). They pay my food and shelter after all. If I am "just" a
volunteer on some mainly volunteer open source project, why should I care about
"in my opinion" crap style. It will just drive me away from that project.
Again as I wrote elsewhere - all depends on context. If a contribution is just
a small patch to existing work one can easily follow the "style" of the existing
work. If it is genuinely new work, it should be valued by the peers on technical
merit, not on whether they like the contributors way of writing out an
condition.
>
> Outside of that, it's _all_ bikeshedding.
Your shed is my castle
>
> cheers, Joe
Cheers
Martrin (to hell with style)
^ permalink raw reply [flat|nested] 44+ messages in thread
* Re: [patch] checkpatch: putting the && or || on the wrong line
@ 2011-01-06 12:11 ` Martin Knoblauch
0 siblings, 0 replies; 44+ messages in thread
From: Martin Knoblauch @ 2011-01-06 12:11 UTC (permalink / raw)
To: Joe Perches, Krzysztof Halasa
Cc: Samuel Thibault, J. Bruce Fields, Dan Carpenter, Andy Whitcroft,
linux-kernel, kernel-janitors
----- Original Message ----
> From: Joe Perches <joe@perches.com>
> To: Krzysztof Halasa <khc@pm.waw.pl>
> Cc: Samuel Thibault <samuel.thibault@ens-lyon.org>; J. Bruce Fields
><bfields@fieldses.org>; Dan Carpenter <error27@gmail.com>; Andy Whitcroft
><apw@canonical.com>; linux-kernel@vger.kernel.org;
>kernel-janitors@vger.kernel.org
> Sent: Wed, January 5, 2011 6:45:29 PM
> Subject: Re: [patch] checkpatch: putting the && or || on the wrong line
>
> > Increasing e.g.
> > readability of the code would be a good reason, but statistics?
>
> Standardization of style in a large project increases
> readability and decreases errors full stop.
Anything that prevents errors from happening is good. No question.
Anything that enforces "style" for no good reason is just counterproductive
"readability" is a personal thing. It cannot be increased by enforcing "style".
Not for everybody.
And when discussing this issue we should not forget the environment. If I am a
programmer working for a big$$$ company, I better follow their style-guide (if
they have one). They pay my food and shelter after all. If I am "just" a
volunteer on some mainly volunteer open source project, why should I care about
"in my opinion" crap style. It will just drive me away from that project.
Again as I wrote elsewhere - all depends on context. If a contribution is just
a small patch to existing work one can easily follow the "style" of the existing
work. If it is genuinely new work, it should be valued by the peers on technical
merit, not on whether they like the contributors way of writing out an
condition.
>
> Outside of that, it's _all_ bikeshedding.
Your shed is my castle
>
> cheers, Joe
Cheers
Martrin (to hell with style)
^ permalink raw reply [flat|nested] 44+ messages in thread
* Re: [patch] checkpatch: putting the && or || on the wrong line
2011-01-06 12:11 ` Martin Knoblauch
@ 2011-01-06 17:43 ` Valdis.Kletnieks
-1 siblings, 0 replies; 44+ messages in thread
From: Valdis.Kletnieks @ 2011-01-06 17:43 UTC (permalink / raw)
To: Martin Knoblauch
Cc: Joe Perches, Krzysztof Halasa, Samuel Thibault, J. Bruce Fields,
Dan Carpenter, Andy Whitcroft, linux-kernel, kernel-janitors
[-- Attachment #1: Type: text/plain, Size: 450 bytes --]
On Thu, 06 Jan 2011 04:11:31 PST, Martin Knoblauch said:
> If I am "just" a volunteer on some mainly volunteer open source project, why
> should I care about "in my opinion" crap style. It will just drive me away from
> that project.
> Martrin (to hell with style)
http://www.ioccc.org/ is over there --------------------------->
That's why you should care about style - because nobody likes debugging
somebody else's ioccc award-winning code. ;)
[-- Attachment #2: Type: application/pgp-signature, Size: 227 bytes --]
^ permalink raw reply [flat|nested] 44+ messages in thread
* Re: [patch] checkpatch: putting the && or || on the wrong line
@ 2011-01-06 17:43 ` Valdis.Kletnieks
0 siblings, 0 replies; 44+ messages in thread
From: Valdis.Kletnieks @ 2011-01-06 17:43 UTC (permalink / raw)
To: Martin Knoblauch
Cc: Joe Perches, Krzysztof Halasa, Samuel Thibault, J. Bruce Fields,
Dan Carpenter, Andy Whitcroft, linux-kernel, kernel-janitors
[-- Attachment #1: Type: text/plain, Size: 450 bytes --]
On Thu, 06 Jan 2011 04:11:31 PST, Martin Knoblauch said:
> If I am "just" a volunteer on some mainly volunteer open source project, why
> should I care about "in my opinion" crap style. It will just drive me away from
> that project.
> Martrin (to hell with style)
http://www.ioccc.org/ is over there --------------------------->
That's why you should care about style - because nobody likes debugging
somebody else's ioccc award-winning code. ;)
[-- Attachment #2: Type: application/pgp-signature, Size: 227 bytes --]
^ permalink raw reply [flat|nested] 44+ messages in thread
* Re: [patch] checkpatch: putting the && or || on the wrong line
2011-01-05 17:45 ` Joe Perches
@ 2011-01-06 12:32 ` Krzysztof Halasa
-1 siblings, 0 replies; 44+ messages in thread
From: Krzysztof Halasa @ 2011-01-06 12:32 UTC (permalink / raw)
To: Joe Perches
Cc: Samuel Thibault, J. Bruce Fields, Dan Carpenter, Andy Whitcroft,
linux-kernel, kernel-janitors
Joe Perches <joe@perches.com> writes:
> Standardization of style in a large project increases
> readability and decreases errors full stop.
You forgot to attach the evidence.
Sure, standardization is a good thing - to a certain point. We've passed
this point long ago.
--
Krzysztof Halasa
^ permalink raw reply [flat|nested] 44+ messages in thread
* Re: [patch] checkpatch: putting the && or || on the wrong line
@ 2011-01-06 12:32 ` Krzysztof Halasa
0 siblings, 0 replies; 44+ messages in thread
From: Krzysztof Halasa @ 2011-01-06 12:32 UTC (permalink / raw)
To: Joe Perches
Cc: Samuel Thibault, J. Bruce Fields, Dan Carpenter, Andy Whitcroft,
linux-kernel, kernel-janitors
Joe Perches <joe@perches.com> writes:
> Standardization of style in a large project increases
> readability and decreases errors full stop.
You forgot to attach the evidence.
Sure, standardization is a good thing - to a certain point. We've passed
this point long ago.
--
Krzysztof Halasa
^ permalink raw reply [flat|nested] 44+ messages in thread
* Re: [patch] checkpatch: putting the && or || on the wrong line
2011-01-06 12:32 ` Krzysztof Halasa
@ 2011-01-06 17:57 ` Joe Perches
-1 siblings, 0 replies; 44+ messages in thread
From: Joe Perches @ 2011-01-06 17:57 UTC (permalink / raw)
To: Krzysztof Halasa
Cc: Samuel Thibault, J. Bruce Fields, Dan Carpenter, Andy Whitcroft,
linux-kernel, kernel-janitors
On Thu, 2011-01-06 at 13:32 +0100, Krzysztof Halasa wrote:
> Sure, standardization is a good thing - to a certain point.
> We've passed this point long ago.
Aren't you missing attached evidence too? :p
cheers, Joe
^ permalink raw reply [flat|nested] 44+ messages in thread
* Re: [patch] checkpatch: putting the && or || on the wrong line
@ 2011-01-06 17:57 ` Joe Perches
0 siblings, 0 replies; 44+ messages in thread
From: Joe Perches @ 2011-01-06 17:57 UTC (permalink / raw)
To: Krzysztof Halasa
Cc: Samuel Thibault, J. Bruce Fields, Dan Carpenter, Andy Whitcroft,
linux-kernel, kernel-janitors
On Thu, 2011-01-06 at 13:32 +0100, Krzysztof Halasa wrote:
> Sure, standardization is a good thing - to a certain point.
> We've passed this point long ago.
Aren't you missing attached evidence too? :p
cheers, Joe
^ permalink raw reply [flat|nested] 44+ messages in thread
* Re: [patch] checkpatch: putting the && or || on the wrong line
2011-01-06 17:57 ` Joe Perches
@ 2011-01-06 20:23 ` Krzysztof Halasa
-1 siblings, 0 replies; 44+ messages in thread
From: Krzysztof Halasa @ 2011-01-06 20:23 UTC (permalink / raw)
To: Joe Perches
Cc: Samuel Thibault, J. Bruce Fields, Dan Carpenter, Andy Whitcroft,
linux-kernel, kernel-janitors
Joe Perches <joe@perches.com> writes:
>> Sure, standardization is a good thing - to a certain point.
>> We've passed this point long ago.
>
> Aren't you missing attached evidence too? :p
No, it's all over the place.
--
Krzysztof Halasa
^ permalink raw reply [flat|nested] 44+ messages in thread
* Re: [patch] checkpatch: putting the && or || on the wrong line
@ 2011-01-06 20:23 ` Krzysztof Halasa
0 siblings, 0 replies; 44+ messages in thread
From: Krzysztof Halasa @ 2011-01-06 20:23 UTC (permalink / raw)
To: Joe Perches
Cc: Samuel Thibault, J. Bruce Fields, Dan Carpenter, Andy Whitcroft,
linux-kernel, kernel-janitors
Joe Perches <joe@perches.com> writes:
>> Sure, standardization is a good thing - to a certain point.
>> We've passed this point long ago.
>
> Aren't you missing attached evidence too? :p
No, it's all over the place.
--
Krzysztof Halasa
^ permalink raw reply [flat|nested] 44+ messages in thread
* Re: [patch] checkpatch: putting the && or || on the wrong line
2011-01-06 20:23 ` Krzysztof Halasa
@ 2011-01-06 21:02 ` Joe Perches
-1 siblings, 0 replies; 44+ messages in thread
From: Joe Perches @ 2011-01-06 21:02 UTC (permalink / raw)
To: Krzysztof Halasa; +Cc: linux-kernel, kernel-janitors
On Thu, 2011-01-06 at 21:23 +0100, Krzysztof Halasa wrote:
> Joe Perches <joe@perches.com> writes:
> >> Sure, standardization is a good thing - to a certain point.
> >> We've passed this point long ago.
> > Aren't you missing attached evidence too? :p
> No, it's all over the place.
Right. It's all exactly the same.
We agree. Cites aren't necessary.
cheers, Joe
^ permalink raw reply [flat|nested] 44+ messages in thread
* Re: [patch] checkpatch: putting the && or || on the wrong line
@ 2011-01-06 21:02 ` Joe Perches
0 siblings, 0 replies; 44+ messages in thread
From: Joe Perches @ 2011-01-06 21:02 UTC (permalink / raw)
To: Krzysztof Halasa; +Cc: linux-kernel, kernel-janitors
On Thu, 2011-01-06 at 21:23 +0100, Krzysztof Halasa wrote:
> Joe Perches <joe@perches.com> writes:
> >> Sure, standardization is a good thing - to a certain point.
> >> We've passed this point long ago.
> > Aren't you missing attached evidence too? :p
> No, it's all over the place.
Right. It's all exactly the same.
We agree. Cites aren't necessary.
cheers, Joe
^ permalink raw reply [flat|nested] 44+ messages in thread
* Re: [patch] checkpatch: putting the && or || on the wrong line
2011-01-06 21:02 ` Joe Perches
@ 2011-01-06 21:14 ` Krzysztof Halasa
-1 siblings, 0 replies; 44+ messages in thread
From: Krzysztof Halasa @ 2011-01-06 21:14 UTC (permalink / raw)
To: Joe Perches; +Cc: linux-kernel, kernel-janitors
Joe Perches <joe@perches.com> writes:
>> >> Sure, standardization is a good thing - to a certain point.
>> >> We've passed this point long ago.
> Right. It's all exactly the same.
> We agree. Cites aren't necessary.
People complained on lkml and other lists that the CodingStyle /
checkpatch went way too far many times. So the evidence is there, in the
list archives, and I guess even now you're getting feedback on this.
OTOH you failed to show evidence that super-strict standardization
benefits anyone.
--
Krzysztof Halasa
^ permalink raw reply [flat|nested] 44+ messages in thread
* Re: [patch] checkpatch: putting the && or || on the wrong line
@ 2011-01-06 21:14 ` Krzysztof Halasa
0 siblings, 0 replies; 44+ messages in thread
From: Krzysztof Halasa @ 2011-01-06 21:14 UTC (permalink / raw)
To: Joe Perches; +Cc: linux-kernel, kernel-janitors
Joe Perches <joe@perches.com> writes:
>> >> Sure, standardization is a good thing - to a certain point.
>> >> We've passed this point long ago.
> Right. It's all exactly the same.
> We agree. Cites aren't necessary.
People complained on lkml and other lists that the CodingStyle /
checkpatch went way too far many times. So the evidence is there, in the
list archives, and I guess even now you're getting feedback on this.
OTOH you failed to show evidence that super-strict standardization
benefits anyone.
--
Krzysztof Halasa
^ permalink raw reply [flat|nested] 44+ messages in thread
* Re: [patch] checkpatch: putting the && or || on the wrong line
2011-01-06 21:14 ` Krzysztof Halasa
@ 2011-01-06 21:38 ` Joe Perches
-1 siblings, 0 replies; 44+ messages in thread
From: Joe Perches @ 2011-01-06 21:38 UTC (permalink / raw)
To: Krzysztof Halasa; +Cc: linux-kernel, kernel-janitors
On Thu, 2011-01-06 at 22:14 +0100, Krzysztof Halasa wrote:
> Joe Perches <joe@perches.com> writes:
> >> >> Sure, standardization is a good thing - to a certain point.
> >> >> We've passed this point long ago.
> > Right. It's all exactly the same.
> > We agree. Cites aren't necessary.
> People complained on lkml and other lists that the CodingStyle /
> checkpatch went way too far many times. So the evidence is there, in the
> list archives, and I guess even now you're getting feedback on this.
People complain, that's a fact.
> OTOH you failed to show evidence that super-strict standardization
> benefits anyone.
I don't need to.
If you don't agree with the assertion,
facts likely won't change your mind.
You'll more likely dispute the facts.
Look up this paper if you care to though:
Evaluating the Relation Between Coding
Standard Violations and Faults Within and
Across Software Versions
Cathal Boogerd and Leon Moonen
http://swerl.tudelft.nl/twiki/pub/Main/TechnicalReports/TUD-SERG-2009-008.pdf
RQ2 Are files or modules with a higher violation
density more fault-prone?
This holds for 10 rules in the standard, with some reserva-
tions. There is no reliable prediction for files without ac-
tive development (no changes) nor for files without viola-
tions. Also, the observed relation becomes less pronounced
in time, as the number of registered open faults decreases.
^ permalink raw reply [flat|nested] 44+ messages in thread
* Re: [patch] checkpatch: putting the && or || on the wrong line
@ 2011-01-06 21:38 ` Joe Perches
0 siblings, 0 replies; 44+ messages in thread
From: Joe Perches @ 2011-01-06 21:38 UTC (permalink / raw)
To: Krzysztof Halasa; +Cc: linux-kernel, kernel-janitors
On Thu, 2011-01-06 at 22:14 +0100, Krzysztof Halasa wrote:
> Joe Perches <joe@perches.com> writes:
> >> >> Sure, standardization is a good thing - to a certain point.
> >> >> We've passed this point long ago.
> > Right. It's all exactly the same.
> > We agree. Cites aren't necessary.
> People complained on lkml and other lists that the CodingStyle /
> checkpatch went way too far many times. So the evidence is there, in the
> list archives, and I guess even now you're getting feedback on this.
People complain, that's a fact.
> OTOH you failed to show evidence that super-strict standardization
> benefits anyone.
I don't need to.
If you don't agree with the assertion,
facts likely won't change your mind.
You'll more likely dispute the facts.
Look up this paper if you care to though:
Evaluating the Relation Between Coding
Standard Violations and Faults Within and
Across Software Versions
Cathal Boogerd and Leon Moonen
http://swerl.tudelft.nl/twiki/pub/Main/TechnicalReports/TUD-SERG-2009-008.pdf
RQ2 Are files or modules with a higher violation
density more fault-prone?
This holds for 10 rules in the standard, with some reserva-
tions. There is no reliable prediction for files without ac-
tive development (no changes) nor for files without viola-
tions. Also, the observed relation becomes less pronounced
in time, as the number of registered open faults decreases.
^ permalink raw reply [flat|nested] 44+ messages in thread
* Re: [patch] checkpatch: putting the && or || on the wrong line
2011-01-06 21:38 ` Joe Perches
@ 2011-01-07 17:12 ` Valdis.Kletnieks
-1 siblings, 0 replies; 44+ messages in thread
From: Valdis.Kletnieks @ 2011-01-07 17:12 UTC (permalink / raw)
To: Joe Perches; +Cc: Krzysztof Halasa, linux-kernel, kernel-janitors
[-- Attachment #1: Type: text/plain, Size: 624 bytes --]
On Thu, 06 Jan 2011 13:38:38 PST, Joe Perches said:
> http://swerl.tudelft.nl/twiki/pub/Main/TechnicalReports/TUD-SERG-2009-008.pdf
>
> RQ2 Are files or modules with a higher violation
> density more fault-prone?
>
> This holds for 10 rules in the standard, with some reserva-
> tions. There is no reliable prediction for files without ac-
> tive development (no changes) nor for files without viola-
> tions. Also, the observed relation becomes less pronounced
> in time, as the number of registered open faults decreases.
In other words, code not written to style is like finding a brown M&M
at a Van Halen concert...
[-- Attachment #2: Type: application/pgp-signature, Size: 227 bytes --]
^ permalink raw reply [flat|nested] 44+ messages in thread
* Re: [patch] checkpatch: putting the && or || on the wrong line
@ 2011-01-07 17:12 ` Valdis.Kletnieks
0 siblings, 0 replies; 44+ messages in thread
From: Valdis.Kletnieks @ 2011-01-07 17:12 UTC (permalink / raw)
To: Joe Perches; +Cc: Krzysztof Halasa, linux-kernel, kernel-janitors
[-- Attachment #1: Type: text/plain, Size: 624 bytes --]
On Thu, 06 Jan 2011 13:38:38 PST, Joe Perches said:
> http://swerl.tudelft.nl/twiki/pub/Main/TechnicalReports/TUD-SERG-2009-008.pdf
>
> RQ2 Are files or modules with a higher violation
> density more fault-prone?
>
> This holds for 10 rules in the standard, with some reserva-
> tions. There is no reliable prediction for files without ac-
> tive development (no changes) nor for files without viola-
> tions. Also, the observed relation becomes less pronounced
> in time, as the number of registered open faults decreases.
In other words, code not written to style is like finding a brown M&M
at a Van Halen concert...
[-- Attachment #2: Type: application/pgp-signature, Size: 227 bytes --]
^ permalink raw reply [flat|nested] 44+ messages in thread
* Re: [patch] checkpatch: putting the && or || on the wrong line
2011-01-06 21:38 ` Joe Perches
@ 2011-01-08 13:42 ` Krzysztof Halasa
-1 siblings, 0 replies; 44+ messages in thread
From: Krzysztof Halasa @ 2011-01-08 13:42 UTC (permalink / raw)
To: Joe Perches; +Cc: linux-kernel, kernel-janitors
Joe Perches <joe@perches.com> writes:
>> OTOH you failed to show evidence that super-strict standardization
>> benefits anyone.
>
> I don't need to.
>
> If you don't agree with the assertion,
> facts likely won't change your mind.
> You'll more likely dispute the facts.
Sounds like you have the hard facts. Why not let us know anyway?
> Look up this paper if you care to though:
>
> Evaluating the Relation Between Coding
> Standard Violations and Faults Within and
> Across Software Versions
This is apples vs oranges, nobody disputes a need for sensible rules.
--
Krzysztof Halasa
^ permalink raw reply [flat|nested] 44+ messages in thread
* Re: [patch] checkpatch: putting the && or || on the wrong line
@ 2011-01-08 13:42 ` Krzysztof Halasa
0 siblings, 0 replies; 44+ messages in thread
From: Krzysztof Halasa @ 2011-01-08 13:42 UTC (permalink / raw)
To: Joe Perches; +Cc: linux-kernel, kernel-janitors
Joe Perches <joe@perches.com> writes:
>> OTOH you failed to show evidence that super-strict standardization
>> benefits anyone.
>
> I don't need to.
>
> If you don't agree with the assertion,
> facts likely won't change your mind.
> You'll more likely dispute the facts.
Sounds like you have the hard facts. Why not let us know anyway?
> Look up this paper if you care to though:
>
> Evaluating the Relation Between Coding
> Standard Violations and Faults Within and
> Across Software Versions
This is apples vs oranges, nobody disputes a need for sensible rules.
--
Krzysztof Halasa
^ permalink raw reply [flat|nested] 44+ messages in thread
* Re: [patch] checkpatch: putting the && or || on the wrong line
2011-01-08 13:42 ` Krzysztof Halasa
@ 2011-01-08 17:12 ` Joe Perches
-1 siblings, 0 replies; 44+ messages in thread
From: Joe Perches @ 2011-01-08 17:12 UTC (permalink / raw)
To: Krzysztof Halasa; +Cc: linux-kernel, kernel-janitors
On Sat, 2011-01-08 at 14:42 +0100, Krzysztof Halasa wrote:
> Joe Perches <joe@perches.com> writes:
> >> OTOH you failed to show evidence that super-strict standardization
> >> benefits anyone.
> > I don't need to.
> > If you don't agree with the assertion,
> > facts likely won't change your mind.
> > You'll more likely dispute the facts.
> Sounds like you have the hard facts. Why not let us know anyway?
> > Look up this paper if you care to though:
> > Evaluating the Relation Between Coding
> > Standard Violations and Faults Within and
> > Across Software Versions
> This is apples vs oranges, nobody disputes a need for sensible rules.
Classic example of the disutility of fact based argumentation.
Krzyzstof, let's chat about something like the weather next time.
cheers, Joe
^ permalink raw reply [flat|nested] 44+ messages in thread
* Re: [patch] checkpatch: putting the && or || on the wrong line
@ 2011-01-08 17:12 ` Joe Perches
0 siblings, 0 replies; 44+ messages in thread
From: Joe Perches @ 2011-01-08 17:12 UTC (permalink / raw)
To: Krzysztof Halasa; +Cc: linux-kernel, kernel-janitors
On Sat, 2011-01-08 at 14:42 +0100, Krzysztof Halasa wrote:
> Joe Perches <joe@perches.com> writes:
> >> OTOH you failed to show evidence that super-strict standardization
> >> benefits anyone.
> > I don't need to.
> > If you don't agree with the assertion,
> > facts likely won't change your mind.
> > You'll more likely dispute the facts.
> Sounds like you have the hard facts. Why not let us know anyway?
> > Look up this paper if you care to though:
> > Evaluating the Relation Between Coding
> > Standard Violations and Faults Within and
> > Across Software Versions
> This is apples vs oranges, nobody disputes a need for sensible rules.
Classic example of the disutility of fact based argumentation.
Krzyzstof, let's chat about something like the weather next time.
cheers, Joe
^ permalink raw reply [flat|nested] 44+ messages in thread
* Re: [patch] checkpatch: putting the && or || on the wrong line
2011-01-05 17:38 ` Krzysztof Halasa
@ 2011-01-06 11:55 ` Martin Knoblauch
-1 siblings, 0 replies; 44+ messages in thread
From: Martin Knoblauch @ 2011-01-06 11:55 UTC (permalink / raw)
To: Krzysztof Halasa, Joe Perches
Cc: Samuel Thibault, J. Bruce Fields, Dan Carpenter, Andy Whitcroft,
linux-kernel, kernel-janitors
----- Original Message ----
> From: Krzysztof Halasa <khc@pm.waw.pl>
> To: Joe Perches <joe@perches.com>
> Cc: Samuel Thibault <samuel.thibault@ens-lyon.org>; J. Bruce Fields
><bfields@fieldses.org>; Dan Carpenter <error27@gmail.com>; Andy Whitcroft
><apw@canonical.com>; linux-kernel@vger.kernel.org;
>kernel-janitors@vger.kernel.org
> Sent: Wed, January 5, 2011 6:38:07 PM
> Subject: Re: [patch] checkpatch: putting the && or || on the wrong line
>
> Joe Perches <joe@perches.com> writes:
>
> > As do I, but perhaps coding style in a project like this
> > shouldn't be personal but collective.
>
> I think there is nothing like a collective style.
> What you can eventually achieve is a style everybody hates.
>
> > The trailing style outnumbers the leading style ~ 5:1.
> >
> > $ grep -rP --include=*.[ch] "(\|\||&&)[ \t]*$" * | wc -l
> > 39890
> > $ grep -rP --include=*.[ch] "^[ \t]*(\|\||&&)" * | wc -l
> > 8244
> >
> > If you take out drivers/staging, trailing is used ~ 6:1.
> >
> > I think that high enough to be declared the preferred style.
Nobody defines which style *I* prefer. One (in this case the compiler) may
define which laws I obey, but not which style I like. As long as the compiler
accepts both notations and generates the same code there is no "law" against
either.
>
> This is a very weak reason (if any at all) to do so. Increasing e.g.
indeed.
> readability of the code would be a good reason, but statistics?
>
But who is defining readability? That is not a technical term at all. What I
view as readable may completely from your or Joes or anybody elses opinion.
> Maybe: Microsoft Windows outnumbers Linux X:1, so it should be declared
> the "preferred" system (= the only allowed, as with CodingStyle and
> checkpatch "errors").
>
> Or: cars outnumber trucks X:1, declare the trucks illegal.
I would really think about supporting that :-)
> Coffee drinkers outnumber tee drinkers, kill the later.
>
Here I am for personal freedom :-)
>
> Yes, we need some basic common style (tabs length, unless/until we can
> use any tab length), K&R (or other) parentheses, void *var instead of
> void* var (void* var1, var2 bugs), (no) spaces etc. Anything less make
Actually if this allows ambigous code, the language has a problem. But yeah, a
tool to enforce one way is good.
> the code unreadable or less readable. We should stop dictating the
> details when the benefits end, and they end pretty fast.
Amen.
Cheers
Martin
^ permalink raw reply [flat|nested] 44+ messages in thread
* Re: [patch] checkpatch: putting the && or || on the wrong line
@ 2011-01-06 11:55 ` Martin Knoblauch
0 siblings, 0 replies; 44+ messages in thread
From: Martin Knoblauch @ 2011-01-06 11:55 UTC (permalink / raw)
To: Krzysztof Halasa, Joe Perches
Cc: Samuel Thibault, J. Bruce Fields, Dan Carpenter, Andy Whitcroft,
linux-kernel, kernel-janitors
----- Original Message ----
> From: Krzysztof Halasa <khc@pm.waw.pl>
> To: Joe Perches <joe@perches.com>
> Cc: Samuel Thibault <samuel.thibault@ens-lyon.org>; J. Bruce Fields
><bfields@fieldses.org>; Dan Carpenter <error27@gmail.com>; Andy Whitcroft
><apw@canonical.com>; linux-kernel@vger.kernel.org;
>kernel-janitors@vger.kernel.org
> Sent: Wed, January 5, 2011 6:38:07 PM
> Subject: Re: [patch] checkpatch: putting the && or || on the wrong line
>
> Joe Perches <joe@perches.com> writes:
>
> > As do I, but perhaps coding style in a project like this
> > shouldn't be personal but collective.
>
> I think there is nothing like a collective style.
> What you can eventually achieve is a style everybody hates.
>
> > The trailing style outnumbers the leading style ~ 5:1.
> >
> > $ grep -rP --include=*.[ch] "(\|\||&&)[ \t]*$" * | wc -l
> > 39890
> > $ grep -rP --include=*.[ch] "^[ \t]*(\|\||&&)" * | wc -l
> > 8244
> >
> > If you take out drivers/staging, trailing is used ~ 6:1.
> >
> > I think that high enough to be declared the preferred style.
Nobody defines which style *I* prefer. One (in this case the compiler) may
define which laws I obey, but not which style I like. As long as the compiler
accepts both notations and generates the same code there is no "law" against
either.
>
> This is a very weak reason (if any at all) to do so. Increasing e.g.
indeed.
> readability of the code would be a good reason, but statistics?
>
But who is defining readability? That is not a technical term at all. What I
view as readable may completely from your or Joes or anybody elses opinion.
> Maybe: Microsoft Windows outnumbers Linux X:1, so it should be declared
> the "preferred" system (= the only allowed, as with CodingStyle and
> checkpatch "errors").
>
> Or: cars outnumber trucks X:1, declare the trucks illegal.
I would really think about supporting that :-)
> Coffee drinkers outnumber tee drinkers, kill the later.
>
Here I am for personal freedom :-)
>
> Yes, we need some basic common style (tabs length, unless/until we can
> use any tab length), K&R (or other) parentheses, void *var instead of
> void* var (void* var1, var2 bugs), (no) spaces etc. Anything less make
Actually if this allows ambigous code, the language has a problem. But yeah, a
tool to enforce one way is good.
> the code unreadable or less readable. We should stop dictating the
> details when the benefits end, and they end pretty fast.
Amen.
Cheers
Martin
^ permalink raw reply [flat|nested] 44+ messages in thread
* Re: [patch] checkpatch: putting the && or || on the wrong line
2011-01-06 11:55 ` Martin Knoblauch
@ 2011-01-06 12:38 ` Krzysztof Halasa
-1 siblings, 0 replies; 44+ messages in thread
From: Krzysztof Halasa @ 2011-01-06 12:38 UTC (permalink / raw)
To: Martin Knoblauch
Cc: Joe Perches, Samuel Thibault, J. Bruce Fields, Dan Carpenter,
Andy Whitcroft, linux-kernel, kernel-janitors
Martin Knoblauch <spamtrap@knobisoft.de> writes:
> But who is defining readability? That is not a technical term at all. What I
> view as readable may completely from your or Joes or anybody elses
> opinion.
Readability as perceived by the majority of readers. This is where the
whole community (as opposed to single given individuals) benefits.
--
Krzysztof Halasa
^ permalink raw reply [flat|nested] 44+ messages in thread
* Re: [patch] checkpatch: putting the && or || on the wrong line
@ 2011-01-06 12:38 ` Krzysztof Halasa
0 siblings, 0 replies; 44+ messages in thread
From: Krzysztof Halasa @ 2011-01-06 12:38 UTC (permalink / raw)
To: Martin Knoblauch
Cc: Joe Perches, Samuel Thibault, J. Bruce Fields, Dan Carpenter,
Andy Whitcroft, linux-kernel, kernel-janitors
Martin Knoblauch <spamtrap@knobisoft.de> writes:
> But who is defining readability? That is not a technical term at all. What I
> view as readable may completely from your or Joes or anybody elses
> opinion.
Readability as perceived by the majority of readers. This is where the
whole community (as opposed to single given individuals) benefits.
--
Krzysztof Halasa
^ permalink raw reply [flat|nested] 44+ messages in thread