Skip to content

Herman J. Radtke III

Tag: #design

Stop Inverted Reuse

Reuse is a term often used amongst developers.  It usually carries with it a positive connotation and a developer writing reusable code is seen as a good thing.  I think there are a lot of developers who have a completely different understanding of what code reuse means.  When I talk about code reuse, I am talking about reusing logic within the code.  Based on code reviews, it seems the most common definition of reuse is: anytime a function or method is used by two or more callers.  This definition fails to realize the true meaning of reuse and can lead to problems.  In the name of "reuse", I have noticed some developers group common code at the application level by creating functions or methods that solve some pseudo-generic problem.  I call this type or reuse inverted reuse.