Hacker News new | past | comments | ask | show | jobs | submit login

If you view code as a liability then more code is worse.



Viewing code as a liability does not make it worse, as not all code as the same level of liability associated with it. I'd much rather have double the lines of code if it yielded a code base that was more maintainable, easier to reason about, easier to debug, and had better separation of concerns.


Well okay, but is it the ultimate liability? What if 2x the code gives you 10x the value?


OK, I'll expand my comment to say that "more code for the same functionality is a liability".


This is such a thorny issue.

First off, there's the reductio ad absurdum in the room: perl. Using perl, I could rip off some amazing things in amazingly little code. (Forth, too, come to think of it.) I think, though, that most of us who initially fell in love with it eventually came to learn that denser code is not necessarily better code. Nowadays I'll gladly take the same thing written in 5X as much Python code.

Second, sometimes more code provides useful things, like bulkheads and seams that allow for easier modification in the future. Over in OO-land, I find that writing SOLID code often increases line counts considerably, but I still strongly prefer my code to be SOLID.

Long story short, I find that code volume can be a proxy for code quality, but it's a very imperfect one.


> bulkheads and seams

I really like those analogies, I'll reuse them!




Consider applying for YC's Spring batch! Applications are open till Feb 11.

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: