tadhg.com
tadhg.com
 

sfmagic.org Rewrite: New Standings Progress

17:53 Tue 01 Jan 2008
[, , ]

I’m about 40 percent of the way to the new standings tables. I’ve also decided to keep going with the sfmagic.org posts for a while, as I didn’t start them on 1 December as intended because the second draft wasn’t finished.

The approach I’m taking towards populating the tables is fairly simple. First, there are six tables:
standings-overall
standings-seeding
standings-lastten
standings-superset
standings-year
standings-sets

Each table has these columns:
player_id
player_name
tournament_id (of last event)
date (of last event)
sets (if superset or sets)
superset (if superset or block)
rank
tournaments
tournament_wins
points
matches_won
matches_lost
matches_drawn
games_won
games_lost
games_drawn
tournament_win_percentage
max_points_percentage
match_win_percentage
game_win_percentage

After the tables are created, populate each of them. The population process involves getting all the dates in the tournament table, getting all the dates that already exist in the standings table, removing the union of the two, and for each of the remaining dates running the current (Python) standings page’s algorithm, then insterting that into the standings table. This re-uses almost all of the code from the version of the standings page I finished recently, and so far it seems to work. I might actually be able to get this finished tomorrow, which would leave only head-to-head as a major critical feature. (There are other major features, but only the critical ones preclude moving to the new codebase.)

Leave a Reply