Yosuf Ibrahim wrote:I would like to know why is splitting some lines of codes neater and more readable
What you then posted is incorrectly indented; you need empty lines between successive methods. No wonder that isn't clear.
Yosuf Ibrahim wrote:. . . Way neater, easily readable and more organized than this. . .
See, three lines, and yes, I did say that. That method is now clearly indented, so everybody can see where it starts and finishes, how many statements it contains, etc. If you use Allman indentation, that becomes four lines.If you find Allman indentation easier to read, then make a policy of using it. If you are using an IDE, Junilu is right to say feed the options to your IDE and let it do all the indenting, and also that all members of a team must conform to local conventions.
the smallest method should be at least 3 lines long . . .
Campbell Ritchie wrote:If you use Allman indentation, that becomes four lines.
Campbell Ritchie wrote:Make sure to give a good explanation for coding styles.