upvote
I once saw a professional software engineer try to refactor the spaghetti code in a complex bioinfomactics project written in python.

It was a complete failure. That branch was abandoned and development continued off the spaghetti.

There is a reason bioinformatics has its own set of viz charts that only they use.

That's my anecdote anyway, it led me to the conclusion that sometimes things are continuous spaghetti and other than some small organizational changes, attempts to exhaustively discretize the code are a fools errand.

The biggest benefits most projects like that are likely to see are performance and debugging improvements accomplished by factoring out recursion.

Mapping to terrain is always the real effort in my opinion.

reply
> It was a complete failure. That branch was abandoned and development continued off the spaghetti.

It was considered too hard, most likely because the present state of the code already degenerated beyond recovery. It might be difficult, but it's never impossible.

> Mapping to terrain is always the real effort in my opinion.

Yes. The domain might be complex, and it might be possible that there are no simple ways to work within that domain. Irreducible complexity is, after all, a thing.

reply