Reading the requirements
Before a single line of code exists we work through the user journeys and the brief. A discount rule counted on the gross amount in one paragraph and on the net amount three pages further on costs one meeting at this point, and a week of rework half a year later.