Hacker News new | ask | show | jobs
Is code a liability?
2 points by mcardleliam 3616 days ago
If you're in the JavaScript community, do you consider every line of code you or your team writes as a liability/risk to your project?
3 comments

Given that there is usually a few "defects" per 1000 line of code, for any given language, it is better to achieve the same functionality with 10 kLoc than 100 kLoc.

That being said there is always a balance between readability and maintainability versus terseness.

And if you reduce your application Loc count by depending on a big external dependencies you just move the problem around (it might be the right solution, you just have to be aware of it)

So yes, I tend to be in the camp considering that code is rather a liability than an asset.

Probably, but the accounting is double entry so there's an asset on the other side of the ledger. The value of each entry goes into determining bottom line.
code complexity is a liability; required functionality is an asset; one measure of engineering efficiency is required functionality per unit code complexity.