Timeline for Is it OK to split long functions and methods into smaller ones even though they won't be called by anything else?
Current License: CC BY-SA 3.0
6 events
| when toggle format | what | by | license | comment | |
|---|---|---|---|---|---|
| Sep 2, 2014 at 22:37 | comment | added | supercat | Refactoring the outer-if to an early-exit test is good, and the inner if block should be replaced by something like elements = (Object[])Array.Resize(elements, elements.length*2);, but even without such changes I'd much rather deal with the first than the second. Replacing elements[size++] = element; with a call to addElement(element) doesn't abstract away the precondition that elements.length > size; it merely hides it. | |
| May 5, 2013 at 6:13 | comment | added | gnat | this looks very similar (if not the same) to what is called Extract Method pattern | |
| May 5, 2013 at 5:31 | history | edited | Sebastian | CC BY-SA 3.0 | cited another resource |
| May 1, 2013 at 8:09 | history | edited | gnat | CC BY-SA 3.0 | quote from the referenced link |
| May 1, 2013 at 8:07 | review | First posts | |||
| May 1, 2013 at 8:11 | |||||
| May 1, 2013 at 7:47 | history | answered | Sebastian | CC BY-SA 3.0 |