Can you isolate side effects in the language you already use?
Separate a decision from the code that reads a database or sends mail. The boundary depends on how data flows, and can be introduced within an existing language.
Read on through a shared source
Why does testing a business rule need a database? →Separate who qualifies for a reminder from whether the reminder can be delivered.Why do tests pass when the program is wrong? →Gary Bernhardt’s isolated tests and Andrej Karpathy’s neural network both deliver good news when the code is wrong.Where do side effects belong? →Overwatch concentrates side effects on one side of an interaction. A functional core similarly leaves database access and email to its surrounding shell.
Compare the passages
no language features are required to program this stylethe expired users class makes all the decisions and the sweeper class has all the dependencies.