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

科技回声

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

GitHubTwitter

首页

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

资源链接

HackerNews API原版 HackerNewsNext.js

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

Things You Should Never Do [2000]

9 点作者 MagicClam超过 13 年前

2 条评论

api超过 13 年前
An oldie but goodie...<p>The only exceptions I can think of are:<p>1) The state of the art has fundamentally changed. In this case you are not actually <i>re-writing the same thing</i>. Rather, you are writing something new that obsoletes the old thing. For example, one might replace a string matching based spam filter with a Bayesian spam filter.<p>2) The architecture is fundamentally different. For example, you might have to rewrite to port a piece of high performance computing code from MPI to GPGPU, or to make something single threaded aggressively multi-threaded. It might require a whole new approach to the problem.<p>3) I do believe that there exist code bases that are <i>so fracking gawd-awful</i> that there is nothing to be done with them but take them out behind the barn and shoot them in the head. But these are in the minority, and usually they never worked well or established any kind of "market leading position" to begin with. (If they did, it must not have been a crowded market.)
richardg超过 13 年前
<i>There's a subtle reason that programmers always want to throw away the code and start over. The reason is that they think the old code is a mess.</i><p>This one hits the nail on the head, also, maybe it's better since you did it yourself, rather than somebody else?<p>Rather than reading someone else's code, it's better to write your own..<p>then the next guy comes along and does the same thing to your old code..