python (65.1k questions)
javascript (44.2k questions)
reactjs (22.7k questions)
java (20.8k questions)
c# (17.4k questions)
html (16.3k questions)
r (13.7k questions)
android (12.9k questions)
How to enact DRY to refrain from repeating code. NO concat please
I have 2 blocks of 'for' code which are very similar with the exception for Object.values(feelings) and Object.values(feelings2) part.
I am trying to create a new 'const allFeelings' that holds the fo...
darrenIam
Votes: 0
Answers: 2
How to minimise many if conditions in a program to use DRY concept?
I have a program that has a few if blocks. I want to use DRY concept as am using same code repeating in those blocks, but different conditions.
Please check the below blocks. I'm using functions in ea...
Anil Dhage
Votes: 0
Answers: 1
Follow DRY principle
I have an implementation of following kind-
int max_count = 10;
main() {
Writer writer = //initialise writer;
List records = new ArrayList();
while(true) {
// some functionality
// s...
Ayushi Bansal
Votes: 0
Answers: 2
Javascript Help me make this DRY
I want to make this code fit the DRY principle, I see that I repeat myself, but there must be a way to shorten this code into something less WET. The goal is to make a function that plays a sound when...
SmugSnail
Votes: 0
Answers: 2