Thursday, March 29, 2007

Special Effects

Heroes
 That is, the symphony by Philip Glass (from Bowie and Eno) that I am currently listening to.
 Where was I? Ah yes, the one failing test - testHittingThumbMakesHomerSayDoh. I'm going to load success and failure effects into the test ability "Hit Thumb" and check to make sure that the canonical Abilities object can return them.

Testing
 This is much better - the tests are leading me to small steps. I take a small failing step (such as finding the ability), get it to pass, and then improve my test until it fails again (ok, I've found the ability, but does it have any success effects?).
 I'm building a safety net as I go.

Waste of time?
 It's curious, and I think I'll be better able to express this later, but I'm alternating between two thoughts. I suppose I have a devil on one shoulder:
 "Running tests at this point is a waste of time. I haven't changed any of the tests yet because I'm not done coding. I run the tests anyways, and feel disappointed to see that the same tests are failing (or passing) as last time. I feel like I haven't made any pogress."
 But, if I ignore the little devil and run the tests anyways, and I see something that failed, an angel appears and hark:
 "Ye cats! I didn't realize I introduced an error there. I just made a few simple changes - oh, I've lost the AbilityID along the way, so now Homer can read books (e.g. that test is failing). Let's see, ctrl-z a few dozen times, ah ha! That's it. Easily fixed. Done."

Functional tests
 Ok, I think I'm ready to start on a functional test. I want Lisa to attempt to read a book, and I want it to give her a new ability as a result.
 Actually, I should finish up the failure effects, shouldn't I? More tests...

0 Comments:

Post a Comment

<< Home