DRY: Do Repeat Yourself
quirksmode.org
quirksmode.org
This is terrible advice to anyone in web development. DRY is a principal for a reason that applies to web development just as much as every other form of software development: management of complexity. The more code existing in a system relates correspondingly to he complexness of the system. More complex systems, in-turn, are harder to change and harder to test. DRY limits complexity and makes it more responsive to change by (1) reducing the total amount of moving parts in the system and (2) reducing the scope of the change itself.
The writers arguments are strawmen that don't actually say anything about DRY. Needing to ensure your application works without Javascript can be solved in various DRY ways, one of which being shared client / server JS.
There are silver bullets. It's a good idea to dodge them, even for non-werewolves.
Repeating the same code in two files/modules/functions/blocks facilitates diverging independent development directions over time. A possible benefit if it turns out the business logic needs to be less similar than I thought originally to handle the two cases: in a building the shared logic of toilet rooms and kitchens is of less importance than the divergent logic of eating versus shitting, even though each is captured by a bubble on the initial space diagram and connected to waste, water, hvac, and electrical systems in the instantiation.
As a strategy, solving padleft type via generalized copying makes package management partition tolerant and available. It comes with the security problems of delayed patching, i.e. CAP's consistency.
TANSTAAFL.