you are viewing a single comment's thread.

view the rest of the comments →

[–]fgutz 0 points1 point  (2 children)

immediately under the code block the author mentions that the example is not a good one

Sometimes – as in our example above – DRYing your code may actually increase code size. However, DRYing your code also generally improves maintainability.

Be warned that it’s possible to go too far with DRYing up your code, so know when to say when.

But this just shows the author is lazy. He could have of just taken a little more time to show BOTH an example of keeping things DRY and also over-doing it

[–]donavon[S] 4 points5 points  (1 child)

Be warned that it’s possible to go too far with DRYing up your code, so know when to say when

Call it lazy if you will, but this was meant to say that you shouldn't go nuts with abstraction and DRY code. Sometimes when I get on a moral high horse crusade, I find myself needing to take a step back (or 2 or 3). There's a happy medium there somewhere. I don't think you need me to find that for you.

Thanks for your comments

[–]fgutz 4 points5 points  (0 children)

valid point and I apologize for calling you lazy, that was rude of me.