title: Is there a point where cost of refactoring outweighs the cost of re-writing?
body: <p>We have some really shocking code touted as a next generation framework at my current place of employment.</p>
  
  <p>Thing is, there is only one person of this opinion and that is the guy who wrote most of it. The rest of the department are of the impression it is badly coded, a pita to debug and just a bit naff in general.</p>
  
  <p>The guy that wrote it has a pretty influential position with management so they are on that side of the camp.</p>
  
  <p>We have highlighted (genuine) concerns to management but obviously they're not willing to put more time in to a project that doesn't directly contribute to the bottom line.</p>
  
  <p>There are several applications deployed on this framework so any refactoring will need to encompass those applications.</p>
  
  <p>The whole thing is so intertwined that we cant just rip out an implementation of a particular class and rewrite it that way so even simple changes to core api mean a large project.</p>
  
  <p>It does however have 3 years in live deployment and many bug fixes, corner cases and boundary conditions catered for.</p>
  
  <p>Do we rewrite in parts and try to refactor that in given that it would be several large projects, refactor over time which is likely to take another 3 years to get it in to shape or do we just rewrite our specific requirements on top of an existing framework?</p>