-A couple of minutes ago we talked about the fact that well, we - -2
-might need to change our design a lot, so how we going to do - -3
-that, that's going to be expensive. Well it's not very expensive, if we can - -4
-do efficient refactoring. Which is another - -5
-one of the important xp practices. And - -6
-what does it mean to refactor? It means to take a piece of - -7
-code who's design might be suboptimal, because for example, we evolved it, we - -8
-didn't take into account that from the beginning some of the features that - -9
-had to be added later, probably because we didn't even know about this - -10
-feature, because the requirements evolved. So we're going to take this piece - -11
-of code and we're going to restructure it, so that it becomes simple - -12
-and maintainable. Developers are expected to - -13
-refactor as soon as opportunities for - -14
-improvement, are found. And that happens for example, before adding some code. - -15
-You might look at the code that you're about to modify, or - -16
-to which you are about to add parts, and say can we - -17
-change the program to make the addition simple, that has maintainability or - -18
-we can do it after adding some code to our code base. - -19
-We might look at the code, the resulting code, and say well - -20
-can we make the program simpler? Was the running all the tests - -21
-and the key point here is that we don't want to refactor on - -22
-speculation, but we want to refactor on demand, on the system, and the - -23
-process needed. Again the goal is just to keep the code simple - -24
-and maintainable, not to over do it. And as I mentioned before - -25
-we're going to have a whole lesson, the next lesson on refactoring. So - -26
-we're going to go in more depth in the discussion of this topic. -- cgit 1.4.1