I just wrote a 600 line function and I feel so good about it. It’s clean, clear, structural. The logic falls through. It’s just so goddamn nice! It’s never about how short your code is. It’s always about how clear it is.
Discussion
Writing tests for such a method could be painful. It may also be challenging for other developers to contribute to this code. 🤣
https://en.wikipedia.org/wiki/Single_responsibility_principle
your function is an abomination
Never do this. Ever. 😂
short code can be as bad as long code but code that doesn't stick to one purpose and gets longer than you can read in one screenful is prone to bugs and hard to maintain, and usually is wrong in many ways, something that you will discover as you refactor it into its logical parts