RATING_CLASSES = [ (-1,-1,'coderTextOrange'), (0,0,'coderTextBlack'), (1,899,'coderTextGray'), (900,1199,'coderTextGreen'), (1200,1499,'coderTextBlue'), (1500,2100,'coderTextYellow'), (2200,1e100,'coderTextRed') ]
See the problem? What happens when a yellow coder has a rating between 2101 and 2199 ? ...
Then another issue appeared, one of the coders was not being recognized. I tried the profile search at topcoder and it turns out _ is actually a wild card in that search feature. So, _sunny will not return _sunny member profile, it will list a page of all the profiles that are 6 characters long and end with sunny. The workaround was simple, I just guessed that If I add a escape \ to the _ , it will no longer be considered a wildcard. So, searching for \_sunny leads directly to _sunny's profile. That is nice.
The point of this post is, I had to update the script in case anyone actually used it.
No comments :
Post a Comment