重写还是修复? [英] Rewrite or repair?

查看:19
本文介绍了重写还是修复?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我相信你们都去过那里,你承担了一个项目,那里有一个吱吱作响的旧代码库,几乎不适合用途,你必须决定要么从头开始重新编写它,要么修复什么已经存在.

I'm sure you have all been there, you take on a project where there is a creaky old code base which is barely fit for purpose and you have to make the decision to either re-write it from scratch or repair what already exists.

传统观点倾向于建议您永远不要尝试从头开始重写,因为失败的风险非常高.那么当你遇到这个问题时,你是怎么做的,你是如何做出决定的,结果如何?

Conventional wisdom tends to suggest that you should never attempt a re-write from scratch as the risk of failure is very high. So what did you do when faced with this problem, how did you make the decision and how did it turn out?

推荐答案

这真的取决于它有多糟糕.

It really depends on how bad it is.

如果它是一个小系统,并且你完全理解它,那么重写并不疯狂.

If it's a small system, and you fully understand it, then a rewrite is not crazy.

另一方面,如果它是一个巨大的遗留怪物,有一千万行未记录的神秘代码,那么你真的很难完全重写.

On the other hand, if it's a giant legacy monster with ten million lines of undocumented mystery code, then you're really going to have a hard time with a full rewrite.

需要考虑的要点:

  • 如果它对用户来说看起来不错,他们就会不会在意什么样的意大利面乱七八糟是给你的.在另一手,如果这对他们也不好,那么更容易达成一致(并且耐心).
  • 如果你要重写,试着做一个一次部分.一个凌乱,杂乱无章的代码库可能会使这个困难(即,只更换一个部分需要重写大依赖代码的冰山),但如果可能,这使它更容易逐步进行重写并得到来自用户的反馈.

如果不能一次发布一个新版本,我真的很犹豫要为大型系统承担一个巨大的重写项目.

I would really hesitate to take on a giant rewrite project for a large system without being able to release the new edition one part at a time.

这篇关于重写还是修复?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆