Talk:Don't repeat yourself

Page contents not supported in other languages.
From Wikipedia, the free encyclopedia

Need example?[edit]

It says "Every piece of knowledge must have a single, unambiguous, authoritative representation within a system". Great. But it doesn't give any real detail of what they mean by that, except to link me to the author's books.

Generally we want to avoid writing the same code twice, so I get what they are saving, in real general terms. But if thats' ALL they are saying, then it's as useless as "Buy Low, Sell High" (good advice, but useless cause its both obvious, and doesn't tell me how to do the hard parts of actually buying low or selling high)

So, anyways, I was thinking that some examples, or more detail of what they are saying, might help? 12.11.157.130 (talk) 22:22, 16 September 2016 (UTC)[reply]

"Buy low, sell high" is not useless or obvious: see Andrew Tobias's "The Only Investment Guide..." for examples of blatant violations by investors. This, as well, as the DRY statement being criticized, are *heuristics*. Heuristics are not useless just because general. GeneCallahan (talk) 23:39, 2 December 2020 (UTC)[reply]

WET[edit]

Looking at the citations for WET, they were all opposed to WET. I rewrote the WET section to point out that it's only pejorative. More of a strawman than a real philosophy or viewpoint. Palehose5 (talk) 16:20, 27 October 2022 (UTC)[reply]

I don't know if I agree with this. I saw something posted just the other day praising WETness. [1] It might not qualify as an RS for this article, though. Andre🚐 18:35, 27 October 2022 (UTC)[reply]
Thanks, I stand corrected, there are people who endorse this. The alleged coiner of the term (per this article) was Kevin Greer, who was just using it pejoratively or as a straw man to explain the value of DRY. Another link was also pejorative and two others I couldn't access. I don't think your source you posted is really any worse than some of these. So far that's the only evidence I've seen that WET is a legit "opposing view".
The WET section has issues. Feels to me like the only purpose of WET in this article is to better explain DRY and its value. We have 5 WET sentences: (1) explaining what the acronym stands for, (2) explaining where it is common (but not why, or whether it has any advantages), (3) giving an example, (4) explaining why DRY is better, and (5) naming the coiner, who as I said, doesn't even like WET. Palehose5 (talk) 17:51, 28 October 2022 (UTC)[reply]
She doesn't call it WET but the most prominent proponent of "duplication is cheaper than the wrong abstraction," which I happen to agree with myself, is Sandi Metz. Andre🚐 18:16, 28 October 2022 (UTC)[reply]
The following section "AHA" mentions her. What if we just combined them? Palehose5 (talk) 16:34, 29 October 2022 (UTC)[reply]
Sure Andre🚐 17:29, 29 October 2022 (UTC)[reply]

I've updated the main page to take Kevin Greer out as the "coiner" of the term "WET" programming, because he was not. It far predates his usage of the term. Please note the updated reference. I just wish I could find something even older and determine WHO actually created it, because I'm sure it's far older than even the internet! SilverAnsible (talk) 15:57, 9 January 2024 (UTC)[reply]

i know Kevin. Even Kevin says this was misattributed. 209.216.101.126 (talk) 16:38, 9 January 2024 (UTC)[reply]
Awesome, please tell him thank you for spreading the DRY gospel from some random internet user. I saw a couple of his videos while researching the history of programming, he's great. SilverAnsible (talk) 18:49, 9 January 2024 (UTC)[reply]