“Jon, the price is too low on this order can you have a look?”
Fires up database, investigates logs, discovers use was logged in before placing order.
Oh yeah! The discount_check() function. Damn. It returns the default price if a discount isn’t found. Bummer.
Partially rewrites discount_check(). Renames discount_check() to get_discount_amount(). Continues refactoring code and changing all calls to discount_check().
Discovers that discount_check() was used to get the price in some circumstances.
Creates a get_price() function…