3 ms·
Naming and being at the top of the file are separate things. If it needs a name, name it where it's used! I think of the "no magic constants" as a primitive p
by BurningFrog 11y ago
Naming and being at the top of the file are separate things.
If it needs a name, name it where it's used!
I think of the "no magic constants" as a primitive precursor to the DRY principle. It was a good approximation for its time, but now we know better.