How would you call changes in the source code that, by their nature, are never supposed to change the bin output? For instance, formatting or commenting.
+1
A:
This, to me, is a very simple example of Refactoring.
Code refactoring is the process of changing a computer program's source code without modifying its external functional behavior in order to improve some of the nonfunctional attributes of the software.
Péter Török
2010-05-11 14:58:52
Not really. In my book, refactoring means not just reformatting, but rewriting code to make it cleaner, better encapsulated etc.; and this changes the bin output.
Tim Pietzcker
2010-05-11 15:01:35
In my book, refactoring includes reformatting as well as rewriting code in other ways.
S.Lott
2010-05-11 15:02:17
@Tim, @S.Lott: Of course there is much more to Refactoring than simply reformatting the code. I rephrased my answer to clarify it. I don't think that in order for a code change to be refactoring, it __must__ change the binary output.
Péter Török
2010-05-11 15:09:16
Actually, I explicitly do not mean refactoring. I'm talking about the kinds of changes that are __never__ supposed to change the bin output, and refactoring often does change the output. The question was quite unclear, sorry, edited to make it clearer.
mafutrct
2010-05-12 12:53:40
@mafutrct, I would still call it refactoring - provided you are actually formatting or commenting the code in order to make it cleaner and more readable :-) If this is not the case, how about _obfuscation_ ? ;-)
Péter Török
2010-05-12 15:04:23
@Péter: No, refactoring is definitely not what I was referring to, as it often involves actual code changes. Obfuscation also does not include, for instance, improving code comments, so that's something different as well, as I understand it.
mafutrct
2010-05-12 15:46:52
@mafutrct, I almost always start refactoring a piece of legacy code by reformatting it and/or fixing Javadoc/code comments. Then of course, typically I would go on doing structural/design changes if I have time and energy for it. But sometimes I don't, or I prefer focusing on my core task, so I leave it like that for the time being. So, for me, it's all part of the same process. I understand if it feels different for you, but I don't have any better/alternative name for it.
Péter Török
2010-05-13 08:12:33