Friday, June 22, 2012

Popsicle Shticks 1.02 - Bug Fix

One of my students recently notices that she always seemed to be the last person on the group list. Since the class has 22 students in it, that meant that she ways always the odd woman out when we had groups of 3. A quick investigation showed that this was a bug!

I tracked down the source to a poor assumption about how Random.Next(lower, upper) worked. It turns out that it does not include the upper-bound as I had thought, meaning the group generator wasn't considering the last person on the class list until they were they were the last person to be randomly sorted into a group.

Anyway, you can download the updated version of Popsicle Shticks here. Source code here. Original Post here.

No comments:

Post a Comment