News for hackers. Stuff that matters.
Re:In the Defense of Spaghetti Code (2013) by reallydontask on Monday July 22, 2019 @07:06AM (#20496877)
It's all about balance really and this is part of the problem.

1500 lines of code for a function/method would strongly suggest a problem. In the same way as a 200 function/methods would make it hard to follow.

Re:In the Defense of Spaghetti Code (2013) by barking on Monday July 22, 2019 @07:33AM (#20496993)
If breaking up a procedure results in the creation of a bunch of smaller procedures that are only called once then I think I'd prefer to leave it as it was with well demarcated and commented sub-sections.

It saves you the job of inventing descriptive procedure names as well as jumping between procedures.

I seem to recall also that in Code Complete, Steve McConnell claimed that there was an inverse relation between the length of a procedure and the number of errors per line of code.

Re:In the Defense of Spaghetti Code (2013) by CuriouslyC on Monday July 22, 2019 @09:21AM (#20497705)
How is an inline function different from a demarcated and commented subsection? It seems to me that the semantic and enforced correctness benefits of functions would make using them in this way a no brainer.
Re:In the Defense of Spaghetti Code (2013) by Gibbon1 on Monday July 22, 2019 @01:58PM (#20500494)
This exactly when you break up a logically flat function into subfunctions, the names of those functions are simply replacing comments.
Re:In the Defense of Spaghetti Code (2013) by barking on Monday July 22, 2019 @10:07AM (#20498061)
Sounds like it alright but I've never used one as they aren't available in the language I mostly use.