Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

I'm firmly in the anti-DRY camp since it causes everything to be slow, including coding speeds. You spend far too much time trying to figure out something new, when you could have just cut-and-pasted the answer from the previous problem.

Repeat yourself. It's good for you, and makes you code faster.

You can refactor out later if code becomes bloated.



And then one day you realize there are bugs duplicated all over the place and you pray that nobody hits them.

I'm not religious about DRY, but it's not a bad thing when kept in the toolbox with KISS and YAGNI.


> And then one day you realize there are bugs duplicated all over the place and you pray that nobody hits them.

If you can copy-paste repeated code, you can copy-paste debugging as well.

Duplicate bugs are a single bug.

Obviously not all DRY is bad.


And then I can explain to my boss why I'm working on stuff I'm not supposed to when I could have just wrapped it up once in a library and fixed it once on all those projects.

So now not only have I created a bug, duplicated it N times, but my boss thinks I'm an idiot and wasting time for not applying DRY and good engineering hygiene.


> Repeat yourself. It's good for you, and makes you code faster.

Maintainable goes out the window...




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: