Source Code: Asset or Liability?

June 3, 2011

For those who feel that source code is a liability, my immediate reaction is this: Are you nuts?

Then again, I’m an optimist. With me, the glass is always half-full. I’ll bet that those who view source code as a liability are the half-empty crowd. Or experienced developers who have shoe-horned just one more feature into code that seemed to be actively fighting back.

Actually, I agree with the reasoning behind the assertion that code is a liability. However, classifying all code as a liability – psychologically speaking – isn’t exactly rewarding. It also isn’t accurate and frankly, telling programmers and the business folks that all the time, effort and money invested in creating software nets out to owning a liability paints software development in a very bad light.

Poorly-designed code is a liability because the level of difficulty in updating poorly designed code with new features can range from difficult to impossible. Poorly-designed code raises the bar in terms of the time, effort and level of concentration required to update it. And it usually requires a lot of regression testing to make sure that “unrelated” features weren’t dinged in the process. If your organization is wrestling with poorly-designed code, odds are that you are “investing” much more time in defect-fixing than you would if the code was well-designed.

Does anyone doubt that we can write code is readable, modular, and maintainable? If we started from scratch and did all the right things – including refactoring code as required when we added new features, shouldn’t we be able to maintain the code indefinitely? (At least until we reach a point where we have a new product/platform demand, like moving from client-server to cloud computing.) Well-designed code is an asset because you can continue to enhance it with valuable features – while removing features that have been proven to have no worth for good measure.

Code is an asset because it is the blueprint used by the compiler to produce (valuable) working software. Wikipedia’s definition an asset is, “…anything tangible or intangible that is capable of being owned or controlled to produce value and that is held to have positive economic value.” Source code represents the combined knowledge of business users and developers – with all of the requisite instructions on design and behavior that the computer must follow – to produce an end product that provides value.

Conversations, requirements documents and prototypes are all intermediate inputs used on the way to creating the software. The source code itself is an intermediate input because the compiler does the actual construction, but the source code is the final, authoritative point of human interaction. That is what makes source code an asset.

Poorly designed code is an inhibitor to providing a continual value stream, and that’s what we need to focus on. Poorly designed code represents debt that has occurred because important practices were neglected in the first place. And if you are deferring work like refactoring to cram features into the code now, the sacrifice in good design is the debt and the conversation that you must have.

Those of us on the development side of the house need to pay attention to how we’re communicating with our business counterparts. I feel strongly that positioning all source code as a liability puts a very negative connotation in the minds of those on the business side. We need them to understand that source code is a critical asset that all too often gets neglected. This is what inspired me to write a post, Source Code: An Important, Yet Undervalued Asset.

If you’re still not convinced that code is an asset, consider this: Let’s say that you have the opportunity to purchase a small, growing software company at a very attractive price. This company has been steadily adding new capabilities to their software for the past two years, and from all appearances the company and product are poised to take off. Would you say this? “I’ll buy the company, but keep your source code, that’s a liability that I don’t want.”

If you responded, “Keep the source code,” I want to play Monopoly with you!