Thursday, August 23, 2012

Water Glasses and the Cost of Reuse

This summer my wife and I had a huge dilemma in our house. With kids home from school and the hot weather, our family of 9 ( 7 kids at home) was going through all of our glasses in our cupboards. We actually have more than 9 glasses, in fact we have plenty of glasses. But for some reason our glass cupboard was empty and our sink was full of glasses all summer long. Something about teenagers not being able to reuse the same cup more than once. In some respects I don’t blame the older kids. The younger kids, especially our 5 year old, just grabs any cup they can reach and gets himself a glass of water. If my 5 year old was not a walking magnet dirt, grime and everything sticky, I am sure the older kids wouldn’t mind to reusing the glasses sitting by the sink. So there is the dilemma, I have a limited number of glasses (supply), a fixed number of kids, at least right now (demand), and an unlimited demand for drinks of water. What a better reason to show the benefits of reuse.

Warning software geekiness alert!!!!

The costs of not reusing the glasses is very measurable. If I have to buy more glasses that costs money, more glasses probably means  more cupboard space as well. Not to mention more cycles of the dishwasher running. Another option is to limit the number of drinks of water per child per day. So reuse most definitely has a benefit. A measurable benefit. Money in my pocket. This is great. More money for my vacation fund or more than likely kids college fund.

Being the engineer that I am I started looking to see if there was a cost to re-use as well. It didn’t take long to find one of the costs of re-using glasses on the counter. All I had to do is open a bill from the doctor’s office.  Little kids tend to be petri dishes for germs and virus and anything else they pick up at school, the playground or a friend’s house.  And many of these little bugs spread like wildfire when we have reuse model of sharing glasses. Ok a bit of a stretch, but sharing is not always a good thing.

So what does that have to do with software engineering? Code reuse has been touted as the holy grail of software engineering. We always look at the benefit of reusing a component or code in a product. The benefits are great. Development team reduction, maintaining one component instead of multiple components, validation cycle reduction, etc... But what is the cost of re-use? Is there a cost? Just like the water glass situation in my house it depends on the design and architecture of the solution. The costs could be high or it could be low based on the what you value most.
There are different levels of re-use that should be explored. An article by Amber shows the different areas of reuse.
Architecture-Driven Reuse
·       The reuse and/or development of reusable technical and business components and services described by your enterprise architecture models
·       Sometimes referred to as domain-component reuse
Artifact Reuse
·       The reuse of previously created development artifacts: use cases; standards documents; domain-specific models procedures and guidelines; and other applications
Code Reuse
·       The reuse of source code within sections of an application and potentially across multiple applications
·       Includes use of Web services
Component Reuse
·       The reuse of pre-built, fully-encapsulated components in the development of your application
Framework Reuse
·       The reuse of collections of classes that, together, implement the basic functionality of a common technical or business domain
Inheritance Reuse
·       The use of inheritance in your application to take advantage of behavior implemented in existing classes
Pattern Reuse
·       The reuse of publicly documented approaches, called patterns, to solving common problems
Template Reuse
·       The reuse of a common set of layouts for key development artifacts – documents, models and source code – within your organization



Many times we just focus on the code reuse without considering the other areas of reuse. Ignoring these other areas can lead to increased costs. It may not always be the best thing to re-use product artifacts. I think we need to spend more time analyzing the benefits and costs before just jumping into something.

By the way, my wise parents (6 kids)  had a solution to the water glass problem. No reuse at all. They put a water faucet in the kitchen. No more water glasses in the sink. Reuse was just too costly and messy.


DWP

No comments:

Post a Comment