Customer journeys × Programming
Business lens: Customer journeys · Technology lens: Programming
Reading scope: Original fictional teaching; same-author arithmetic checks are not independent editorial validation.
A booking rule creates a promise
A fictional home-service application assigns appointments by rounding requested duration to a convenient calendar slot. Customers receive confirmation quickly, but some bookings overlap because the rounding rule understates required time. Customer journeys and programming meet when an implementation turns a policy into a commitment. Define the duration, slot boundaries and any required travel or preparation before writing the allocation function. A fast confirmation is not useful if the promise cannot be fulfilled. Begin with examples that expose the rule’s edge cases. The program should represent the intended service policy and retain exceptions, rather than silently changing the work to fit a calendar display.
Specify what the function must preserve
The service owner defines appointment feasibility, the scheduler knows dependencies and the developer implements the rule. Distinguish customer-facing start time from required resource occupancy. An estimate can be uncertain, so state how buffers or later changes are handled. A rounded duration should not erase genuine required work. Record the rule version associated with an accepted appointment and explain how a later policy change affects existing promises. Test exact-fit, overrun and zero-duration inputs according to the declared domain. Invalid requests need an understandable correction message rather than an arbitrary output that looks like a valid booking.
Worked slot feasibility
A fictional hour-long window has sixty minutes available for sequential work with one service resource. Two appointments require forty and thirty-five minutes under the exercise assumptions. Their combined duration is seventy-five minutes, exceeding the window by fifteen. A rule that rounds each duration down to thirty minutes would display sixty minutes and appear to fit, but hides fifteen minutes of required work. If each appointment also needs a five-minute preparation period within the window, occupancy becomes eighty-five minutes and the deficit becomes twenty-five. The example assumes sequential tasks and no travel; it does not specify a feasible alternative start time.
Reject or revise an impossible promise clearly
Offer an appropriate later window or a legitimate split only when the resource and customer requirements permit it. Do not present another slot as available without checking its own commitments. A correction should preserve the accepted appointment history and tell the customer what changed. If durations are estimates, distinguish forecast error from a programming rule that systematically truncates them. A successful function test should confirm both arithmetic and expected message states. Customer experience also depends on whether the explanation is understandable and whether Support can reproduce the rule that produced the original commitment.
Practice a promise-preserving booking specification
Use the existing project-schedule lesson to specify the sixty-minute window and forty- plus thirty-five-minute appointments. Reproduce seventy-five minutes of work, the fifteen-minute gap and the twenty-five-minute gap with preparation. Add an exact-fit case and an invalid-duration case with clear expected responses. Your portfolio should include a rule-version record and a customer-facing revision message. This extends bounded scheduling teaching; it builds no new booking engine, executes no concurrent allocation test and verifies no real appointment. If a local function is later written, retain actual outputs separately and investigate any mismatch rather than changing expected work to make the result fit.
Questions and progressive learning
Who defines feasible duration, and Whom should a programmer consult about preparation? Whose accepted time changes? What occupies the resource, Where is the rule version stored, and When is a revision explained? Why is rounding down misleading? Which boundary rejects a promise? How will messages be checked? Foundation learners identify an overlap. Undergraduate learners calculate occupancy and specify examples. Postgraduate learners critique estimates, buffers and historical reproducibility. DBA/research learners study a bounded policy-to-code mechanism with declared outputs and independently checked service outcomes. For revision, explain why two displayed thirty-minute slots do not make seventy-five minutes of required work fit, and why an accepted booking needs a transparent correction rather than silent recalculation under a new rule.
Study questions and answers
What is the original shortfall?
40+35 = 75 minutes against a sixty-minute window, leaving a fifteen-minute deficit.
Marking guide: Credit 75-minute work against sixty, fifteen-minute shortfall.
What happens with two five-minute preparation periods?
75+10 = 85 minutes, exceeding the window by twenty-five.
Marking guide: Include two five-minute preparation periods:85 minutes and 25-minute deficit.
Why retain the rule version?
To reproduce and explain accepted promises when code or policy changes later.
Marking guide: Retain rule version to reproduce/explain accepted promises after code/policy changes.
Practice task
Specify a booking function with feasible occupancy, boundary cases and transparent revisions.
Practice bridge
- Specify a booking function with feasible occupancy, boundary cases and transparent revisions.
- Reproduce the worked arithmetic, change one assumption and label invented evidence separately from actual practice observations.
Boundary: Original fictional exercise connected to an existing bounded or guided lesson. No new executable fixture, external platform execution or catalogue lab claimed.