Keeping things in sync: derive vs test
Briefly

It is in response to this problem that we have mantras like 'DRY' (Don't Repeat Yourself), or, as I prefer it, OAOO, 'Each and every declaration of behaviour should appear Once And Only Once'.
Most of what I say is fairly language agnostic [...] obeying this mantra can hurt more than it helps, so in this post I'm going to discuss other approaches.
To pick a concrete example, suppose we have a rule that says that items in a deleted folder get stored for 30 days, then expunged. [...] 30 days limit needs to be defined in a single place somewhere, and then reused.
There is a second kind of motivating example, which I think often crops up when people quote 'Don't Repeat Yourself', and it's really about avoiding tedious things from a developer perspective.
Read at Luke Plant's home page
[
]
[
|
]