Talk:Code refactoring: Difference between revisions

Content deleted Content added
Line 158:
:::OK, that's a substantial difference, but it seems to me refactoring could still be a large part of it. I once worked on a numerical code that had originally been written in Fortran, had been run through f2c after a couple of years and then been maintained for a couple of years. I thoroughly refactored it into more OO C++. Running something through f2c is still a behaviour preserving transformation, though the immediate end result isn't more readable, so it's a bit of a stretch to call it refactoring. [[User:Mmeijeri|Martijn Meijering]] ([[User talk:Mmeijeri|talk]]) 10:50, 5 January 2014 (UTC)
::::I agree they are related. Conceptually I would say Refactoring is a kind of re-engineering. We have to be careful to distinguish words from their English use and from specific meanings word have to IT people. So if we are talking just English word meaning than I agree Refactoring is a kind of re-engineering. But for at least some IT people, if you look for example in old reports on Gartner or Forrester before Y2K the phrase "software re-engineering" has a very specific meaning, it means recapturing design from legacy systems which in virtually all cases weren't designed with an Object-Oriented model. I don't think software re-engineering is in vogue now the way it was before Y2K. Anyway, it's not a big deal, I was just trying to link an article to "software re-engineering" where I was talking about recovering designs from COBOL and was surprised that the link ended up here. [[User:MadScientistX11|MadScientistX11]] ([[User talk:MadScientistX11|talk]]) 14:16, 5 January 2014 (UTC)
 
== merge with [[Rewrite (programming)]] ==
 
I am against this merge. Too often people confuse refactoring and rewrite. They are not the same thing at all.
 
Refactoring applies small behaviour-preserving changes, while rewrite means throwing away the existing code and restarting from scratch. Refactoring should retain bugs like for like, while a rewrite removes all the previously known bugs while it adds new unknown ones (hopefully less than before and/or less severe). The process of refactoring can be stopped at any moment and the system remains functional at all times. On its hand the rewrite must be completed before it can replace the previous code. If it is not completed then the new code is [[dead code]] or [[unreachable code]] and is immediately subject to [[software rot]]. [[User:JnRouvignac|JnRouvignac]] ([[User talk:JnRouvignac|talk]]) 08:03, 24 November 2016 (UTC)