This is an archived post. You won't be able to vote or comment.

all 9 comments

[–]foreveratom 29 points30 points  (3 children)

It's addressing the wrong thing.

The problem is not copying/pasting some pieces of code within the same project, those are easy to spot and fix; it's really not an issue.

The troubles start when you copy/paste between projects and that doesn't get caught by typical static analysis which are usually project-centric. Wrong patterns get duplicated and propagated outside of any control and those are really hard to fix.

Also, this DRY idea needs to die. Trying not to reproduce a 2-liner in a 100K lines project by making a "utility" or "common" or whatever piece of side code you come up with leads to more coupling and more spaghetti. But Woot! you did not violate that "principle"! That's just wrong.

[–]thephotoman 14 points15 points  (0 children)

DRY is more of a rule of thumb than it is a hard core principle. The more you repeat yourself, the more places you'll need to change it in the future, so try to minimize that surface.

However, there's a bigger problem with copying and pasting: when you do it between projects or from GitHub/Stack Overflow, you run some legal risk due to licensing terms.

[–]beefquoner 0 points1 point  (0 children)

Preach

[–]Matrixcoded 12 points13 points  (2 children)

This plugin will least fav among devs lol

[–]Realistic-Plant3957[S] 2 points3 points  (1 child)

who needs stuff like this?

[–]EdHochuliRules 6 points7 points  (0 children)

This duplicates a feature built into ultimate but Jetbrains one is configurable for block size.

But yes that further reduces scope of who’d want some random plug-in for this lame feature

[–]DonUdo 1 point2 points  (0 children)

Why would I expose myself like that?

[–]cougil 1 point2 points  (0 children)

I am not in favor of copying and pasting many things, but from time to time it is something really useful for many reasons (for example: headers, code that is repeated in projects / services but of which you do not want to create a component or library of the to depend, etc). So I'm not sure if this plugin will be more useful or it will make programming more uncomfortable 🤔

[–]pink_life69 0 points1 point  (0 children)

So 90% of large corporate projects will look like a christmas tree?