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

科技回声

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

GitHubTwitter

首页

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

资源链接

HackerNews API原版 HackerNewsNext.js

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

I never delete code - only comment them

8 点作者 perivamsi大约 14 年前

4 条评论

goo大约 14 年前
This is f-ing terrible. Put your code into version control and stop having it be bad, for goodness sake.
ivank大约 14 年前
I've seen one reason to keep old code in: if the new implementation is complicated and the old one is short and simple, keep the old one as documentation for how the new one <i>essentially</i> works.
评论 #2476702 未加载
teyc大约 14 年前
There are times when this is required. For instance, where I find there is a line of code that shouldn't be called. Commenting it out and explaining that it breaks so and so is preferable to deleting it all together because there is a risk another developer will make the same error too.
headShrinker大约 14 年前
Sorry I don't agree with this. I delete code all the time. The difference is, when I write elegant code that I am proud of I save it. The majority of code I write is utility not elegant by comparison. This is like my art, or any art.