Software Development in Brisbane

Keyboard Shortcuts to remove from IDE’s

1)Copy
2)Paste

At least every time they are used in combination a big alert should pop-up listing the other available refactorings, with a random chain of “Are You Sure” dialogs popping up if the developer trys to continue.

Cut and Paste are the source of way to many AntiPatterns

4 Responses to “Keyboard Shortcuts to remove from IDE’s”

  1. William Jones Says:

    Maybe some sort of workflow or alerting process to enable the technical leads on a project to approve/reject, or at least be aware of all of the cut and paste activity.
    (Could this be the opportunity that JMS has been waiting for…?!)

  2. cmdln Says:

    Take a look at PMD over at SourceForge. They have a tool bundled in that can help discover cut and pasted code. That would help give leads the visibility into when folks are doing something ill advised. PMD’s other functionality looks pretty impressive, too.

  3. Dave Says:

    I dunno, using copy/paste and search/replace together is a great way to crank out code that is not similar enough to benefit from standard s/w engineering re-use (e.g. procedures, OO, whatever).

  4. Sean Renaults Says:

    Far from being an AntiPattern, I believe that premature attempts at finding reuse because of a fear of Copy and Pasting are the AntiPattern. Agreed, if you’re copy and pasting without changing anything, then your object’s responsiblities are screwy but if you are changing something, it’s better to copy and paste the first few times, find out where the code needs to be flexible and then start looking at refactoring for reuse.

Leave a Reply