Timeline for My boss asks me to stop writing small functions and do everything in the same loop
Current License: CC BY-SA 3.0
5 events
when toggle format | what | by | license | comment | |
---|---|---|---|---|---|
Nov 14, 2016 at 21:38 | comment | added | Phil M | The answers were more focused on the advantages, I only wanted to point out disadvantages too. Calling a function like sum(a, b) is always going to be more expensive than "a + b" (unless the function is inlined by the compiler). The rest of the disadvantages demonstrate that over-complexity can lead to its own set of problems. Bad code is bad code, and just because its broken into smaller bytes (or kept in a 300 line loop) doesn't mean its easier to swallow. | |
Nov 12, 2016 at 12:26 | comment | added | Rhymoid | "function overhead": that's up to the compiler. "obscuration": OP has not indicated whether it's the only or the best way to check that property; you can't know for sure either. "complex spaghetti logic": where? "the potential for dead functions": that kind of dead code analysis is low-hanging fruit, and development toolchains that lack it are immature. | |
Nov 11, 2016 at 19:44 | history | edited | Phil M | CC BY-SA 3.0 |
added 5 characters in body
|
Nov 11, 2016 at 19:41 | review | First posts | |||
Nov 11, 2016 at 19:57 | |||||
Nov 11, 2016 at 19:38 | history | answered | Phil M | CC BY-SA 3.0 |