Saturday, March 12, 2011

Always Question Your Grades...

Christene and I always tell our kids to go over tests and make sure the grade you received is the one your deserved. Teachers aren't always perfect and they do make mistakes. And it's not an insult to them to question why points are taken off for a problem: if it was valid then you can learn from it, and if it was invalid you can get it fixed.

This semester I'm taking a distance Java course at State. I posted about our first project a few weeks ago. The projects are split into two parts each: one part where you write the functional code, the other where you write unit tests to validate the code. As a professional developer, I've been using test driven development methodologies for years now. So when I sat down to do this assignment I wrote all of the tests as I wrote the code and ensured my code was at 100% test coverage and accurate.

On the functional portion I received 100%.

But on the unit test portion I only received 86%. So I emailed the TA to ask why I lost 14 points. In the feedback on the assignment it said that two of my 19 tests had failed, and I lost 7 of 10 points for each. But in my development environment no tests fail. I ran them in both Eclipse and also from the command line (the project is managed using Maven) and in both cases everything is perfect.

I'm just not sure how my tests could have failed if the code were working correctly. If anything, the tests ought to only work then if the code were flawed, which it's not.

I haven't heard anything back yet (I only emailed him a little while ago) but I'll post here whatever feedback I get.