top | item 40525398

(no title)

zendist | 1 year ago

The rule of three[1] also comes to mind and is a hard learned lesson.

My brain has a tendency to desire refactoring when I see two similar functions, I want to refactor--it's almost always a bad idea. More often than not, I later find out that the premature refactoring would've forced me to split the functions again.

1: https://en.m.wikipedia.org/wiki/Rule_of_three_(computer_prog...

discuss

order

swader999|1 year ago

Nice, I advocate for this but never new it was a more formal thing.