Clear thinking about code reuse

Udi Dahan has just fired off a great post about the pitfals of trying to reuse code – that we make big problems for ourselves by trying to re-use domain-specific code into ways it wasn’t designed to be used. Successful re-use comes about when the code being used is generic enough to actually work in more than one context, and has been designed with this re-use in mind.

In other words skillful re-use is not about grabbing at something that looks close to what you need and trying to make it work, but instead deciding if what you’re doing makes sense to re-use, and if so thinking about how others will re-use it.

Sharing:
  • email
  • RSS
  • Twitter
  • LinkedIn
  • Facebook
  • Google Bookmarks

Leave a Reply