||Teaching Java the Extreme Way|
|Subject:||Why wouldn't you use JUnit?|
Response to: Wwhy wouldn't you use JUnit?
That's a great question. I wanted to separate the idea of testing first from JUnit -- which I use every day and appreciate how it has improved the quality of my code. There are some people who feel that introducing the JUnit structure is a difficult way to begin a course. They feel that there's too much stuff that would need to be taught before the students are ready to begin.
For the most part, I agree with you. I think you can start right off with JUnit. Here's why I didn't.
In the first article I made a big fuss about what I didn't like about beginning with HelloWorld as a first program. I didn't want to turn around and say, "remember when I said not to teach them main(), and public, and static, and void, and arrays, and so on -- now teach your students TestCase and so on first."
My hope was that this lesson taught students to create a simple class that contained a single method that was able to respond to a method call. The code that the student sees is very clean and the prompts they receive should be instructive and helpful.