CINXE.COM

Devlopment

<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN"> <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> <meta name="GENERATOR" content="Microsoft FrontPage 3.0"> <title>Devlopment</title> <meta name="Microsoft Theme" content="rmnsque 111"> <meta name="Microsoft Border" content="tlb, default"> </head> <body background="_themes/rmnsque/romtextb.jpg" bgcolor="#FFFFFF" text="#663300" link="#660000" vlink="#999900" alink="#006600"><!--msnavigation--><table border="0" cellpadding="0" cellspacing="0" width="100%"><tr><td><!--mstheme--><font face="Times New Roman, Times"> <p align="center"><font size="6"><strong><img src="_derived/dev_cat.htm_cmp_rmnsque110_bnr.gif" width="600" height="60" border="0" alt="Devlopment"></strong></font><br> <img src="_derived/dev_cat.htm_cmp_rmnsque110_hbtn_p.gif" width="140" height="45" border="0" alt="Devlopment" align="middle"> <script language="JavaScript"><!-- MSFPhover = (((navigator.appName == "Netscape") && (parseInt(navigator.appVersion) >= 3 )) || ((navigator.appName == "Microsoft Internet Explorer") && (parseInt(navigator.appVersion) >= 4 ))); function MSFPpreload(img) { var a=new Image(); a.src=img; return a; } // --></script><script language="JavaScript"><!-- if(MSFPhover) { MSFPnav1n=MSFPpreload("_derived/mgmt_cat.htm_cmp_rmnsque110_hbtn.gif"); MSFPnav1h=MSFPpreload("_derived/mgmt_cat.htm_cmp_rmnsque110_hbtn_a.gif"); } // --></script><a href="mgmt_cat.htm" language="JavaScript" onmouseover="if(MSFPhover) document['MSFPnav1'].src=MSFPnav1h.src" onmouseout="if(MSFPhover) document['MSFPnav1'].src=MSFPnav1n.src"><img src="_derived/mgmt_cat.htm_cmp_rmnsque110_hbtn.gif" width="140" height="45" border="0" alt="Management" align="middle" name="MSFPnav1"></a> <script language="JavaScript"><!-- if(MSFPhover) { MSFPnav2n=MSFPpreload("_derived/arch_cat.htm_cmp_rmnsque110_hbtn.gif"); MSFPnav2h=MSFPpreload("_derived/arch_cat.htm_cmp_rmnsque110_hbtn_a.gif"); } // --></script><a href="arch_cat.htm" language="JavaScript" onmouseover="if(MSFPhover) document['MSFPnav2'].src=MSFPnav2h.src" onmouseout="if(MSFPhover) document['MSFPnav2'].src=MSFPnav2n.src"><img src="_derived/arch_cat.htm_cmp_rmnsque110_hbtn.gif" width="140" height="45" border="0" alt="Architecture" align="middle" name="MSFPnav2"></a></p> <p align="center">&nbsp;</p> <!--mstheme--></font></td></tr><!--msnavigation--></table><!--msnavigation--><table border="0" cellpadding="0" cellspacing="0" width="100%"><tr><td valign="top" width="1%"><!--mstheme--><font face="Times New Roman, Times"> <p><script language="JavaScript"><!-- if(MSFPhover) { MSFPnav3n=MSFPpreload("_derived/lavaflow.htm_cmp_rmnsque110_vbtn.gif"); MSFPnav3h=MSFPpreload("_derived/lavaflow.htm_cmp_rmnsque110_vbtn_a.gif"); } // --></script><a href="lavaflow.htm" language="JavaScript" onmouseover="if(MSFPhover) document['MSFPnav3'].src=MSFPnav3h.src" onmouseout="if(MSFPhover) document['MSFPnav3'].src=MSFPnav3n.src"><img src="_derived/lavaflow.htm_cmp_rmnsque110_vbtn.gif" width="140" height="45" border="0" alt="Lava Flow" name="MSFPnav3"></a> </p> <!--mstheme--></font></td><td valign="top" width="24"></td><!--msnavigation--><td valign="top"><!--mstheme--><font face="Times New Roman, Times"> <h1><!--mstheme--><font face="Book Antiqua, Times New Roman, Times" color="#660000">What are Development AntiPatterns?<!--mstheme--></font></h1> <p><em>(for a quick example, see the website's featured Development AntiPattern,</em> <a href="lavaflow.htm">Lava Flow</a><em>)</em></p> <p>Our first exposure to software development AntiPatterns was through the presentations of Mike Akroyd, a hands-on software consultant to Motorola and other major firms [Akroyd 96].&nbsp; The Akroyd AntiPatterns define classic problems in object-oriented software design.&nbsp; Some of the development AntiPatterns in this book are extensions of his concepts (see references).&nbsp; One attractive feature of all Akroyd AntiPatterns is the inclusion of a <em>refactored solution</em>, the incorporation of which gives AntiPatterns a valuable purpose: Not only to they point out trouble, but they also tell you how to get out of it.</p> <p>Proper AntiPatterns define a migration (or refactoring) from negative solutions to positive solutions.&nbsp; AntiPatterns that describe only the negative solution are called <em>pseudo-AntiPatterns </em>(or more typically, <em>complaints</em> -- think of pseudo-AntiPatterns as flaming e-mail diatribes).&nbsp; After working with the Akroyd AntiPatterns, we discovered examples of AntiPatterns and pseudo-AntiPatterns on the Internet.&nbsp; The Pattern Languages of Program Design (PLoP) conference also discussed some AntiPattern-related papers, such as the &quot;Big Ball of Mud&quot; [Foote 97].</p> <h2><!--mstheme--><font face="Book Antiqua, Times New Roman, Times" color="#996600">Software Refactoring<!--mstheme--></font></h2> <p>A key goal of development AntiPatterns is to describe useful forms of software refactoring.&nbsp; Software refactoring is a form of code modification, used to improve the software structure in support of subsequent extension and long-term maintenance. &nbsp; In most cases, the goal is to transform code without impacting correctness.</p> <p>Good software architecture is essential for system extension and maintenance. &nbsp; Software development is a chaotic activity, therefore the implemented structure of systems tends to stray from the planned structure as determined by the architecture, analysis and design.&nbsp; Software refactoring is an effective approach for improving software structure.&nbsp; The resulting structure does not have to resemble the original planned structure.&nbsp; The structure changes because programmers learn constraints and approaches that alter the context of the coded solutions.&nbsp; When used properly, refactoring is a natural activity in the programming process.&nbsp; For example, the solution for the Spaghetti Code AntiPattern discussed in this book defines a software development process that incorporates refactoring.</p> <p>Refactoring is strongly recommended prior to performance optimization. &nbsp; Optimizations often involve compromises to program structure.&nbsp; Ideally, optimizations affect only small portions of a program.&nbsp; Prior refactoring helps to partition optimized code from the majority of the software.</p> <p>Read more about refactoring, and formal refactoring transformations in our book in chapter five.</p> <!--mstheme--></font><table border="0" cellpadding="9" cellspacing="1" width="100%"> <tr> <td width="107"><!--mstheme--><font face="Times New Roman, Times"><font size="4"><strong>AntiPattern</strong></font><!--mstheme--></font></td> <td width="268"><!--mstheme--><font face="Times New Roman, Times"><font size="4"><strong>Synopsis</strong></font><!--mstheme--></font></td> <td colspan="2" width="327"><!--mstheme--><font face="Times New Roman, Times"><font size="4"><strong>Refactored Solution</strong></font><!--mstheme--></font></td> </tr> <tr> <td width="107"><!--mstheme--><font face="Times New Roman, Times"><font size="2"><strong>Ambiguous Viewpoint</strong></font><!--mstheme--></font></td> <td colspan="2" width="274"><!--mstheme--><font face="Times New Roman, Times"><font size="2">Lack of clarification of the modeling viewpoint leads to problematic ambiguities in object models.</font><!--mstheme--></font></td> <td width="321"><!--mstheme--><font face="Times New Roman, Times"><font size="2">Always clarify which of the 3 essential viewpoints is modeled: business, specification, or implementation.</font><!--mstheme--></font></td> </tr> <tr> <td width="107"><!--mstheme--><font face="Times New Roman, Times"><font size="2"><strong>Boat Anchor</strong></font><!--mstheme--></font></td> <td colspan="2" width="274"><!--mstheme--><font face="Times New Roman, Times"><font size="2" face="Times,Times New Roman">A costly technology is purchased by a systems development project that goes unused.</font><!--mstheme--></font></td> <td width="321"><!--mstheme--><font face="Times New Roman, Times"><font size="2">Send competent engineers to the product training course, in order to evaluate, before you buy the product.</font><!--mstheme--></font></td> </tr> <tr> <td width="107"><!--mstheme--><font face="Times New Roman, Times"><font size="2"><strong>Continuous Obsolescence</strong></font><!--mstheme--></font></td> <td colspan="2" width="274"><!--mstheme--><font face="Times New Roman, Times"><font size="2" face="Times,Times New Roman">Internet-time technology releases surpasses our ability to keep up and keep other technologies synchronized.</font><!--mstheme--></font></td> <td width="321"><!--mstheme--><font face="Times New Roman, Times"><font size="2">Depend upon stable technologies and interfaces that you control. Open systems standards provide stability.</font><!--mstheme--></font></td> </tr> <tr> <td width="107"><!--mstheme--><font face="Times New Roman, Times"><font size="2" face="Times,Times New Roman"><strong>Cut and Paste Programming</strong></font><!--mstheme--></font></td> <td width="268"><!--mstheme--><font face="Times New Roman, Times"><font size="2" face="Times,Times New Roman">Code reused by copying source statements leads to significant maintenance problems.</font><!--mstheme--></font></td> <td colspan="2" width="327"><!--mstheme--><font face="Times New Roman, Times"><font size="2">Black Box reuse reduces maintenance issues by having a common source code, testing, and documentation for multiple reuses.</font><!--mstheme--></font></td> </tr> <tr> <td width="107"><!--mstheme--><font face="Times New Roman, Times"><font size="2"><strong>Dead End</strong></font><!--mstheme--></font></td> <td colspan="2" width="274"><!--mstheme--><font face="Times New Roman, Times"><font size="2" face="Times,Times New Roman">Direct modification of commercial software or reusable software creates significant maintenance burdens for a software system.</font><!--mstheme--></font></td> <td width="321"><!--mstheme--><font face="Times New Roman, Times"><font size="2">Avoid modification of supported software. Choose mainstream, supported products and platforms whenever possible.</font><!--mstheme--></font></td> </tr> <tr> <td width="107"><!--mstheme--><font face="Times New Roman, Times"><font size="2"><strong>Fire Drill</strong></font><!--mstheme--></font></td> <td colspan="2" width="274"><!--mstheme--><font face="Times New Roman, Times"><font size="2">Management waits until the last possible moment to allow developers to proceed with design and implementation; then they want results almost immediately.</font><!--mstheme--></font></td> <td width="321"><!--mstheme--><font face="Times New Roman, Times"><font size="2">Proactive design and prototyping are often warranted; even if customers and management staff are not completely on-board.</font><!--mstheme--></font></td> </tr> <tr> <td width="107"><!--mstheme--><font face="Times New Roman, Times"><font size="2"><strong>Functional Decomposition</strong></font><!--mstheme--></font></td> <td width="268"><!--mstheme--><font face="Times New Roman, Times"><font size="2">Non-OO design (possibly from legacy) is coded in OO language and notation.</font><!--mstheme--></font></td> <td colspan="2" width="327"><!--mstheme--><font face="Times New Roman, Times"><font size="2">Since there is no straightforward way to refactor: redesign using OO principles.</font><!--mstheme--></font></td> </tr> <tr> <td width="107"><!--mstheme--><font face="Times New Roman, Times"><font size="2"><strong>Golden Hammer</strong></font><!--mstheme--></font></td> <td width="268"><!--mstheme--><font face="Times New Roman, Times"><font size="2">A familiar technology or concept is applied obsessively to many problems.</font><!--mstheme--></font></td> <td colspan="2" width="327"><!--mstheme--><font face="Times New Roman, Times"><font size="2">Expanding the knowledge of developers through education, training, and book study groups exposes developers to new solutions.</font><!--mstheme--></font></td> </tr> <tr> <td width="107"><!--mstheme--><font face="Times New Roman, Times"><font size="2"><strong>Input Kludge</strong></font><!--mstheme--></font></td> <td colspan="2" width="274"><!--mstheme--><font face="Times New Roman, Times"><font size="2">Custom-programmed input algorithms contain many bugs which are easily encountered by users and testers.</font><!--mstheme--></font></td> <td width="321"><!--mstheme--><font face="Times New Roman, Times"><font size="2">Utilize production-quality input processing techniques, including lexical analysis, parser generators, and features matrices.</font><!--mstheme--></font></td> </tr> <tr> <td width="107"><!--mstheme--><font face="Times New Roman, Times"><a href="lavaflow.htm"><font size="2"><strong>Lava Flow</strong></font></a><!--mstheme--></font></td> <td width="268"><!--mstheme--><font face="Times New Roman, Times"><font size="2">Dead code and forgotten design information is frozen in an ever-changing design.</font><!--mstheme--></font></td> <td colspan="2" width="327"><!--mstheme--><font face="Times New Roman, Times"><font size="2">Configuration control processes that eliminate dead code and evolve/refactor design towards increasing quality.</font><!--mstheme--></font></td> </tr> <tr> <td width="107"><!--mstheme--><font face="Times New Roman, Times"><font size="2" face="Times,Times New Roman"><strong>Mushroom Management</strong></font><!--mstheme--></font></td> <td colspan="2" width="274"><!--mstheme--><font face="Times New Roman, Times"><font size="2">Keep the developers in dark and feed them fertilizer. End-user interaction prohibited.</font><!--mstheme--></font></td> <td width="321"><!--mstheme--><font face="Times New Roman, Times"><font size="2">Risk-driven development includes frequent user-interaction to maximize usability and acceptance.</font><!--mstheme--></font></td> </tr> <tr> <td width="107"><!--mstheme--><font face="Times New Roman, Times"><font size="2"><strong>Poltergeists</strong></font><!--mstheme--></font></td> <td width="268"><!--mstheme--><font face="Times New Roman, Times"><font size="2">Classes with a very limited roles and lifecycles, often starting processes for other objects.</font><!--mstheme--></font></td> <td colspan="2" width="327"><!--mstheme--><font face="Times New Roman, Times"><font size="2">Allocate the responsibility to longer-lived objects and eliminate the poltergeists.</font><!--mstheme--></font></td> </tr> <tr> <td width="107"><!--mstheme--><font face="Times New Roman, Times"><font size="2" face="Times,Times New Roman"><strong>The Blob</strong></font><!--mstheme--></font></td> <td width="268"><!--mstheme--><font face="Times New Roman, Times"><font size="2" face="Times,Times New Roman">Procedural-style design leads to one object with numerous responsibilities and most other objects only holding data.</font><!--mstheme--></font></td> <td colspan="2" width="327"><!--mstheme--><font face="Times New Roman, Times"><font size="2">Refactor the design to distributed responsibilities more uniformly and isolate the effect of changes.</font><!--mstheme--></font></td> </tr> <tr> <td width="107"><!--mstheme--><font face="Times New Roman, Times"><font size="2"><strong>Walking Through a Mine Field</strong></font><!--mstheme--></font></td> <td colspan="2" width="274"><!--mstheme--><font face="Times New Roman, Times"><font size="2" face="Times,Times New Roman">Software technology is much less robust than people imagine; bugs are pervasive and potentially catastrophic.</font><!--mstheme--></font></td> <td width="321"><!--mstheme--><font face="Times New Roman, Times"><font size="2">Proper investment in software testing and inspection is needed to reduce the frequency and density of software defects.</font><!--mstheme--></font></td> </tr> </table><!--mstheme--><font face="Times New Roman, Times"> &nbsp;<!--mstheme--></font><!--msnavigation--></td></tr><!--msnavigation--></table><!--msnavigation--><table border="0" cellpadding="0" cellspacing="0" width="100%"><tr><td><!--mstheme--><font face="Times New Roman, Times"> <!--msthemeseparator--><p align="center"><img src="_themes/rmnsque/romhorsa.gif" width="600" height="10"></p> <p align="center"><script language="JavaScript"><!-- if(MSFPhover) { MSFPnav4n=MSFPpreload("_derived/home_cmp_rmnsque110_home.gif"); MSFPnav4h=MSFPpreload("_derived/home_cmp_rmnsque110_home_a.gif"); } // --></script><a href="./" language="JavaScript" onmouseover="if(MSFPhover) document['MSFPnav4'].src=MSFPnav4h.src" onmouseout="if(MSFPhover) document['MSFPnav4'].src=MSFPnav4n.src"><img src="_derived/home_cmp_rmnsque110_home.gif" width="100" height="20" border="0" alt="Home" align="middle" name="MSFPnav4"></a> <script language="JavaScript"><!-- if(MSFPhover) { MSFPnav5n=MSFPpreload("_derived/up_cmp_rmnsque110_up.gif"); MSFPnav5h=MSFPpreload("_derived/up_cmp_rmnsque110_up_a.gif"); } // --></script><a href="catalog.htm" language="JavaScript" onmouseover="if(MSFPhover) document['MSFPnav5'].src=MSFPnav5h.src" onmouseout="if(MSFPhover) document['MSFPnav5'].src=MSFPnav5n.src"><img src="_derived/up_cmp_rmnsque110_up.gif" width="100" height="20" border="0" alt="Up" align="middle" name="MSFPnav5"></a> <script language="JavaScript"><!-- if(MSFPhover) { MSFPnav6n=MSFPpreload("_derived/next_cmp_rmnsque110_next.gif"); MSFPnav6h=MSFPpreload("_derived/next_cmp_rmnsque110_next_a.gif"); } // --></script><a href="mgmt_cat.htm" language="JavaScript" onmouseover="if(MSFPhover) document['MSFPnav6'].src=MSFPnav6h.src" onmouseout="if(MSFPhover) document['MSFPnav6'].src=MSFPnav6n.src"><img src="_derived/next_cmp_rmnsque110_next.gif" width="100" height="20" border="0" alt="Next" align="middle" name="MSFPnav6"></a></p> <p align="center">� Copyright 2017 William Brown, Raphael Malveau, Hays McCormick, Thomas Mowbray, and Scott W. Thomas.&nbsp; All rights reserved.<br> <small><small><em>For problems or questions regarding this web contact <a href="mailto:skip@antipatterns.com">[Web Master]</a>.</em></small></small><br> <small>Last updated: April 2, 2017</small></p> <!--mstheme--></font></td></tr><!--msnavigation--></table></body> </html>

Pages: 1 2 3 4 5 6 7 8 9 10