You are viewing a plain text version of this content. The canonical link for it is here.
Posted to log4j-dev@logging.apache.org by Gary Gregory <ga...@gmail.com> on 2012/12/06 14:29:42 UTC
[v2] method order
Hi All:
I'd like to keep methods in alphabetical order in source files. Is that
controversial for anyone? I know it makes for noisy commits so I would do
it one file at a time when I run into it or in a whole batch. Thoughts?
Gary
--
E-Mail: garydgregory@gmail.com | ggregory@apache.org
JUnit in Action, 2nd Ed: <http://goog_1249600977>http://bit.ly/ECvg0
Spring Batch in Action: <http://s.apache.org/HOq>http://bit.ly/bqpbCK
Blog: http://garygregory.wordpress.com
Home: http://garygregory.com/
Tweet! http://twitter.com/GaryGregory
Re: [v2] method order
Posted by Christian Grobmeier <gr...@gmail.com>.
On Thu, Dec 6, 2012 at 3:28 PM, Gary Gregory <ga...@gmail.com> wrote:
> For me, I find it disconcerting when I see (in Eclipse) the methods in the
> Members view in a different order than in the editor. I see A next to B in
> the view, but in the editor A is followed by Z, it's just weird. I'm just
> weird ;)
haha :-) I do not have the view open - i just use the shortcuts
> In my Smalltalk days, we had method categories as a formal concept in the
> IDE, that was cool...
Cool.
>
> Since folks are +0/0, I'll wait some more and see...
>
> Gary
>
>
> On Thu, Dec 6, 2012 at 9:19 AM, Christian Grobmeier <gr...@gmail.com>
> wrote:
>>
>> 0. Really have no preference, I use STRG-O on Eclipse and similar on
>> IntelliJ. I really do not need an sorting.
>>
>> On Thu, Dec 6, 2012 at 2:29 PM, Gary Gregory <ga...@gmail.com>
>> wrote:
>> > Hi All:
>> >
>> > I'd like to keep methods in alphabetical order in source files. Is that
>> > controversial for anyone? I know it makes for noisy commits so I would
>> > do it
>> > one file at a time when I run into it or in a whole batch. Thoughts?
>> >
>> > Gary
>> >
>> > --
>> > E-Mail: garydgregory@gmail.com | ggregory@apache.org
>> > JUnit in Action, 2nd Ed: http://bit.ly/ECvg0
>> > Spring Batch in Action: http://bit.ly/bqpbCK
>> > Blog: http://garygregory.wordpress.com
>> > Home: http://garygregory.com/
>> > Tweet! http://twitter.com/GaryGregory
>>
>>
>>
>> --
>> http://www.grobmeier.de
>> https://www.timeandbill.de
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: log4j-dev-unsubscribe@logging.apache.org
>> For additional commands, e-mail: log4j-dev-help@logging.apache.org
>>
>
>
>
> --
> E-Mail: garydgregory@gmail.com | ggregory@apache.org
> JUnit in Action, 2nd Ed: http://bit.ly/ECvg0
> Spring Batch in Action: http://bit.ly/bqpbCK
> Blog: http://garygregory.wordpress.com
> Home: http://garygregory.com/
> Tweet! http://twitter.com/GaryGregory
--
http://www.grobmeier.de
https://www.timeandbill.de
---------------------------------------------------------------------
To unsubscribe, e-mail: log4j-dev-unsubscribe@logging.apache.org
For additional commands, e-mail: log4j-dev-help@logging.apache.org
Re: [v2] method order
Posted by Gary Gregory <ga...@gmail.com>.
For me, I find it disconcerting when I see (in Eclipse) the methods in the
Members view in a different order than in the editor. I see A next to B in
the view, but in the editor A is followed by Z, it's just weird. I'm just
weird ;)
In my Smalltalk days, we had method categories as a formal concept in the
IDE, that was cool...
Since folks are +0/0, I'll wait some more and see...
Gary
On Thu, Dec 6, 2012 at 9:19 AM, Christian Grobmeier <gr...@gmail.com>wrote:
> 0. Really have no preference, I use STRG-O on Eclipse and similar on
> IntelliJ. I really do not need an sorting.
>
> On Thu, Dec 6, 2012 at 2:29 PM, Gary Gregory <ga...@gmail.com>
> wrote:
> > Hi All:
> >
> > I'd like to keep methods in alphabetical order in source files. Is that
> > controversial for anyone? I know it makes for noisy commits so I would
> do it
> > one file at a time when I run into it or in a whole batch. Thoughts?
> >
> > Gary
> >
> > --
> > E-Mail: garydgregory@gmail.com | ggregory@apache.org
> > JUnit in Action, 2nd Ed: http://bit.ly/ECvg0
> > Spring Batch in Action: http://bit.ly/bqpbCK
> > Blog: http://garygregory.wordpress.com
> > Home: http://garygregory.com/
> > Tweet! http://twitter.com/GaryGregory
>
>
>
> --
> http://www.grobmeier.de
> https://www.timeandbill.de
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: log4j-dev-unsubscribe@logging.apache.org
> For additional commands, e-mail: log4j-dev-help@logging.apache.org
>
>
--
E-Mail: garydgregory@gmail.com | ggregory@apache.org
JUnit in Action, 2nd Ed: <http://goog_1249600977>http://bit.ly/ECvg0
Spring Batch in Action: <http://s.apache.org/HOq>http://bit.ly/bqpbCK
Blog: http://garygregory.wordpress.com
Home: http://garygregory.com/
Tweet! http://twitter.com/GaryGregory
Re: [v2] method order
Posted by Christian Grobmeier <gr...@gmail.com>.
0. Really have no preference, I use STRG-O on Eclipse and similar on
IntelliJ. I really do not need an sorting.
On Thu, Dec 6, 2012 at 2:29 PM, Gary Gregory <ga...@gmail.com> wrote:
> Hi All:
>
> I'd like to keep methods in alphabetical order in source files. Is that
> controversial for anyone? I know it makes for noisy commits so I would do it
> one file at a time when I run into it or in a whole batch. Thoughts?
>
> Gary
>
> --
> E-Mail: garydgregory@gmail.com | ggregory@apache.org
> JUnit in Action, 2nd Ed: http://bit.ly/ECvg0
> Spring Batch in Action: http://bit.ly/bqpbCK
> Blog: http://garygregory.wordpress.com
> Home: http://garygregory.com/
> Tweet! http://twitter.com/GaryGregory
--
http://www.grobmeier.de
https://www.timeandbill.de
---------------------------------------------------------------------
To unsubscribe, e-mail: log4j-dev-unsubscribe@logging.apache.org
For additional commands, e-mail: log4j-dev-help@logging.apache.org
Re: [v2] method order
Posted by Tushar Kapila <tg...@gmail.com>.
+0 the IDE orders pretty well. rather have logical grouping - static
public together, public separate, private functions in their own area, just
makes scrolling easier
On Thu, Dec 6, 2012 at 7:34 PM, Ralph Goers <rg...@apache.org> wrote:
> +0. IntelliJ shows them in alphabetical order so I don't have a need to
> do this, but it won't hurt anything either.
>
> Ralph
>
> On Dec 6, 2012, at 5:29 AM, Gary Gregory <ga...@gmail.com> wrote:
>
> Hi All:
>
> I'd like to keep methods in alphabetical order in source files. Is that
> controversial for anyone? I know it makes for noisy commits so I would do
> it one file at a time when I run into it or in a whole batch. Thoughts?
>
> Gary
>
> --
> E-Mail: garydgregory@gmail.com | ggregory@apache.org
> JUnit in Action, 2nd Ed: <http://goog_1249600977>http://bit.ly/ECvg0
> Spring Batch in Action: <http://s.apache.org/HOq>http://bit.ly/bqpbCK
> Blog: http://garygregory.wordpress.com
> Home: http://garygregory.com/
> Tweet! http://twitter.com/GaryGregory
>
>
--
Regards
Tushar Kapila
Re: [v2] method order
Posted by Ralph Goers <rg...@apache.org>.
+0. IntelliJ shows them in alphabetical order so I don't have a need to do this, but it won't hurt anything either.
Ralph
On Dec 6, 2012, at 5:29 AM, Gary Gregory <ga...@gmail.com> wrote:
> Hi All:
>
> I'd like to keep methods in alphabetical order in source files. Is that controversial for anyone? I know it makes for noisy commits so I would do it one file at a time when I run into it or in a whole batch. Thoughts?
>
> Gary
>
> --
> E-Mail: garydgregory@gmail.com | ggregory@apache.org
> JUnit in Action, 2nd Ed: http://bit.ly/ECvg0
> Spring Batch in Action: http://bit.ly/bqpbCK
> Blog: http://garygregory.wordpress.com
> Home: http://garygregory.com/
> Tweet! http://twitter.com/GaryGregory
Re: [v2] method order
Posted by Paul Benedict <pb...@apache.org>.
+1 for alphabetizing. Even if someone commits out of order, there will
be a known process how to fix things. I think it helps browsing the
source code.
Paul
On Thu, Dec 6, 2012 at 7:29 AM, Gary Gregory <ga...@gmail.com> wrote:
> Hi All:
>
> I'd like to keep methods in alphabetical order in source files. Is that
> controversial for anyone? I know it makes for noisy commits so I would do it
> one file at a time when I run into it or in a whole batch. Thoughts?
>
> Gary
>
> --
> E-Mail: garydgregory@gmail.com | ggregory@apache.org
> JUnit in Action, 2nd Ed: http://bit.ly/ECvg0
> Spring Batch in Action: http://bit.ly/bqpbCK
> Blog: http://garygregory.wordpress.com
> Home: http://garygregory.com/
> Tweet! http://twitter.com/GaryGregory
---------------------------------------------------------------------
To unsubscribe, e-mail: log4j-dev-unsubscribe@logging.apache.org
For additional commands, e-mail: log4j-dev-help@logging.apache.org
Re: [v2] method order
Posted by Jacob Kjome <ho...@visi.com>.
On Thu, 6 Dec 2012 14:08:59 -0500
Gary Gregory <ga...@gmail.com> wrote:
>> If you find classes where it makes sense to alphabetize, go for it. But
>> doing this for every class without regard to co-location of related methods
>> is counterproductive, IMO. For instance, for logger, I would order them by
>> the level they represent - low to high - not alphabetically.
>
>
> I can't imagine maintaining each class according to some class specific
> semantic ordering, but hey, that's just me.
>
> Gary
And I can't imagine wasting brain cycles re-ordering methods so that they
match some strict pattern that will surely be broken by someone other than you
in the future. But hey, that's just me.
Jake
---------------------------------------------------------------------
To unsubscribe, e-mail: log4j-dev-unsubscribe@logging.apache.org
For additional commands, e-mail: log4j-dev-help@logging.apache.org
Re: [v2] method order
Posted by Gary Gregory <ga...@gmail.com>.
On Thu, Dec 6, 2012 at 1:25 PM, Jacob Kjome <ho...@visi.com> wrote:
> On Thu, 6 Dec 2012 08:29:42 -0500
> Gary Gregory <ga...@gmail.com> wrote:
>
>> Hi All:
>>
>> I'd like to keep methods in alphabetical order in source files. Is that
>> controversial for anyone? I know it makes for noisy commits so I would do
>> it one file at a time when I run into it or in a whole batch. Thoughts?
>>
>
> I find this to be a bit pointless. Someone in the future will surely
> commit out of order. And I find method grouping to be more important. For
> instance, if you've got a private method that does significant work for a
> particular public method, I usually co-locate the two without regard to
> alphabetical order.
>
> On the other hand, I do generally alphabetize dumb javabean methods.
> Basically, I do it where it makes sense and don't worry about it where it
> doesn't or find it would be an otherwise unnecessary commit.
>
> If you find classes where it makes sense to alphabetize, go for it. But
> doing this for every class without regard to co-location of related methods
> is counterproductive, IMO. For instance, for logger, I would order them by
> the level they represent - low to high - not alphabetically.
I can't imagine maintaining each class according to some class specific
semantic ordering, but hey, that's just me.
Gary
> That is, trace, debug, info, etc... But, ultimately, no matter what order
> they are, my IDE will allow me to find them so it doesn't matter that much
> in the end. So why worry about it?
>
>
> Jake
>
>
> ------------------------------**------------------------------**---------
> To unsubscribe, e-mail: log4j-dev-unsubscribe@logging.**apache.org<lo...@logging.apache.org>
> For additional commands, e-mail: log4j-dev-help@logging.apache.**org<lo...@logging.apache.org>
>
>
--
E-Mail: garydgregory@gmail.com | ggregory@apache.org
JUnit in Action, 2nd Ed: <http://goog_1249600977>http://bit.ly/ECvg0
Spring Batch in Action: <http://s.apache.org/HOq>http://bit.ly/bqpbCK
Blog: http://garygregory.wordpress.com
Home: http://garygregory.com/
Tweet! http://twitter.com/GaryGregory
Re: [v2] method order
Posted by Jacob Kjome <ho...@visi.com>.
On Thu, 6 Dec 2012 08:29:42 -0500
Gary Gregory <ga...@gmail.com> wrote:
> Hi All:
>
> I'd like to keep methods in alphabetical order in source files. Is that
> controversial for anyone? I know it makes for noisy commits so I would do
> it one file at a time when I run into it or in a whole batch. Thoughts?
I find this to be a bit pointless. Someone in the future will surely commit
out of order. And I find method grouping to be more important. For instance,
if you've got a private method that does significant work for a particular
public method, I usually co-locate the two without regard to alphabetical
order.
On the other hand, I do generally alphabetize dumb javabean methods.
Basically, I do it where it makes sense and don't worry about it where it
doesn't or find it would be an otherwise unnecessary commit.
If you find classes where it makes sense to alphabetize, go for it. But doing
this for every class without regard to co-location of related methods is
counterproductive, IMO. For instance, for logger, I would order them by the
level they represent - low to high - not alphabetically. That is, trace,
debug, info, etc... But, ultimately, no matter what order they are, my IDE
will allow me to find them so it doesn't matter that much in the end. So why
worry about it?
Jake
---------------------------------------------------------------------
To unsubscribe, e-mail: log4j-dev-unsubscribe@logging.apache.org
For additional commands, e-mail: log4j-dev-help@logging.apache.org