* On 2008-02-04 Jonathan Rockway ([EMAIL PROTECTED]) wrote: > [...] > > I think about putting some generic, non-specific methods in a separate > > module, which wouldn't be useful by itself, but would be used by the > > more specific modules. Maybe it would be useful to put those generic > > methods to > > > > Chess::Rating::Calculate > > Sounds good. But how about just Chess::Rating? There's no reason to be > too verbose... Chess::Rating is clear and easy to type. Anyone > searching for a module that calculates chess ratings will likely find > yours and the name will encourage them to read more about it. That's > the goal.
Maybe you are right and Chess::Rating (or even Statistics::Rating -- see the other posts) is clear enough. When I looked for a good name, I thought, that in a "perfect world" I would suggest naming schemes like: Chess::Rating::List::FIDE (for Roman's module to access the FIDE rating list) Chess::Rating::List::DWZ (for a fictious module to access the German rating list) Chess::Rating::Calculate::Simple (for Terrence's module) Chess::Rating::Calculate::FIDE (for my first module) Chess::Rating::Calculate::DWZ (for my second module) ... But probably there aren't that much things one can do with ratings (except calculate them and parse through rating lists). Therefore it sounds okay to have * Chess::FIDE and Chess::FIDE::Player to parse players from the FIDE rating list and * Chess::Rating to calculate Ratings. > Also, do the users care about the algorithm used to calculate the > rating? Would it not be better to have an API like: > > my $r = Chess::Rating->new( method => 'FIDE', ... ); > > rather than many separate modules? Until now I only took a look at FIDE ratings and German ratings (DWZ). Since the data structure needed to calculate ratings differs [1] I thought it would be best to reflect those differences by using different classes. But again, maybe your suggestion is better -- I have to think about it. Best regards Christian [1] For instance each player has a "development coefficient" for FIDE ratings in addition to its "rating" -- see http://www.fide.com/official/handbook.asp?level=B0210, point 10.52.
signature.asc
Description: Digital signature