Twitter | Search | |
Sam Ferree
I’m calling for an end to holy war against code duplication. We convince young developers and engineers that it’s the worst thing ever, when time teaches all of us that it is, the vast majority of the time, duplication preferable to dependency.
Reply Retweet Like More
Sam Ferree Dec 17
Replying to @sam_ferree
Especially when we’re creating massive complexity by abstracting code that is merely similar, not the same.
Reply Retweet Like
Eric Richards Dec 17
Replying to @sam_ferree
The problem is, that if you don't preach DRY, you end up with millions of lines of subtly different copy-pasta. It takes a lot of battle scars to know when to compromise
Reply Retweet Like
Sam Ferree Dec 17
Replying to @EricRichards22
If you teach SOLID, DRY tends to take care of itself. Don’t repeat (single) responsibilities, if you will.
Reply Retweet Like
Jon Dec 19
What kind of dependency are you talking about? Should I copy/paste a string class?
Reply Retweet Like
Sam Ferree Dec 19
Careful. You could seriously hurt yourself tilting at windmills.
Reply Retweet Like
Sam Ferree Dec 19
Replying to @sam_ferree
Since I have your attention, feel free to check out my Soundcloud:
Reply Retweet Like
Jon Dec 19
Yes, avoid the question. Code duplication is the worst advice you can give to a novice. Get better at dependency management.
Reply Retweet Like
Sam Ferree Dec 20
I didn’t avoid the question, I quite clearly called out the reductio ad absurdum and/or straw man for what it was. No. Do not copy/paste string class. In the same way DRY advocates would not want your writing a “plus” function to get rid of all that pesky “+” in your code...
Reply Retweet Like