We provide a custom made service for just drop us a line.
We would be glad to have feedback from you.
Squash Association of Hong Kong, China · Membership, League Registration, Draws and Ranking
Problem
A governing body is not a business with rules attached to it. It is a set of regulations that happens to need a database.
Membership categories, eligibility by age, squad sizes that differ by division, a ceiling on team average points, venue allocation, promotion and relegation, and a ranking formula refined by committee for a decade — all of it is written down, argued over, and applied to real people whose standing in their sport depends on the answer. The software's job is to agree with the regulation, clause by clause.
What existed was three systems in the shape of the organisation: a public website, a membership portal on its own subdomain, and a back office where competitions are actually run. They shared members but not a definition of one, and that had to be fixed first, because everything downstream is derived from a membership record — whether a player may enter a division, which declaration form they sign, what their team's average points are, whether a squad has gone over its cap.
The hard part was never the screens. It was that the specification arrives as a regulation, and a regulation is written for people who already know the sport. It says a player's points are depreciated annually, and leaves the definition of annually to a footnote that turns out to matter enormously — because the two league seasons overlap, and a player who sits out one year can be depreciated twice if you read the calendar one way and once if you read it the other.
Figure 1 — Two seasons and three membership windows on one calendar
Approach
Four decisions carried it.
Rewrite the regulation as a specification, with worked examples. Every rule was restated in the association's own terms and then pinned down with a case concrete enough to argue about: a player born on 31 August against a player born on 1 September, and the four different answers that follow. A rule that cannot survive a worked example is not yet a rule.
Separate the rule from the rate. Anything a committee might revisit next season is a field in the back office rather than a constant in the code: the points table, the depreciation percentages and their caps, each division's median, squad-size limits, the points ceiling per division, and the open and close dates of every membership category. The rule that a score unconfirmed for three days confirms itself is also a parameter.
Make every derived number answerable. A ranking is only useful if a player can be shown why it is what it is. The exports carry the win or loss and the match score line, so a calculation can be audited by hand and a disagreement resolved by reading rather than by rebuilding.
Settle the edge cases in writing before building them. The rules were closed out in three written comment rounds, questions and corrections in the same document, each one ending in an example. Nothing was built from a verbal agreement.
Figure 2 — Two ages, taken on two different dates
The ranking engine
Overall Ranking sorts every league player in the association, regardless of division, onto one ladder. It decides which division a team may enter and whether a squad has gone over its cap, which makes it the number most likely to be argued with, and the reason it was worth building carefully rather than quickly.
Where a player starts is fixed by one historical season. The ladder was anchored to the final standings of one historical season, with every rank worth two points: the rating is that old ranking, carried forward match by match. A new player enters at the median of their division rather than the mean, because one strong player in a division drags a mean upward and hands a newcomer points they have not earned. Enter two divisions and the median of the higher one applies: the committee's reasoning was that a player confident enough to enter a higher division should start there.
What one match changes comes from a table, not a formula, and the table is deliberately asymmetric. The same hundred-point gap is worth more to the lower-ranked winner than to the higher-ranked one, and above 2,401 points it flattens almost to nothing, so a strong player gains little by beating a weaker one and loses little by losing. There is also a clause that matters only to whoever writes the code: when a player plays twice in one day, both matches are scored against the points they woke up with. The calculation is a snapshot of the day, not a running total — get that wrong and the result depends on the order the matches happen to be processed in.
What a missed year does is a percentage, banded by age, with a ceiling on the total it can remove. Depreciation runs to zero and stops rather than going negative. And it is applied at exactly one point in the year, which was the correction that took the longest to land: the association reads a year as one winter season plus one summer season, so the decision belongs at the winter boundary and nowhere else. Pinning it there removed a whole class of double-depreciation errors without changing a single percentage.
Figure 3 — One number, three inputs
The draw
A league draw looks like a bracket and behaves like a scheduling problem. A division has an entry count, a set of courts, a set of available evenings and a consolation plate underneath for first-round losers. Change one entry and all of it moves.
The operator's path is deliberately concrete: raise the headcount on the division screen, add the player, drop them into a slot, replace a bye, then reset. Reset re-flows the time slots, the venues and the plate — for that division only, which is the part that surprises people. A division that has already been scheduled is not disturbed by another division's change.
Two things had to be right for that to be safe. The first is what an empty slot means. When the eighth player withdraws the slot does not disappear: it becomes a bye, and the seventh slot becomes a player with no opponent yet. The bracket still shows eight slots, because the structure is what everything downstream is derived from — the operator needs to see where the gap is, not a tidy list of seven names.
The second is that the draw size is a power of two, and the entry count can push it over. Sixteen entrants fit a sixteen-slot draw; the seventeenth does not, and the bracket doubles. The conversion is handled, but it has to happen in the right order relative to reseeding, or the byes land in slots that no longer mean anything.
Figure 4 — Seven players in an eight-slot draw
How it was run
Registration and membership were closed out in three written rounds between March and May 2026 — first comments, second comments, third — the association replying to each point in the same document. The pattern was consistent: our question, their correction, and an example that became a test case. The four eligibility cases in Figure 2 came out of one of those rounds, written because “under 18” and “under 19” were being used interchangeably in conversation while meaning different things on different dates.
The ranking engine went to test on 15 May 2026 with a testing period to 29 May. What followed was real reconciliation rather than sign-off: several players were found with an opening balance taken from the wrong season, because the association checked the exported detail file against the divisions those players had actually entered. In each case the fix was a rule, not a patch — one of them is the boundary rule above — and the export itself was extended to carry the score line, so that a points change can be read instead of reverse-engineered.
Payment runs on Stripe, with QFPay under evaluation for programme applications. Two gateways is one more than we would choose, but league entry and course application have different commercial shapes and different refund behaviour, and that decision belongs to the association rather than to us.
What we delivered
Screens reproduced in this case are of public pages. Member records and personal data are not shown.
Impact
Rules that change every season now change as data. Division ceilings, squad limits, membership windows, the points table and the depreciation bands are fields in the back office, so a committee decision does not become a release.
The ranking stopped being a source of dispute and became a document. A player's points can be traced from their division median, through each match, to each year's depreciation — which is the difference between a number people accept and a number people argue with.
Registration moved from a queue of emails to a form that knows the answers to its own questions: which category you may join, which form you sign, whether your squad is over the cap. Staff now handle exceptions rather than the routine.
And the competition calendar itself became something the system understands. Two leagues in one year, overlapping at each end, with membership windows that deliberately cross the boundary — that shape is now the model rather than a complication to be worked around.
In flight: a referee panel, tournament presentation, a training-programme application, and a specification for electronic ticketing with a seated-court canvas and split sponsor and public inventory. Designed, not yet built.
We provide a custom made service for just drop us a line.
We would be glad to have feedback from you.