TITLE: No, Really, Why? AUTHOR: Eugene Wallingford DATE: September 24, 2004 1:56 PM DESC: second thoughts on why not TDD? ----- BODY: My message earlier today was just a riff on the quote I began with. I was in an especially "why not?" kind of mood. As I walked to lunch, though, I knew that many of my students, including many of the better ones, would be unfazed by my rhapsody. They have plenty of reasons for resisting the switch to TDD. And those reasons seem quite powerful to them. Let's consider two. It takes too much time. Students don't always have the luxury of time when designing, implementing, and debugging an assignment. The program is due in a week or two, and so they spend most of their time working just to write a program that works. Evidence such as "TDD takes 15% longer and results in 30% fewer defects" doesn't provide much motivation to do TDD when students don't think they *have* 15% more time. They'll take their chances with working on what really matters, which is the program. Requiring students to submit their tests and then grading them, too, may motivate them, but I'd like to hear from folks who have tried that before deciding that it really works -- or whether students just view it as an extra burden, an 'unfunded mandate' from the instructor. Old habits die hard, if at all. Even if convinced of the value of TDD, many people find the change in habit to be a difficult obstacle to surmount. Changing habits takes discipline, support, and time. Instructors aren't usually with students enough at the times they program to help with the discipline, so our ability to provide support is compromised. When the pressure is on, or when faced with a challenging tasks, people tend to fall back on what they know best, what feels comfortable -- even if they aren't confident that the old ways will work! As an instructor, I find it most frustrating to watch students fall back on practices they know will fail, but I realize that this is simply human nature. Without changing the students' environment more radically, effecting certain changes of habit will be a hit-or-miss affair. Maybe this comes down to the fact that we who teach need to change the way we do things. Give assignments over longer periods, allowing more time for reflection. This sounds good, but ... What about the stuff we can't do because we now don't have time? It's a commonplace that students may be better off learning less content better, with more growing of the mind, but making that change is a difficult obstacle for teachers to surmount. In the end, I wonder how much effect such a change would have anyway. Would all the students' newly freed time be sucked up by their other courses, their jobs, and their ordinary lives? Ultimately, this all comes down to motivation, and the best motivation comes from inside the learner. Drawing that desire out is a task for which instructors aren't usually well-prepared. We can learn to do a better job of motivating students, but that takes work on our end. And wouldn't we rather just lecture? -----