←back to thread

Against Best Practices

(www.arp242.net)
280 points ingve | 1 comments | | HN request time: 0.255s | source
Show context
jsbg ◴[] No.42173687[source]
The author sounds like even though they have read extensively about various "best" practices, they did not really gain an understanding of the tradeoffs involved with each one.

> “Don’t Repeat Yourself” (DRY) is basically good advice, but sometimes just copy/pasting things is just the more pragmatic thing to do, and not really a big deal.

Duplicating code on purpose is not about being pragmatic, it's about recognizing when DRY would violate the single responsibility principle.

The ability to weigh tradeoffs in context is what makes some engineers better than others.

replies(2): >>42175128 #>>42175968 #
1. recursive ◴[] No.42175968[source]
> The author sounds like even though they have read extensively about various "best" practices, they did not really gain an understanding of the tradeoffs involved with each one.

It sounds to me like they did understand the tradeoffs. But that they were being brow-beaten to apply "best practices" that were inapplicable because of the tradeoffs.