Most voted "dry" questions
This tag should be used when the question refers to some resource related to the DRY principle. If it is about code refactoring another community may be more useful. DRY (Don’t Repeat Yourself) is a software development philosophy that aims to reduce redundancy and code repetition. It starts from the fundamental principle that one should never repeat something that is already created, but define a method, or property in a place and reuse it.
Learn more…6 questions
Sort by count of
-
8
votes1
answer89
viewsHow to avoid repetition listening to changes in the properties of a component?
When I need to react to changes in N properties for the same callback I find myself wearing something like this: watch: { propriedadeA(){ this.reagir(); }, propriedadeB(){ this.reagir(); },…
-
6
votes1
answer71
viewsImproved javascript from Dat.GUI
Hello. I created a simple block using CSS variables. And to "configure" these variables at the discretion of testing, I’m using the Dat.GUI. The current code is on this Pen. My question is how to…
-
6
votes2
answers89
viewsProblem with DRY
The problem: compare two arrays and give a dot whenever a number of one array is larger than the other. Ex) A = [1, 2, 2] B = [2, 1, 1] result = [2, 1] The answer I found: function a($a, $b){ $a1 =…
-
4
votes1
answer44
viewsHeap things on a function x DRY
That bold bit taken from here it wasn’t very clear to me: DRY solves what? Some may still be thinking that DRY is to reduce typing. Or at least gain maintenance time. It’s even in the latter case,…
-
3
votes1
answer267
viewsHow to repeat content on multiple static pages?
The point is, I have only static files. HTML and am looking for a simple way to create the blocks just once using only the client side. The idea is to respect DRY, there is some way to do this…
-
0
votes1
answer38
viewsHow to take advantage of the consultation in two separate layouts reports?
I have two reports in Jasper for different views on the same mass of data. So much so that the parameters and query are exactly the same. Is there any method, inherent to Jasper Reports, that allows…