Skip to content

Whack a Mole

pannous edited this page Nov 20, 2020 · 2 revisions

Avoid wackamole programming

Definition of wackamole programming: fixing one test case breaks another. The Whack-a-Mole Problem Related: technical depth.

Root causes of wackamole programming

  • Adding logic instead of reducing logic
  • convoluted if statements
  • global state
  • side effects
  • lacking purity

convoluted if statements

Every convoluted if statement is a sign of bad design.

DONT ADD LOGIC WHEN IT WORKED BEFORE

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.

Home

Philosophy

data & code blocks

features

inventions

evaluation

keywords

iteration

tasks

examples

todo : bad ideas and open questions

⚠️ specification and progress are out of sync

Clone this wiki locally