TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

The Half-Life of Code (2017)

63 pointsby tmfiabout 4 years ago

3 comments

0x4d464d48about 4 years ago
I&#x27;ve always been partial to the concept of ravioli code which I read about from John Papa. Contained modules that do a job that can be added or removed. You decide whether or not you need that modules fucntionality with no other module having a dependancy on other modules.<p>I agree with the spirit of this article, having a responsive code base with easily replaceable code. But this becomes a problem when you have a code base with sprawling legacy modules with essential functions for core customers that new code must interface with.<p>I worked for a company that attempted to incorporate agile methodology to add features on to a large legacy system to try and stay responsive to customer feedback. The problen was when new features were added we were only adding on to the &quot;cruft&quot; mentioned in the article. As unintentional as it was new code would start to tightly couple with legacy code. In spite of that we kept continuously adding new features with the predictable results of more tech debt, bugs and on-call catastrophes.<p>I&#x27;m all for responsive code that instantly reflects customer requirements but it requires a lot of discipline and planning.<p>Ideally, &quot;legacy code&quot; wouldnt exist at all and keeping a low half life should help with that. But in the real world, with people being the irrational, nepotic, lazy and self-deluding creatures we are, thats not going to happen. I&#x27;d caution anyone to really know what theyre doing before rationalizing poor design choices by thinking &quot;it&#x27;s not technical debt if were going to throw the code away anyway!&quot;<p>I&#x27;m sure that&#x27;s what the original authors were thinking when they wrote that awful legacy monstrosity you&#x27;re dealing with now.
vvandersabout 4 years ago
Over the years one of the most valuable questions I&#x27;ve asked myself as I&#x27;ve worked in long living codebases:<p>&quot;If I had to delete this feature tomorrow how quickly could I do it?&quot;<p>If you come back to this question a few times over development it does a wonderful job of really forcing you to consider your coupling and dependencies. In most cases it&#x27;s been &quot;delete a few dispatch calls and nuke the whole feature namespace&quot; which has held up very well when future changes come down the pike.
评论 #26295472 未加载
filoelevenabout 4 years ago
I expected this to be a (welcomed) repost of a different article about the half-life of code. There was some good discussion in that post, and that article has charts which do a good job of showing a codebase’s evolution. Interesting stuff.<p><a href="https:&#x2F;&#x2F;news.ycombinator.com&#x2F;item?id=13112449" rel="nofollow">https:&#x2F;&#x2F;news.ycombinator.com&#x2F;item?id=13112449</a>