BIRT 3.7
Written by: Michael Williams
Featured Refcardz: Top Refcardz:
  1. Scrum
  2. Apache Maven 2
  3. Essential MySQL
  4. Node.js
  5. Groovy
  1. jQuery Selectors
  2. Ajax
  3. Java
  4. Spring Config.
  5. Java Concurrency

Link Details

Link 323417 thumbnail
User 478055 avatar

By mitchp
via agile.dzone.com
Published: Dec 17 2009 / 22:29

Code base of a large project is getting worse over time. I hope there are lucky exceptions, but in general it is true for most projects. Suddenly you can’t add new features easily, you can’t make significant changes easily, you have tons of technical debts and development team is close to bankruptcy. You want to change that and have just two options: refactoring or rewriting everything from scratch.
  • 15
  • 1
  • 2179
  • 1

Comments

Add your comment
User 261337 avatar

John Rockefeller replied ago:

0 votes Vote down Vote up Reply

Which does everyone prefer? Myself I tend to side with refactoring simply because rewriting software is a usually large risk where you're hoping the software you end up with is much better than the software you've currently got. With refactoring you can work out the kinks over time and create a more polished product in the end.

Then again, I suppose a lot of it depends on the architecture of the project to begin with, not necessarily the code. If terrible database design choices were made and an obscure programming language used then maybe it might be time to look at rewriting.

User 388005 avatar

Hardcoded replied ago:

0 votes Vote down Vote up Reply

Nice article. Even if it overgeneralize a little bit.

User 281050 avatar

cbang replied ago:

0 votes Vote down Vote up Reply

Some good points in there. The black line (rewrite) should probably have gabs in it, in that the software is usually utterly unusable and won't compile for a while during the rewrite. In practice, rewriting works for me early in the project when perhaps I don't have many unit tests in place. Let's face it, we rarely get it right the first time - after version 1 and 2 we're usually a lot wiser about how version 3 should be implemented.

User 241699 avatar

IvanoBulo replied ago:

0 votes Vote down Vote up Reply

If it isn't an obvious architectural problem then I think it shouldn't be fully rewrited. It is almost always better to refactor and then rewrite some ugliest parts.
Personally, I like the XP approach when re-factoring is a part of your every-day development process. Sooner you start the refactoring - lower the risks and the cost.

User 236075 avatar

henk replied ago:

1 votes Vote down Vote up Reply

Often when you rewrite, you're bound to make a lot of the same mistakes again.

Yes, you may be more knowledgeable about the general architecture and main features, but the devil is in the details. All those afternoons you spent hunting down some obscure bug that occurred as side effect from some infrequently executed business rule. Believe me, you have long forgotten about that, and only when it rears its ugly head in production do you suddenly, but still vaguely, remember it...

Add your comment


Html tags not supported. Reply is editable for 5 minutes. Use [code lang="java|ruby|sql|css|xml"][/code] to post code snippets.