DEV Community

Discussion on: What conventional wisdom in software is wrong?

Collapse
 
conw_y profile image
Jonathan • Edited

That code will be easier to understand if it has many short classes/methods/functions (as opposed to fewer, longer ones).

Not true!

Merely breaking up a problem arbitrarily doesn't make it any easier to reason about, in fact, probably the reverse.

Breaking up a problem in ways that make it easier to solve is what we really want! 🙂

This might lead to many short modules, or it might lead to some short and some long modules. It depends on the nature of the problem.

But simply trying to reduce number of lines of code, number of methods, etc. is completely missing the point!