Timeline for Should I create a class if my function is complex and has a lot of variables?
Current License: CC BY-SA 3.0
6 events
| when toggle format | what | by | license | comment | |
|---|---|---|---|---|---|
| Sep 16, 2015 at 0:01 | comment | added | mrr | The small amount of complex code has contained complexity. There's complexity, but only there. It doesn't leak out. When you have a whole lot of individually simple pieces that work together in a really complex and difficult to understand way that's much more confusing because there are no borders or walls to the complexity. | |
| Sep 16, 2015 at 0:00 | comment | added | mrr | Lots of "simple" code that interacts in a complicated way is WAY worse than a small amount of complex code. | |
| Sep 15, 2015 at 23:57 | comment | added | radarbob | "Unnecessary complexity" reminds me of priceless comments from co-workers such as "oh, that's too many classes." Experience tells me that the juice is worth the squeeze. At it's best I see virtually entire classes with methods 1-3 lines long and with every class doing it's part complexity of any given method is minimized: A single short LOC comparing two collections and returning the duplicates - of course there is code behind that. Don't confuse "a lot of code" to complex code. In any case, nothing is free. | |
| Sep 15, 2015 at 21:32 | comment | added | mrr | OO design naturally manages complexity OOP naturally introduces unnecessary complexity. | |
| Sep 13, 2015 at 22:29 | history | edited | radarbob | CC BY-SA 3.0 | added 49 characters in body |
| Sep 13, 2015 at 22:24 | history | answered | radarbob | CC BY-SA 3.0 |