Thursday, June 4, 2009

Day 9 & 10

On Tuesday I resolved the LightHouse task #125. FiteNesse keeps track of all the test history in a bunch of directories named after that test page. Inside those directories with the a strictly formatted name which includes things like the date and the number of passing and failing tests, and so forth. The issue was that if someone tried to access the history through FitNesse, FitNesse would toss up an error if it found any files that didn't follow its strict format. So I just made FitNesse a little more forgiving with those history files by ignoring any file that appeared corrupt, and then sending a message if someone inquired further.
On Wednesday I did a little more refactoring on my Limelight sidebar app for FitNesse. I made a video with my dad, demonstating a software kata. This is some small program which you practice writing again and again using TDD. We did created a prime number generator. What is interesting about the process of creating the PNG was that the tests would step by step lead us to a 3 line algorithm which would have been terribly difficult to come up with on the spot. I also created a quicksort algorithm using the same sort of step by step testing process in order to see if the testing process would lead to the bubble sort algorithm or if I could have arrived at the quicksort algorithm. What I discovered was that there was a leap that had to be made when testing a list of 3 unordered elements. At this leap, there were several simple solutions to make the test pass, but each solution would wind up with disparate algorithms in the long run. The diference between quicksort and bubblesort at that point in the testing was a matter of adding 1 extra variable named pivotpoint (which would eventually lead to the pivot which defines quicksort). It was pretty damn interesting.

No comments:

Post a Comment