You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I understand this is a feature request and questions should be posted in the Community Forum
I searched issues and couldn’t find anything (or linked relevant results below)
Problem
I think that when logic has been copy-pasted to more than 2-3 places, it's usually time to refactor and make a common abstraction.
There is plenty of plugin logic that has been duplicated between plugins. This leads to the problem where the code constantly drifts apart: someone fixes a bug or introduces something in one plugin, but forgets to also update the same copy-pasted code in other plugins. I see this happening often with bugs that are being reported for one plugin, and we fix it, but in reality the problem exists in all plugins, so we need to go back and fix the others too.
Problematic code (feel free to edit and add more):
Initial checklist
Problem
I think that when logic has been copy-pasted to more than 2-3 places, it's usually time to refactor and make a common abstraction.
There is plenty of plugin logic that has been duplicated between plugins. This leads to the problem where the code constantly drifts apart: someone fixes a bug or introduces something in one plugin, but forgets to also update the same copy-pasted code in other plugins. I see this happening often with bugs that are being reported for one plugin, and we fix it, but in reality the problem exists in all plugins, so we need to go back and fix the others too.
Problematic code (feel free to edit and add more):
uploadRemote
(4 copies) is almost identical in most plugins - see make sure that we reset serverToken when an upload fails #4376connectToServerSocket
(4 copies) should also be very similar between plugins but it's alot of logic that has been duplicatedSolution
Pull out the code into a common abstraction (e.g. shared function or super class method)
Alternatives
use
// LOUD COMMENTS
to warn developers that they need to update code multiple places if they try to change code in one pluginThe text was updated successfully, but these errors were encountered: