Requirements Gathering

Requirement: write a function to change a flat tire. It needs to remove the flat tire and put the spare tire on.

fix_flat_tire() {




Looks pretty straightforward. We must be done.

Actually, this function is missing a lot of requirements.

  • Find safe level place to get out of traffic,
  • Put transmission in gear or park turn motor off and set parking brake,
  • Activate Hazard lights and place flares to warn other driver,
  • Remove jack, lug wrench and spare tire,
  • Carefully pry off hub/center cap if necessary to access lug nuts,
  • Loosen lug nuts slightly in a crisscross pattern,
  • Raise the tire off the ground with the jack and finish removing lug nuts,
  • Remove the flat tire and replace it with the spare tire,
  • Replace the lug nuts and get them slightly snug,
  • Tighten the lug nuts in a crisscross pattern,
  • Put tools, hub/center cap, and flat tire back in the car,

This is a pretty complete procedure to change a flat. There is still a lot missing though. What if the driver do not know how to change a flat. What if the lug nuts won’t loosen. What if the spare is missing or flat.

The point is, replace and install tire is entirely too vague. It would be like going to a restaurant and telling the wait staff that you want “food”.

By DuaneGallaher

Musician, bicycle mechanic, eBike enthusiast, former mainframe developer becoming web developer, all around curious person with passion for solving problems.

Leave a Reply