Small Functions

The first rule of functions is that they should be small. The second rule of functions is that they should be smaller than that. Clean Code: A Handbook of Agile Software Craftsmanship page 34

Decades of evidence say that routines of such length (>100 lines) are no more error prone than shorter routines. Let issues such as the routine's cohesion, number of decision points, number of comments needed to explain the routine, and other complexity-related considerations dictate the length of the routine rather than imposing a length restriction per se. That said, if you want to write routines longer than about 200 lines, be careful. Code Complete 2e page 173

Treatment to long functions: https://refactoring.guru/smells/long-method

results matching ""

    No results matching ""