A settings page nobody asked for
transcript
A settings system for the checkout. Fully configurable. Very impressive. Six options. The app reads two.
Every option has a validator, so no bad value can ever slip in. Every option has a listener list, in case something must react. Nobody has ever asked to change one while the app runs. So every listener list is empty. Still maintained.
Six defined. Two read. Currency, and the tip percent. The other four are untested, and unread.
You paid to build it. Every reader carries it. Every change works around it. And when the guess was wrong, you repair it, or delete it. Three bills, for something nobody asked for.
The simple version: two values, and one function. It prints the very same line. Someone needs the tip to vary? Add a parameter then. Same cost as now.
YAGNI. You aren't gonna need it. Not for sloppy code. For guessed features. Clean code and tests are what make waiting safe.
Full breakdown in the lecture.