-
-
Notifications
You must be signed in to change notification settings - Fork 4
Whack a Mole
pannous edited this page Nov 20, 2020
·
2 revisions
Definition of wackamole programming: fixing one test case breaks another. The Whack-a-Mole Problem Related: technical depth.
- Adding logic instead of reducing logic
- convoluted if statements
- global state
- side effects
- lacking purity
Every convoluted if statement is a sign of bad design.
Let's say you have a program where all tests are passing you add functionality in another module, you add a tweak in the main module and suddenly the tests are no longer passing. Under (almost) no circumstances shall you add another layer of logic to the main module in order to make the old tests pass. Instead you should try to make the new module compatible with the existing code.