Hacker News new | ask | show | jobs
by naasking 946 days ago
> As a programmer, your mental theory of the code base has value to its owners, but it's not the product

If you lost all of the code today, with the right understanding you could build it again relatively quickly. If you lost all that understanding, say all the developers quit, the program will no longer be adapted to customer needs potentially for years until that understanding is rebuilt.

I agree that "product" is probably not the right word, probably "asset" fits better. Losing that knowledge is like losing a manufacturing plant for your product. The plant isn't the product but it's a key asset for producing the product.

2 comments

This is a great point.

At a micro level, this helps articulate why rewriting/refactoring a feature just after writing the first version of it is so quick, relatively. And why it is often easier to write better code in a second pass. The first time you had to build the theory AND the code at the same time. In subsequent passes, you have the benefit of the theory from the start.

I think this concept is self-evident to most experienced engineers, but I have not heard quite as succinct an articulation of it before.

> If you lost all of the code today, with the right understanding you could build it again relatively quickly

Yes, but it has nothing to do with the codebase. There are 10,000 ways of building the same product with entirely different codebases.

Building the same product with a different codebase is virtually guaranteed to be a disaster. This is the famous "second system effect."

Sometimes the original coders are the only people who know, not only how the software works, but even what it does. Unknown uses include features discovered by users but unknown to the makers, and one-off hacks created to serve a valuable customer.

> Building the same product with a different codebase is virtually guaranteed to be a disaster.

There is no point in going back and forth over this unless you have a real world example.

> This is the famous "second system effect."

[1] I believe you've misunderstood this effect. My understanding is that in the "second system effect", the succeeding system is not the "same" as the original

[1] https://en.wikipedia.org/wiki/Second-system_effect

Sure, but deviation from a known path introduces more risk. Every different technical choice at the very least may introduce unforeseen incompatibilities with previous "knowns".