Skip to main content
5 events
when toggle format what by license comment
Jun 25, 2021 at 21:09 comment added Paul Pehrson Tooling is an important part of the question, as mentioned by @Bart van Ingen Schenau. In my documentation tool, we can abstract portions of code and use them in multiple places that are either identical, or substantially similar (then we use conditions to keep track of how they are different, when they differ). So in the documentation source there is only one file that contains that information. However, that file may be included in several different pages, if needed, to ensure the user has all the relevant information when they are learning about a feature or following a procedure.
Jun 24, 2021 at 8:41 comment added Doc Brown @iwis: this reddit opinion is missing the point, even differently named methods can violate the DRY principle (and overloaded methods may or may not violate it). It depends on if there is a (part of) the behaviour which must be consistent (or not).
Jun 24, 2021 at 8:36 comment added Bart van Ingen Schenau My reasoning for calling something a DRY violation would be "The documentation is copied several times and the copies need to be kept consistent". However, tooling and culture factors will affect the ability and willingness of people to make the documentation more DRY.
Jun 24, 2021 at 7:57 comment added iwis Applying a single comment to multiple different methods is possible in C#. On reddit.com/r/learnjava/ I read the opinion: "Overloaded methods are not the same methods. Which means they are not violating DRY." I am afraid that due to tool limitations, programmers of different languages may say that my example violates the DRY rule, or doesn't violate it. Is there reasoning I can use in the argumentation, regardless of the capabilities of the documentation tools? "The documentation is copied several times => violation of the DRY rule" - or is it more sophisticated?
Jun 24, 2021 at 6:49 history answered Bart van Ingen Schenau CC BY-SA 4.0