Strategic Code Reuse

The first thing you learn in programmer’s kindergarten: “Don’t reinvent the wheel”. The second thing you learn is: “Make wheels for your friends”. This talk examines when this is good advice and when it is bad and how to get the most bang for your reuse buck.

If need the same functionality in two projects, you should reuse code between them, right? Or should you? For as long as there has been a profession of software engineering, we have tried to achieve more reuse. But reuse has both a benefit and a cost. Too often, the cost is forgotten. In this talk, I examine the economics of reuse.

True story: One of the earliest projects to embrace object-oriented programming in the 1990s did so with the goal of maximizing reuse. The team responsible for creating the company wide framework used the following formula for calculating the value of their work:

[Value of reuse] = [numbers of uses of framework] * [value of the framework to reusers] – [cost of developing the framework]

This formula is obviously correct, but this is where they went horribly wrong: The organization said [value of framework to reusers] = [cost of developing framework]. In other words: The more expensive it was to create, the more valuable it was to use. In this talk, I will expand on the formula for the value of reuse, I will examine the difference between tactical and strategic reuse and I will point to factors that will make reuse harder or easier.

Video producer:

Related Videos:

No Responses