Re: Contest Update
- Posted by Derek Parnell <ddparnell at bigpond.com> Nov 07, 2004
- 517 views
Jason Gade wrote: [snip] > Okay. So in my testing I made a file that contained edge cases identified in > the rules > and they were counted correctly. > > Also I do open the file in binary mode, so... hmm. > > I may need to think of some new edge cases to test for. > > Currently, the program follows these rules: > > -- words consist of upper and lower case letters, digits 0-9, single quote > and dash; > -- for the purposes of comparison, case does not matter and quotes are not > counted; > -- words consisting of only digits, or digits and dashes, are not counted > as words > -- unless they are quoted; > -- words of zero length after quotes are removed are not counted. > > If I am interpreting the rules correctly, I will try to come up with a new > (short) > test file to validate with. That summary is pretty good. It seems you understand the 'token' idea. > I wish now that I had saved the version of your web page that had your unique > counts > and total counts for each file posted -- at least then it would be easier to > compare > with. It kind of sucks that the calibration file works perfectly but the > others > do not!! ;^) Agreed. My first attempt worked perfectly well, and fast, with the calibration file. In fact, I thought I had everything under control so that became my 'frozen' code. Then people started submitting their efforts and they were consistently getting different counts to my program. After a few, I realized that these people were agreeing with each other but not my results. Then it I got it! My program had a bug (or two). My program failed all the other test files, even though it breezed through the first file. So how stupid do I look! LOL! Tonight when I get home, I'll have a closer look at your results to see if I can find any clues for you. -- Derek Parnell Melbourne, Australia