A code smell means you should look into it, not that it's wrong.
Some things are genuinely 2kloc-complex. Maybe not that many. Do check! But some are.
Some things are genuinely 2kloc-complex. Maybe not that many. Do check! But some are.
I'd like to clarify this was not necessarily 2kloc-complex, this was just 2kloc-long-and-not-really-meant-to-be-reused. It was a fairly long but linear process that was out of the ordinary for the rest of the codebase. It could easily have been split (hell, I had 9 fairly separate stages), but calling any of the intermediate stages out of order or without the context of the rest of the execution flow... would have been a foot gun for someone else. And, as time showed, we never needed those stages for anything else.