You wrote:We can think about testing this way: automated testing is to software development what brakes are to cars. Cars don’t have brakes because we want to go slowly — they have brakes so we feel safe going fast. The same is true for software: automated tests make us feel safe going fast.
Christian Clausen wrote:As I mentioned elsewhere, I am not against automated tests by any means, I just think you can learn refactoring without having to learn (or know) automated testing.
Christian Clausen wrote:This suggests to me that they can be learned separately.
My fear is that people will (naively) take what you wrote in your book out of context and think that refactoring without tests is fine in real-world development situations, not just while learning how to do refactoring
It's not about "feeling" safe, it's about being safe
Christian Clausen wrote:It is about feeling safe. As Djikstra said, "tests can prove the presence of bugs, not the absence".
Christian Clausen wrote:As much as I would like to I cannot prevent people from making poor decisions.
Also note that because we focus only on learning refactoring, and we have a safe
environment, we can get away without automated tests — but this probably is not true for
real systems. We do so because it is much easier to learn automated testing and refactoring
Christian Clausen wrote:The last paragraph of chapter 1 attempts to achieve exactly this: