4 ms·
As someone who regularly inherits functions that are 300 lines long, I'll take 20 clean small functions over that any day.
by rxhernandez 5y ago
As someone who regularly inherits functions that are 300 lines long, I'll take 20 clean small functions over that any day.
- deleted 5y ago[deleted]
- deleted 5y ago[deleted]
- goblin89 5y agoI am reading this comment section in disbelief. If I were into conspiracy theories, I’d think it’s a spontaneous collaboration to misguide developers and ensure continuous job security for those of us whom desperate businesses would have to hire to clean up and maintain Copilot-generated single-function spaghetti. Modularizing code into focused units is a big part of how you end up with sustainable software (another important part is understanding the requirements).
- SAI_Peregrinus 5y agoOne of the easiest ways to make code clearer is to have well-named single-purpose functions that are used in many places. One of the easiest ways to obfuscate code is to have control flow obscured by hiding it in functions scattered around the codebase. Getting the former without the latter can actually be difficult, particularly with large teams.
- deleted 5y ago[deleted]
- deleted 5y ago[deleted]