←back to thread

52 points birdculture | 1 comments | | HN request time: 0.23s | source
Show context
jamesbelchamber ◴[] No.46182053[source]
"Don't Repeat Yourself" is a great rule of thumb which, at least in writing Terraform configuration, became absolute tyranny. Strange webs of highly coupled code with layers of modules, all in an effort to be DRY - almost everywhere I've seen Terraform.

Trying to explain why a little duplication is preferable to bad abstractions, and specifically preferable to tightly coupling two unrelated systems together because they happened to sort-of interact with the same resource, was endless and tiring and - ultimately - often futile.

replies(6): >>46182179 #>>46182504 #>>46182524 #>>46182757 #>>46182935 #>>46183063 #
1. gaigalas ◴[] No.46182757[source]
Explaning is hard. Examples often work better. You need to be able to show an example where deduplication would be made worse by applying DRY, otherwise it's hard to argue using just vague descriptions.

I totally agree with deduplication, but only when it's shown. Otherwise it's too easy, and I've seen people try to use this argument to justify slop many times.