There's a common code smell involving long methods with the most common answer being that methods should be really small, less than 50 lines per say (or 20). I understand why this is because it enhances readability, reduces repeated code, etc. However, I was wonder if this is at a statement level or at a file line level.
For example, let say I had a method that was being called and it had a lot of parameters passed (ignore the LPL smell for this example), too much that it would span across the width of a common editing window size in an IDE.
method(A, B, C, D, ...);
EDIT Envision the lettered parameters to be some typed variable, ellipses indicates further parameters.
However, somebody may write the method call like this
method( A, B, C, ...);
Now this spans multiple lines, but in my personal opinion, its far easier to read scrolling down than across. The actions on the mouse are also different since scrolling side to side often requires a mouse select of the (left to right) scroll bar (I'm aware a button could be programmed to do this and some mouses have a joystick built in, but it isn't common in business).
I find this to be relevant for SQL queries. For example
SELECT A.A ,A.B ,B.C ,B.D FROM table A LEFT JOIN table B ON A.E = B.E AND A.F = B.F WHERE A.A IS NOT NULL AND B.C > 50
Now in this scenario, when I'm testing, its very easy to comment out where clauses or change logic operators by commenting them out instead of performing deletes if it was all on one line and had to re-type.
I guess I was wondering what long line method smell really means and whether its long lines in terms of many statements or long lines in terms of lines per file?