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

科技回声

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

GitHubTwitter

首页

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

资源链接

HackerNews API原版 HackerNewsNext.js

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

But I already wrote it

41 点作者 Nemmie将近 12 年前

7 条评论

jerluc将近 12 年前
Although I tend to agree with the author&#x27;s sentiments here, there is one important distinction that ought to be made here: more features&#x2F;capabilities != more code != more complexity.<p>In my experience developing both in net-new codebases in addition to large legacy codebases, there certainly are cases where better abstractions&#x2F;paradigms equate to less code, and ultimately to less complexity. Yet at the same time, these improvements tend to yield more flexibility and capability, potentially providing additional features (sometimes entirely by chance). I find that in these such cases, it actually becomes easier to reason about what your code does, because you have come to a point where you can clearly generalize about your software.<p>On the flip-side, I can also greatly empathize with the author, as even in my attempts to generalize the functionality of software, there often exist ugly one-off bits of critical business logic that invariably dirty the water. In these such situations, it seems to become harder and more complex to build generic code, and you are much better off just sticking to the straightforward implementation without allowing for any of the bells-n-whistles that a more generalized approach might offer.<p>TL;DR--It really depends on the situation, in my opinion, but this shouldn&#x27;t prevent you from trying to find a generic solution that is less complex yet offers more.
wldlyinaccurate将近 12 年前
Many otherwise good developers I know struggle with this. The best way I&#x27;ve found to combat it is to pair with them during high-level design&#x2F;dev, and code review early and often.<p>This works if you&#x27;re in a position of power, but sadly even some senior and lead developers seem to struggle with it.
nextweek2将近 12 年前
A colleague of mine likes to short cut a customer discussion about features by suggesting &quot;We just add an option&#x2F;tick box&quot;. He knows I hate him saying that but he feels happy everybody thinks he&#x27;s found a solution. When infact he&#x27;s just creating technical debt.<p>I distance myself from those that don&#x27;t take my advice. It&#x27;s easier on me.
评论 #6233778 未加载
评论 #6234663 未加载
aggronn将近 12 年前
In this case, would you refactor by removing only the components in the interface, or would you ask them to just delete everything extra wholesale?
评论 #6236184 未加载
rasur将近 12 年前
There&#x27;s an acronym for this: YAGNI<p>You Ain&#x27;t Gonna Need It.
mesozoic将近 12 年前
How has no one yet shunned the author for writing poor documentation. Sure you can just throw the code away but ultimately his time was wasted. He probably wants to keep it for the next time they write poor documentation that actually does need that feature.
gailees将近 12 年前
Couldn&#x27;t agree with this more. So many developers I know let sunk costs influence their actions and it stifles their ability to innovate.