Live data from Hacker News

Ask HN: How to tell someone you need to rewrite an entire project?

news.ycombinator.com

1–10 of 25 posts

Re: Ask HN: How to tell someone you need to rewrite an entire project?

#2
The way I would approach it is, to create a really simple table which, contains the pros of fixing the current code on one side and doing a rewrite on the other.

Then I would provide the benefits of doing both and then I'd present this to the person and say having, looked at our current code I believe that we should rewrite it because of X, Y and Z, in fact I'd even summarize this at the bottom of the table as well incase they want to take the table away and think about it.

Re: Ask HN: How to tell someone you need to rewrite an entire project?

#4

The way I would approach it is, to create a really simple table which, contains the pros of fixing the current code on one side and doing a rewrite on the other. Then I would provide the benefits of doing both and then I'd present this to the person and say having, looked at our current code I believe that we should rewrite it because of X, Y and Z, in fact I'd even summarize this at the bottom of the table as well i…

I guess I'll try that. The code is poorly written and with possible bugs in it, so I can show a lot of problems to prove my point.

Re: Ask HN: How to tell someone you need to rewrite an entire project?

#5
Also, be very, very sure that a rewrite is the right thing to do. Probably 80-90% of the time, it isn't, and you'd be much better off with an incremental refactor.

One major way to tell: can you clearly specify what the revised version should be doing, in a way that doesn't involve "whatever the old version did"? Another litmus test: do you fully understand the old code and why it sucks the way that it does?

Re: Ask HN: How to tell someone you need to rewrite an entire project?

#6
Quantify it. That's all most managers understand.

Customer X wants the product in 12 weeks or they're going with a competing product. Customer X may be spending 6 or 7 figures with us over the next 5 years in upfront costs and ongoing maintenance and support fees.

You may be saying, "It'll just take 6 months (24 weeks) to re-write this from scratch and do it right" (managers are used to hearing programmers say this sort of thing). For the most part, managers don't care about "doing it right" from a technical perspective, they only care about the bottom line. How is doing it right going to make more money (especially if we loose customer X in the process???)

Also, be careful when making this suggestion. Many programmers who suggest this are simply uncomfortable with other people's code. They can write stuff from scratch themselves, but can't maintain or extend code they've not written (that's always a bad sign). And to make matters worse, they always use the argument "stuff I did not write is horrible".

Re: Ask HN: How to tell someone you need to rewrite an entire project?

#7
post #6

Quantify it. That's all most managers understand. Customer X wants the product in 12 weeks or they're going with a competing product. Customer X may be spending 6 or 7 figures with us over the next 5 years in upfront costs and ongoing maintenance and support fees. You may be saying, "It'll just take 6 months (24 weeks) to re-write this from scratch and do it right " (managers are used to hearing programmers say this…

That's not the case, as there is another project in the same company with very good codebase made by one team, however, the one written by another team, sucks :-)

Re: Ask HN: How to tell someone you need to rewrite an entire project?

#8

Also, be very, very sure that a rewrite is the right thing to do. Probably 80-90% of the time, it isn't, and you'd be much better off with an incremental refactor. One major way to tell: can you clearly specify what the revised version should be doing, in a way that doesn't involve "whatever the old version did"? Another litmus test: do you fully understand the old code and why it sucks the way that it does?

An incremental refactor is a possibility too, but almost everything must be refactored.

Re: Ask HN: How to tell someone you need to rewrite an entire project?

#9
post #7
post #6

Quantify it. That's all most managers understand. Customer X wants the product in 12 weeks or they're going with a competing product. Customer X may be spending 6 or 7 figures with us over the next 5 years in upfront costs and ongoing maintenance and support fees. You may be saying, "It'll just take 6 months (24 weeks) to re-write this from scratch and do it right " (managers are used to hearing programmers say this…

That's not the case, as there is another project in the same company with very good codebase made by one team, however, the one written by another team, sucks :-)

Another risk... has a re-write been brought-up before and shot down? Did everyone agree (reluctantly) to make the best of it and continue with the code base? If that happened and you bring this up again, it may not end well. Management may see it as you undermining the project, not "being on board", etc.

So unless you feel really compelled to do this, and you can do a good, objective quantification (here is why a re-write will make us more money) as why it must be done, don't bring it up.

Also, telling mgt that a whole team in the company produces bad code may not be in your interest and it certainly won't make that team your friend going forward.

Re: Ask HN: How to tell someone you need to rewrite an entire project?

#10
post #9
post #7

Earlier quoted context omitted.

That's not the case, as there is another project in the same company with very good codebase made by one team, however, the one written by another team, sucks :-)

Another risk... has a re-write been brought-up before and shot down? Did everyone agree (reluctantly) to make the best of it and continue with the code base? If that happened and you bring this up again, it may not end well. Management may see it as you undermining the project, not "being on board", etc. So unless you feel really compelled to do this, and you can do a good, objective quantification (here is why a re-…

The code was written by outsourced people. And yes - another developer already talked about a rewrite, but it was postponed. Thing is, if we postpone and add lots of features, it will cost more to do it later! We can always rewrite portions of it, and make it more stable, but I truly believe in a rewrite - while the project is "young".

Another factor is the lack of budget in the project =/

Post reply on HN