Model Timestamps and Rate Updates in a Delivery-Fee System
Quick Overview
Design timestamp and rate-update handling for a delivery-fee system without inventing its pricing formula. Explain unambiguous event times, effective-dated rate versions, atomic updates, and the evidence needed to audit earlier calculations.
Model Timestamps and Rate Updates in a Delivery-Fee System
Company: Rippling
Role: Software Engineer
Category: Software Engineering Fundamentals
Difficulty: medium
Interview Round: Technical Screen
In an object-oriented delivery-fee system, explain how you would represent timestamps and update rates. Describe the responsibilities and data structures needed to apply the correct rate consistently when rates change.
The detailed fee formula and starter code are not supplied. Do not assume a per-minute, distance-based, or concurrent-order formula; make the timing and update policy explicit before using it.
### Constraints & Assumptions
- The design must explain timestamp choice and rate updates.
- Currency precision, effective-time semantics, and retroactive changes require clarification.
- Preserve old calculation evidence when a rate configuration changes.
### Clarifying Questions to Ask
- Which event determines the applicable rate: order creation, service start, completion, or each segment of service?
- Does an update apply only prospectively, and can effective times be backdated?
- Are displayed local times converted to unambiguous instants before storage?
```hint
Overwriting one current-rate field makes it difficult to explain which rate an earlier calculation used.
```
### What a Strong Answer Covers
Separate rate policy from fee calculation, use an explicit time model, and preserve versioned effective-rate information. Explain concurrent updates and how a calculation binds to the chosen policy without inventing the missing fee formula.
### Follow-up Questions
- What happens when two rate changes have the same effective instant?
- How would you audit a fee after the current rate changes?
Overview: Design timestamp and rate-update handling for a delivery-fee system without inventing its pricing formula. Explain unambiguous event times, effective-dated rate versions, atomic updates, and the evidence needed to audit earlier calculations.
In an object-oriented delivery-fee system, explain how you would represent timestamps and update rates. Describe the responsibilities and data structures needed to apply the correct rate consistently when rates change.
The detailed fee formula and starter code are not supplied. Do not assume a per-minute, distance-based, or concurrent-order formula; make the timing and update policy explicit before using it.
Constraints & Assumptions
The design must explain timestamp choice and rate updates.
Currency precision, effective-time semantics, and retroactive changes require clarification.
Preserve old calculation evidence when a rate configuration changes.
Clarifying Questions to Ask Guidance
Which event determines the applicable rate: order creation, service start, completion, or each segment of service?
Does an update apply only prospectively, and can effective times be backdated?
Are displayed local times converted to unambiguous instants before storage?
What a Strong Answer Covers Guidance
Separate rate policy from fee calculation, use an explicit time model, and preserve versioned effective-rate information. Explain concurrent updates and how a calculation binds to the chosen policy without inventing the missing fee formula.
Follow-up Questions Guidance
What happens when two rate changes have the same effective instant?
How would you audit a fee after the current rate changes?