Coffeehouse Post

Single Post Permalink

View Thread: General Programmer Question : how much do you reuse code/classes?
  • User profile image

    Parts of my code become reusable when I need to test those segments rigorously. At that point, I can't assume anything about the input or business flow, so it ends up being self-contained. But, because I make it reusable doesn't necessarily mean that it actually gets reused. About the only thing I ever reused was a .NET middleware library for my c++ facial expression recognition engine. I almost always end up building on top of existing frameworks, so the code I actually write is application/business specifc.

    In any case, for a general practice, I'd go for a cross between Herbie's and Bas'...if it's obvious that you can factor it out into something that can sort of stand on its own, then do it. Otherwise, make it reusable on a need basis.