JaVa
   

Foreword

Frank Westphal Do you remember your first coding experience? I don't mean the details of the computer or language used; I mean how did you feel? I remember typing in a few statements from the coding handbook, eager to see the program run. It was amazing to watch how the code sprang to life. Within a few hours I had grown the tutorial example into what seemed an impressive program. I had made additions here and there and after every change I would rerun the program to see how it was doing. In the evening I showed it to my parents. They could tell by the look in my eyes how proud I was. How things have changed. I enjoy coding more than ever, but now and then I realize that some of the original fun is gone. It's in these moments that I reflect back on my first experience. Why can't coding always be like that? Actually, it was in one of those moments that I came across the techniques described in this tutorial. Automated tests and continuous refactoring applied in tandem brought me a bit closer to the beginning of my coding career. More often than not since then, I have been able to act like the only thing I have to do is write a few lines of code. But don't be fooled; these techniques are not only applicable to small programs. The larger the scale, the more valuable these techniques became to me. I was glad when Johannes asked me to write a second foreword for two reasons. First, this tutorial brings together the knowledge that a number of pioneering extreme programmers wish they had when they started applying test-first coding five years ago. If you follow down that route, you will invariably run into testing problems. Even though you are writing your tests first, you will come to halt because you won't see how to test your code. That's natural. Actually, that's the perfect time to reflect. Or to pick up this tutorial and read what Johannes tells us. Second, I was going to write a tutorial just like this one. However, when Johannes shared with me the first few chapters for review, I could see that it was well written and even covering a large suite of tools to support testing code that is usually hard, if not impossible, to test. I wish I had written this tutorial. Therefore, writing an accompanying foreword is a great pleasure. There is but one danger in reading this tutorial. You might come away with the impression that it's all about techniques and tools. When in fact, it's all about you. Test-infected programmers will tell you how the tests changed their relationship to the code. There is a certain fascination in seeing a few hundred tests passing and checking all the innards of your software. Indeed, sometimes you will find yourself pressing the run button a few more times, just for the extra kick that everything's working fine. Frank Westphal
Independent trainer and consultant


JaVa
   
Comments