|
|
|
|
|
by collyw
4624 days ago
|
|
I was thinking about this recently, and wondered how other people think of this. Working in a high level language like Python, you can do quite a lot in one line, for example in a list comprehension. Should a "productive" one liner be put in a separate method / function with meaningful name, or better a comment beside it? I personally find short methods often decrease code readability, as you constantly have to jump around, and can't read anything from top to bottom. |
|
In general, if you have to jump into every method call to understand a method that calls other methods, the names are bad – probably too short and don't state intention.