Let's also talk about the cost of refactoring. Refactoring might be
free or almost free if you're using a tool to do refactoring
as we did in our demo. But that's not always the
case. In many cases, refactoring involves quite a bit of manual work
if you're doing some manual refactoring. And how much that costs
depends on how well the operations on the source code are supported.
You might have partial support from an ID. You might have complete
support, in which case it's greater. Or you might have no support,
in which case you have to be very careful about
how you change your code and how you check that you
didn't change the behavior of the code. There's also an additional
cost associated with refactoring. Remember
that refactoring relies heavily on testing
after each small step of refactoring. So you might have
to develop test cases, specifically to check your refactoring. And even
if you have an existing test because, for example, you're working
some agile context and therefore you develop a lot of UNIX
test cases before writing your code. And therefore you have a good
regression test with it you can use every time you modify your code.
Nevertheless, when you refactor and you change your code, you might need
to update your test so it's not only the development of the test
cases but also it's maintaining the test cases. And if you have
a lot of test cases, you have to maintain more test cases. So
that's a cost that is not directly visible but can affect quite
a bit the overall cost of refactoring and the overall cost of system
development therefore. And finally, you should not
under estimate the cost of documentation maintenance.
Applying refactoring may involve changes in interfaces,
names, for example, names of classes. And
when you make this kind of changes, you might need to update the documentation,
and that's also cost. It's something that
takes effort and therefore should be considered.