Ranter
Join devRant
Do all the things like
++ or -- rants, post your own rants, comment on others' rants and build your customized dev avatar
Sign Up
Pipeless API
From the creators of devRant, Pipeless lets you power real-time personalized recommendations and activity feeds using a simple API
Learn More
Comments
-
Root825085yIt says don't, not never.
Sometimes a bit of repeated code is actually more maintainable. -
@Root Occasionally. For example, if I needed to develop an entire system to avoid repeating myself twice or three times, then fuck that! Repeat yourself!
But in general, DRY. -
Root825085yTwo very similar but subtly different modules are much more work and mental effort to generalize than to maintain separately.
Don't repeat yourself! But like with everything, there are exceptions. -
kleopi8735yimo software concepts are a bit overrated.
some stuff can be useful in edge cases too.
Knew someone firing people just for using switch case in any context (Java) -
C0D4681465yI've got almost the same block of code (there's a minor difference) running on two different servers inside two different projects. Tell me now, how to NOT repeat myself.
DRY: where you can
*IDC: where you cant
*I don't care -
@C0D4
A) It wasn't sarcastic, I think it came across a bit too literal though.
2) I thought joke/meme tag appends sarcasm implicitly -
C0D4681465y@AlgoRythm
It would appear to be.
😂 also tags lie. So many jokes become rants, sometimes the opposite is correct too. -
These sorts of "rules" are useful for double checking yourself rather than being ultimatums.
It pays to be aware of them so that whenever you've implemented such a "code smell", you can go back and work out if you *really* need to do that, or you've just goofed.
People who actually implement DRY: "Don't repeat yourself!"
People who "implement" DRY but are morons: "Don't repeat yourself, never say the same thing twice, and try not to be redundant."
joke/meme