TE
科技回声
首页24小时热榜最新最佳问答展示工作
GitHubTwitter
首页

科技回声

基于 Next.js 构建的科技新闻平台,提供全球科技新闻和讨论内容。

GitHubTwitter

首页

首页最新最佳问答展示工作

资源链接

HackerNews API原版 HackerNewsNext.js

© 2025 科技回声. 版权所有。

A Codebase Is an Organism (2014)

115 点作者 Kortaggio将近 6 年前

12 条评论

code_biologist将近 6 年前
Catabolism is another aspect of thinking about code as an organic entity that I find useful. Anabolic (growth) processes and catabolic (teardown) processes always accompany each other in biological systems. Too often we neglect to continually tear down and remove unused aspects of our systems.<p>Both anabolism and catabolism are always operating, though at different rates depending on the environment and needs of the organism. The funny thing is that catabolic processes will happily tear down important parts of the system, forcing them to be anabolicly rebuilt. Things like bone and muscle mass. This seems wasted, but it has an extremely important purpose: uncontrolled anabolism is cancer.<p>I think the analogy to code is obvious. We&#x27;ve all seen codebases that have gotten out of hand (gotten cancer), and part of the reason they got that way is because the growth pressures had no countervailing teardown pressure. The market provides selective pressure in nasty ways: codebases and systems with cancer slow and die, and are replaced by younger codebases without uncontrolled growth.<p>How do we break that cycle? By encouraging catabolic activity culturally within our companies and codebases. Cleanup is incredibly valuable. Functionality that isn&#x27;t being heavily used and is complicating implementation of new work should absolutely be on the chopping block. We don&#x27;t have to be quite as aggressive as biological systems, but we shouldn&#x27;t take their example lightly either.<p>This also provides insight into when cleanup doesn&#x27;t matter: when the survival horizon of the organism is sufficiently short that cancer frankly doesn&#x27;t matter. Startups shouldn&#x27;t worry too much until they have product market fit. Once it&#x27;s clear they&#x27;ll be around for years more though, catabolic work will help ensure future health.
评论 #20790554 未加载
taneq将近 6 年前
I&#x27;ve been waiting for a long time for people to start using the title &quot;robopsychologist&quot; in earnest. Especially for people who are called out to debug an unfamiliar system, in &#x27;the wild&#x27; (ie. in production). You have to calm the system down, find out what it thinks is going on, gently correct any misconceptions, and guide it towards a better understanding of the world that lets it behave the way you need it to.
评论 #20789514 未加载
评论 #20789176 未加载
kazlock超过 5 年前
&gt; two modules will tend to grow ever more dependent on each other unless separated by hard (&#x27;physical&#x27;) boundaries<p>This is especially true in monorepos. Code resuse has it&#x27;s benefits, but left unchecked the dependency graph can turn into a huge highly-connected glob. Modules end up accidentally importing code they have no business importing because of sneaky transitive dependencies. The blast radius of even small simple changes becomes enormous, and testing&#x2F;debugging becomes more and more complex.<p>A great way to keep this in check is to have apply code isolation in the test environment. When you checkout the entire repo for a build or test, its easy for these kinds of dependencies to grow unnoticed. But if you require build&#x2F;test targets to explicitly declare what code they depend on (and only make that code present when running them), changes to the dependency structure must be explicitly acknowledged in code review. This is one of the core principles behind build tools like Bazel.
评论 #20812828 未加载
评论 #20791130 未加载
js8将近 6 年前
A codebase is an orgasm. People working on it get excited when it is starting, and when it&#x27;s done, they become very tired of it.
评论 #20789435 未加载
preston4tw将近 6 年前
Two things: mods can we get the title updated to reflect the publish year of 2014?<p>The second is that the codeswarm link in the article is dead. This project on github is the closest thing I can find to any remnant of the project: <a href="https:&#x2F;&#x2F;github.com&#x2F;rictic&#x2F;code_swarm" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;rictic&#x2F;code_swarm</a>
评论 #20793782 未加载
gandalfgeek将近 6 年前
Not just code bases, but it is useful to think of large planet scale systems in organic terms.<p><a href="https:&#x2F;&#x2F;blog.vivekhaldar.com&#x2F;post&#x2F;6972614229&#x2F;large-computer-systems-are-organic" rel="nofollow">https:&#x2F;&#x2F;blog.vivekhaldar.com&#x2F;post&#x2F;6972614229&#x2F;large-computer-...</a>
评论 #20788390 未加载
gfodor将近 6 年前
framing failing fast or not as a conflict of interest between computer and codebase is an interesting one. I’ve often seen it as a conflict of interest between the user and the developer: users want the code to muddle through (“PHP style”), but devs want highly visible obvious failures early so they are easily identified and fixed.<p>How do people balance this? The “state of the art” still seems to be things like “have asserts turned on in the debug build” but a holistic approach where the application has different runtime contracts with regards to failures based upon who is using the app seems somewhat underutilized — I’ve done it piecemeal with application feature flags but has anything like this been done at the platform&#x2F;language&#x2F;framework level?
carapace超过 5 年前
A codebase is a mechanical approximation of a set of human intentions. It&#x27;s a model of an organic phenomenon.
评论 #20790505 未加载
euske超过 5 年前
&gt; In this way, building software isn&#x27;t at all like assembling a car. In terms of managing growth, it&#x27;s more like raising a child or tending a garden.<p>I knew it! I always thought maintaining my project was like doing a bonsai tree!<p>(Disclaimer: I have zero experiences of bonsai.)
评论 #20790497 未加载
qes将近 6 年前
Not even just the source code. Our system, even with the source code static, has constantly changing characteristics.<p>We integrate with dozens of 3rd party APIs, making over 10M external HTTP calls per day. That leads to a lot of variability in runtime characteristics.
评论 #20788955 未加载
qntmfred将近 6 年前
Always liked the garden metaphor <a href="https:&#x2F;&#x2F;blog.codinghorror.com&#x2F;tending-your-software-garden&#x2F;" rel="nofollow">https:&#x2F;&#x2F;blog.codinghorror.com&#x2F;tending-your-software-garden&#x2F;</a>
lonelappde超过 5 年前
A production system is like the TARDIS.<p>You don&#x27;t program the system, you negotiate with it.