Top "Dry" questions

Don't Repeat Yourself, a software development philosophy which aims at reducing redundancy and code repetition.

sed command in dry run

How it is possible to make a dry run with sed? I have this command: find ./ -type f | xargs sed …

sed dry
Calling Django `reverse` in client-side Javascript

I'm using Django on Appengine. I'm using the django reverse() function everywhere, keeping everything as DRY as possible. However, I'm …

javascript ajax django google-app-engine dry
Is duplicated code more tolerable in unit tests?

I ruined several unit tests some time ago when I went through and refactored them to make them more DRY--the …

unit-testing dry code-duplication
Why is "copy and paste" of code dangerous?

Sometimes, my boss will complain to us: Why do we need such a long time to implement a feature? Actually, …

dry copy-paste
Where to put partials shared by the whole application in Rails?

Where would I go about placing partial files shared by more than one model? I have a page called crop.…

ruby-on-rails dry partials
How much duplicated code do you tolerate?

In a recent code review I spotted a few lines of duplicated logic in a class (less than 15 lines). When …

refactoring coding-style dry code-duplication
How to reuse a large query without repeating it?

If I have two queries, which I will call horrible_query_1 and ugly_query_2, and I want to perform the …

sql plsql dry
Is it possible to share a masterpage between MVC and webforms?

I am adding MVC to a project that has MANY legacy webform pages. This works fine. However, I currently have …

asp.net-mvc webforms master-pages dry legacy
Validate a value in property

So I heard that validating a value in a property like this: //dummy example, let's assume that I want my …

c# dry encapsulation
Access Level to certain class must be public error in PHP

I created this class <?php abstract class Validator{ public $_errors = array(); abstract public function isValid($input); public function _addErrors($…

php dry abstract public