DEV Community

Rewrite πŸ–‹ or Refactor 🧹? 10 questions to ask yourself before you decide.

Erica Tanti on February 27, 2020

The code is horrible. Looking at it makes you want to tear your hair out. Something has to be done! The question is, what are you going to do? Y...
Collapse
 
marcmacgonagle profile image
marcmacgonagle

A good list of questions.

Another thing to note is the interaction of 7 and 9. You have to ask yourself is there a chance you don't understand the code well enough to estimate the amout of work required correctly? Daniel Kahneman, for instance, has written about the tendency to underestimate the amount of work needed to complete a task when it's us doing it.

Joel Spolsky's blog on this topic is worth reading too.

Collapse
 
ericathedev profile image
Erica Tanti

Very good point! This definitely needs a contingency plan for when you think it's going to take you a week and a month later you're still stuck. Somewhere in there I think the sunk cost fallicy comes into play.

Love that post from Joel, had read it ages ago but it definitely still holds true!

Collapse
 
__abshir profile image
Abshir

thanks for the good read 😊

Collapse
 
ericathedev profile image
Erica Tanti

Thank you for your kind words! πŸ™‚