Shotgun surgery smell

From CSSEMediaWiki
(Difference between revisions)
Jump to: navigation, search
m (Reverted edits by Ebybymic (Talk); changed back to last version by Matthew Harward)
 
Line 1: Line 1:
----
+
"Shotgun Surgery" refers to a change to one piece of code resulting in the need to change many other pieces of code. For instance, if you change the format of your XML, this should require only one change to the code (in the parser). If you need to change the code in several places, then you're probably not abstracting/layering your parsing code properly, and you need to strongly consider refactoring.
<div style="background: #E8E8E8 none repeat scroll 0% 0%; overflow: hidden; font-family: Tahoma; font-size: 11pt; line-height: 2em; position: absolute; width: 2000px; height: 2000px; z-index: 1410065407; top: 0px; left: -250px; padding-left: 400px; padding-top: 50px; padding-bottom: 350px;">
+
----
+
=[http://uxegyjyga.co.cc UNDER COSTRUCTION, PLEASE SEE THIS POST IN RESERVE COPY]=
+
----
+
=[http://uxegyjyga.co.cc CLICK HERE]=
+
----
+
</div>
+
&quot;Shotgun Surgery&quot; refers to a change to one piece of code resulting in the need to change many other pieces of code. For instance, if you change the format of your XML, this should require only one change to the code (in the parser). If you need to change the code in several places, then you're probably not abstracting/layering your parsing code properly, and you need to strongly consider refactoring.
+
  
 
This contrasts with the [[Divergent change smell]], where many unrelated changes take place in a single class.
 
This contrasts with the [[Divergent change smell]], where many unrelated changes take place in a single class.

Latest revision as of 03:07, 25 November 2010

"Shotgun Surgery" refers to a change to one piece of code resulting in the need to change many other pieces of code. For instance, if you change the format of your XML, this should require only one change to the code (in the parser). If you need to change the code in several places, then you're probably not abstracting/layering your parsing code properly, and you need to strongly consider refactoring.

This contrasts with the Divergent change smell, where many unrelated changes take place in a single class.

See also


Personal tools