Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is it better to rewrite inherited code than fix it? [duplicate]

Tags:

refactoring

Possible Duplicate:
When is it good (if ever) to scrap production code and start over?

Say you have been given a project, and you look at the code. Although it works, and is functional, you realize that to make future changes it would be easier to rewrite a large portion or all of the code. Is it better to do the rewrite? If it costs you a delay now, but saves you delays later (and possible bug fixes later), is it worth it?

Or do you simply fix what you see as you go along and are touching that part of the code?

Or do you fix it only if a bug is reported that would require touching that code?

like image 350
esac Avatar asked Nov 28 '22 12:11

esac


2 Answers

  • How much time do you have?
  • How much money can you spend?
  • Have you done an ROI analysis?

It too often comes down to money$$.

like image 110
jldupont Avatar answered Dec 09 '22 17:12

jldupont


It depends how large the code base is.

Have you read this article?

like image 24
mheathershaw Avatar answered Dec 09 '22 15:12

mheathershaw