Re:The bunny theory of code
by scott_s on Monday May 18, 2015 @11:15AM
(#9564916)
If you find yourself repeating a pattern in many places, with slight variations in the values used, that's a good candidate for refactoring that pattern into an abstraction for that resources. In your example, I can easily imagine refactoring uses of that library being abstracted into a class or a set of functions so that interaction with the library only happens in one place.
[ Parent
| on HN ]
There are no comments on this comment yet.