You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@jmeter.apache.org by benbenw <gi...@git.apache.org> on 2016/03/18 17:44:16 UTC

[GitHub] jmeter pull request: java constants naming

GitHub user benbenw opened a pull request:

    https://github.com/apache/jmeter/pull/171

    java constants naming

    

You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/benbenw/jmeter javanaming

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/jmeter/pull/171.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #171
    
----
commit 2c291a3547387a43ecaed2aa926fef045d6f263d
Author: benoit <b....@ubik-ingenierie.com>
Date:   2016-03-18T16:37:13Z

    java constants naming

----


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

Re: [GitHub] jmeter pull request: java constants naming

Posted by Philippe Mouawad <ph...@gmail.com>.
Hi Again Vladimir,


On Fri, Mar 18, 2016 at 9:30 PM, Vladimir Sitnikov <
sitnikov.vladimir@gmail.com> wrote:

> Philippe> No strong opinion on this:
>
> What's your opinion on "log"?
>

For me, it's a static final variable so it should be in UPPERCASE.
Also are we able to make a Checkstyle rule that forces UPPERCASE for static
final except when it's "log" ?
Or did I misunderstand what you intend to do ?


> Vladimir
>



-- 
Cordialement.
Philippe Mouawad.

Re: [GitHub] jmeter pull request: java constants naming

Posted by Vladimir Sitnikov <si...@gmail.com>.
Philippe> No strong opinion on this:

What's your opinion on "log"?

Vladimir

Re: [GitHub] jmeter pull request: java constants naming

Posted by Philippe Mouawad <ph...@gmail.com>.
On Fri, Mar 18, 2016 at 9:20 PM, Vladimir Sitnikov <
sitnikov.vladimir@gmail.com> wrote:

> Philippe>1/ I think you should put yourself at the place of the
> contributor here.
> Philippe>Why not say hello, thanks before discussing ?
>
> You are right. That makes sense.
>
> Philippe>2/ Discussion is great but In my opinion, discussion on the
> naming of a
> Philippe>static variable contributed by somebody who followed the way we
> do it
> Philippe>currently which conforms to standards is a bit too much.
>
> Even though contributions like PR171 are important, it is still required
> to review them.
> As current style might be not that well defined (== the way "we do it
> currently" is not defined), it might make sense to define the style,
> make sure PR conforms to it and then proceed with merge.
>

Ok but let's not discourage contributor.
It is up to us once we have defined the style to merge the PR and change
the naming.



>
> Philippe>Let's open if you want, a thread called 'Checkstyle rules in
> JMeter' and
>
> I think it is better to add/enable/alter rules incrementally as required.
> PR171 touches static finals. It is way easier to agree on the particular
> rule
> here, apply/enable the rule and merge the PR in.
>

No strong opinion on this:
- LOG is okay for me
- LOGGER is okay for me


>
> Vladimir
>



-- 
Cordialement.
Philippe Mouawad.

Re: [GitHub] jmeter pull request: java constants naming

Posted by Vladimir Sitnikov <si...@gmail.com>.
Philippe>1/ I think you should put yourself at the place of the
contributor here.
Philippe>Why not say hello, thanks before discussing ?

You are right. That makes sense.

Philippe>2/ Discussion is great but In my opinion, discussion on the naming of a
Philippe>static variable contributed by somebody who followed the way we do it
Philippe>currently which conforms to standards is a bit too much.

Even though contributions like PR171 are important, it is still required
to review them.
As current style might be not that well defined (== the way "we do it
currently" is not defined), it might make sense to define the style,
make sure PR conforms to it and then proceed with merge.

Philippe>Let's open if you want, a thread called 'Checkstyle rules in
JMeter' and

I think it is better to add/enable/alter rules incrementally as required.
PR171 touches static finals. It is way easier to agree on the particular rule
here, apply/enable the rule and merge the PR in.

Vladimir

Re: [GitHub] jmeter pull request: java constants naming

Posted by Philippe Mouawad <ph...@gmail.com>.
Hi Vladimir,

1/ I think you should put yourself at the place of the contributor here.
Why not say hello, thanks before discussing ?

My note is about the first reaction by sebb here and the reply on another
PR by same contributor the same day:

   - https://bz.apache.org/bugzilla/show_bug.cgi?id=59197#c2


For recap:
https://www.apache.org/foundation/policies/conduct.html


   1.

   *Be empathetic
   <https://www.apache.org/foundation/policies/conduct.html#endnotes>,
   welcoming, friendly, and patient.* We work together to resolve conflict,
   assume good intentions, and do our best to act in an empathetic fashion. We
   may all experience some frustration from time to time, but we do not allow
   frustration to turn into a personal attack. A community where people feel
   uncomfortable or threatened is not a productive one. We should be
   respectful when dealing with other community members as well as with people
   outside our community.



2/ Discussion is great but In my opinion, discussion on the naming of a
static variable contributed by somebody who followed the way we do it
currently which conforms to standards is a bit too much.
Let's open if you want, a thread called 'Checkstyle rules in JMeter' and
discuss there.

3/ +1 for checkstyle rules, this way we will stop discussing this and
concentrate on all other subjects.


Regards
Philippe


On Friday, March 18, 2016, Vladimir Sitnikov <si...@gmail.com>
wrote:

> Philippe>- LOG (Upper Case) for static is the usual policy that is
> applied by all
> Philippe>   of us since few time
>
> In my opinion, log/logger is better treated as exception from "static
> final upper case" policy.
> It is used more often than other kind of static finals => it might
> deserve some exceptional casing rule.
>
> Philippe>      - and if we don't like it, why just not merge it and rename
> the
> Philippe>      variable ?
>
> I think we'd better agree on the style first, then merge.
> "log vs LOG vs LOGGER" might indeed be important, as it is better to
> follow the same style everywhere.
>
> Philippe> why just not merge
>
> It makes sense to activate relevant checkstyle rule, so invalid names
> could no longer get in.
>
> Philippe>do you think this kind of big discussion for a Variable
> naming without a
>
> I does not look like a big discussion yet.
> We are just solving one of the two hard things in Computer Science (see
> [1])
>
> [1] http://martinfowler.com/bliki/TwoHardThings.html
>
> Vladimir
>

Re: [GitHub] jmeter pull request: java constants naming

Posted by Vladimir Sitnikov <si...@gmail.com>.
Philippe>- LOG (Upper Case) for static is the usual policy that is
applied by all
Philippe>   of us since few time

In my opinion, log/logger is better treated as exception from "static
final upper case" policy.
It is used more often than other kind of static finals => it might
deserve some exceptional casing rule.

Philippe>      - and if we don't like it, why just not merge it and rename the
Philippe>      variable ?

I think we'd better agree on the style first, then merge.
"log vs LOG vs LOGGER" might indeed be important, as it is better to
follow the same style everywhere.

Philippe> why just not merge

It makes sense to activate relevant checkstyle rule, so invalid names
could no longer get in.

Philippe>do you think this kind of big discussion for a Variable
naming without a

I does not look like a big discussion yet.
We are just solving one of the two hard things in Computer Science (see [1])

[1] http://martinfowler.com/bliki/TwoHardThings.html

Vladimir

Re: [GitHub] jmeter pull request: java constants naming

Posted by Philippe Mouawad <ph...@gmail.com>.
Hello,
Frankly I don't understand this discussion:

   - LOG (Upper Case) for static is the usual policy that is applied by all
   of us since few time
   - The guy named it LOGGER, what's the problem except that it does not
   suit a particular taste ? :
      - It is in UPPERCASE
      - It is meaningful
      - and if we don't like it, why just not merge it and rename the
      variable ?


Finally, the guy here ( Benoit W.) contributed around 100 patches on this
version ! (many very precious),
do you think this kind of big discussion for a Variable naming without a
THANK YOU ! and a HELLO ! is a good way to encourage other contributors ?

I don't think so, and  I disagree with such behaviour !



Regards
Philippe


On Fri, Mar 18, 2016 at 7:06 PM, sebb <se...@gmail.com> wrote:

> On 18 March 2016 at 17:55, Vladimir Sitnikov
> <si...@gmail.com> wrote:
> >>Why change log to LOGGER?
> >>It would make more sense to change it to LOG
> >
> > Frankly speaking, I think lowercase log is just perfect.
> > What is the purpose of making LOG shout at you?
> >
> > Isn't log.info(...) self-descriptive enough?
>
> Good point.
> [But if it is to be changed, it should be just upcased.]
>
> On reflection I agree with you that it makes sense to leave "log" as
> lower-case.
>
> For the other constants, using the conventional upper-case is generally
> helpful.
>
> > Vladimir
>



-- 
Cordialement.
Philippe Mouawad.

Re: [GitHub] jmeter pull request: java constants naming

Posted by sebb <se...@gmail.com>.
On 18 March 2016 at 17:55, Vladimir Sitnikov
<si...@gmail.com> wrote:
>>Why change log to LOGGER?
>>It would make more sense to change it to LOG
>
> Frankly speaking, I think lowercase log is just perfect.
> What is the purpose of making LOG shout at you?
>
> Isn't log.info(...) self-descriptive enough?

Good point.
[But if it is to be changed, it should be just upcased.]

On reflection I agree with you that it makes sense to leave "log" as lower-case.

For the other constants, using the conventional upper-case is generally helpful.

> Vladimir

Re: [GitHub] jmeter pull request: java constants naming

Posted by Vladimir Sitnikov <si...@gmail.com>.
>Why change log to LOGGER?
>It would make more sense to change it to LOG

Frankly speaking, I think lowercase log is just perfect.
What is the purpose of making LOG shout at you?

Isn't log.info(...) self-descriptive enough?

Vladimir

Re: [GitHub] jmeter pull request: java constants naming

Posted by sebb <se...@gmail.com>.
On 18 March 2016 at 16:44, benbenw <gi...@git.apache.org> wrote:
> GitHub user benbenw opened a pull request:
>
>     https://github.com/apache/jmeter/pull/171
>
>     java constants naming
>
>
>
> You can merge this pull request into a Git repository by running:
>
>     $ git pull https://github.com/benbenw/jmeter javanaming
>
> Alternatively you can review and apply these changes as the patch at:
>
>     https://github.com/apache/jmeter/pull/171.patch

Why change log to LOGGER?
It would make more sense to change it to LOG

> To close this pull request, make a commit to your master/trunk branch
> with (at least) the following in the commit message:
>
>     This closes #171
>
> ----
> commit 2c291a3547387a43ecaed2aa926fef045d6f263d
> Author: benoit <b....@ubik-ingenierie.com>
> Date:   2016-03-18T16:37:13Z
>
>     java constants naming
>
> ----
>
>
> ---
> If your project is set up for it, you can reply to this email and have your
> reply appear on GitHub as well. If your project does not have this feature
> enabled and wishes so, or if the feature is enabled but not working, please
> contact infrastructure at infrastructure@apache.org or file a JIRA ticket
> with INFRA.
> ---

[GitHub] jmeter pull request: java constants naming

Posted by benbenw <gi...@git.apache.org>.
Github user benbenw closed the pull request at:

    https://github.com/apache/jmeter/pull/171


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] jmeter pull request: java constants naming

Posted by benbenw <gi...@git.apache.org>.
Github user benbenw commented on the pull request:

    https://github.com/apache/jmeter/pull/171#issuecomment-198878856
  
    Hello vlsi
    I could but this will break your build as there are many remaining violations.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] jmeter pull request: java constants naming

Posted by vlsi <gi...@git.apache.org>.
Github user vlsi commented on the pull request:

    https://github.com/apache/jmeter/pull/171#issuecomment-198529464
  
    @benbenw , thanks for bringing this up.
    Can you please enable relevant checkstyle rule so it would capture non-capital static finals violations in the future?


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---