Writing

Stopping two members booking the same cylinder

Two people turn up on Saturday for the same drysuit. Both asked. Both were told yes. Neither did anything wrong.

This is the most common failure in club kit systems, and the cause is nearly always the same: the clash was checked when the request was made, and never again.

Why checking once isn't enough

Two members ask for the same suit on Tuesday. Neither request clashes with anything yet, because neither has been approved. Both sit in the queue. On Thursday the Equipment Officer approves one; on Friday the Boat Officer, helping out, approves the other. Nothing was double-booked at the moment either was asked for.

So the check has to happen twice: when the request is made, so the member finds out immediately, and again at approval, against the state of the world at that moment.

And it has to survive two officers at once

Two officers looking at the same queue on their phones, approving within a second of each other, is a real thing on a club night. If the second approval reads the list, decides it is fine, and writes, the first approval can land in between and be overwritten.

The fix is that a write has to fail if the world changed since it was read, and be retried against the new state. It is not exotic; it is just something that has to be there from the start, because it is invisible until the evening it isn't.

Dates, not days

"Out on Saturday" is not enough for a suit somebody is taking to Scapa for a week. Hires are date ranges, and two ranges clash if they overlap at all, including the day one ends and the other begins, unless your club is confident about kit coming back and going out on the same evening. Most are not.

Two people cannot book the same cylinder for the same weekend, because the site won't let them, not because everybody was careful.

If you are choosing club software, this is worth testing before you buy: ask for the same item twice, for overlapping dates, and approve both from two different logins. It takes five minutes and it tells you a lot.

Written while building FoxFace Diving, a website that runs a diving club: the calendar, the kit store, the boat and the committee's paperwork, for one price with nothing held back.