I stopped worrying about rearranging and ordering by visibility, member name or getter / setter types, for the following reasons:
Moving a method to its "correct" place can increase the likelihood for merge conflicts (when several people happen to work on the same file at the same time)
IDEs can present the structure of a class or file in any way you like. You can sort by name, filter out private methods, just show fields etc.
IDE code generators usually generate new method stubs right under the method you're working on. Even when those methods are private, I stopped moving them to the bottom of the class. I actually prefer them now being right under the public method that uses them. It makes the code much clearer and easier to follow to me.
Mistakes happen. I want to worry less. I've been almost OCD for most of my life, and letting go of those things makes me happier 😁
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
Except for the following rough layout:
I stopped worrying about rearranging and ordering by visibility, member name or getter / setter types, for the following reasons:
Moving a method to its "correct" place can increase the likelihood for merge conflicts (when several people happen to work on the same file at the same time)
IDEs can present the structure of a class or file in any way you like. You can sort by name, filter out private methods, just show fields etc.
IDE code generators usually generate new method stubs right under the method you're working on. Even when those methods are private, I stopped moving them to the bottom of the class. I actually prefer them now being right under the public method that uses them. It makes the code much clearer and easier to follow to me.
Mistakes happen. I want to worry less. I've been almost OCD for most of my life, and letting go of those things makes me happier 😁