Re:Write code that is easy to delete, not easy to extend (2016)
by butisaidsudo on Wednesday July 22, 2020 @08:09PM
(#23922900)
Yup, I'm a big believer in applying the rule of three ( https://en.wikipedia.org/wiki/Rule_of_three_(computer_progra... ) for moving code into a library as well. I find if I create an API with just one or two examples in mind, it often doesn't turn out to be as general as I thought it would be. By the time I've done something three times, I have a much better idea of what the different use cases will be.
[ Parent
| on HN ]
There are no comments on this comment yet.