List of Figures

 < Day Day Up > 



Chapter 1: Premature Optimization

Figure 1.1: Data and instruction caches are located on the main processor, but must access memory when a cache miss occurs.
Figure 1.2: Data directly on the main processor is accessed the fastest, while data accessed from memory because of a cache miss is slightly slower, and data accessed from a hard disk or similar storage medium because of a page fault is substantially slower.
Figure 1.3: The left side shows a sample sequence using a copy-on-write (COW) string, while the right side shows the same sample sequence using a string that always performs a copy. Because the COW string shares data between threads, a lock must be performed for every copy, including local copies. This results in a longer running time for the overall application using the COW string.
Figure 1.4: A) Example of the number of extra bits that go unused if a bit-field is not used. B) Example of the extra computation required when testing a bit-field.
Figure 1.5: Relationship between encapsulation and abstraction.
Figure 1.6: Use the Factory Pattern to create different concrete Strategy instances for testing. Each concrete Strategy implements the abstract Strategy interface and is therefore interchangeable.
Figure 1.7: After typing only m, Visual Assist guesses from the surrounding context that m_ClampIndex is what the user wants. The user only needs to press TAB to complete the entire word.
Figure 1.8: Using distinct namespaces and proper naming conventions, utility::example_registry::instance().run(); can be entered into Visual Assist by typing only uTAB::↓↓TAB::iTAB.run();
Figure 1.9: Special auto-completion sequences in IntelliJ’s IDEA editor. Typing itco then the key sequence for auto-completion will expand to the text currently in edit box, where text surrounded with $ has special meaning.
Figure 1.10: File template in IntelliJ’s IDEA editor that places standard copyright information and file creation information in a comment at the top of new Java files.
Figure 1.11: Intel VTune Performance Analyzer.
Figure 1.12: Browsing the call graph in Intel VTune Performance Analyzer can give more information on the source of expensive calls, providing extra context for deciding where to make optimizations.
Figure 1.13: Profiling test setup for an interactive application. Inputs are stored and then played back to achieve runs that differ in as few ways as possible.
Figure 1.14: Workflow that takes advantage of source control for reverting failed changes.

Chapter 2: CAP Epidemic

Figure 2.1: The Structure window in IntelliJ’s IDEA allows the user to visualize the structure of a class, including where an overridden method originates and what accessor methods are present.
Figure 2.2: A) Code with tracing before using aspects, the programmer would have to edit each instance of the tracing code. B) Tracing code has been removed and collected into a single aspect; this is now what the programmer will view and edit. C) Tracing code is woven back into the object code; this would not normally be seen by the programmer.
Figure 2.3: The editor, compiler, and debugger work together with one or more domain specific plug-ins to allow the programmer to view and interact with the source in a domain-specific manner.
Figure 2.4: Generative programming only requires human interaction during the customer’s feature specification and the bits of custom code that are not available in the active libraries.

Chapter 3: NIH Syndrome

Figure 3.1: A bridge between the project style interface and the libraries is made through a private interface that provides uniform access to each library’s wrapper.

Chapter 5: Over Simplification

Figure 5.1: The progression of class complexity over a typical group of classes suffering from Over Simplification. The size of the rectangle representing a class represents the classes’ complexity. Once it becomes obvious that one or more of the classes has become overly complex, refactoring can redistribute the complexity to a more maintainable level.

Chapter 6: Docuphobia

Figure 6.1: Example of HTML documentation generated by Doxygen from the code and associated comments.
Figure 6.2: Configuration dialog for Doxygen, an automated documentation generator. Notice that several different output formats can be seen in the tabs, such as HTML, LaTeX, RTF, and man pages.
Figure 6.3: A tool-tip appears in IntelliJ’s IDEA to show the JavaDoc comments for a member function.

Chapter 7: i

Figure 7.1: Improved auto-completion with Visual Assist makes it easier to enter long names in Microsoft Visual Studio.
Figure 7.2: Refactoring a member function name using IntelliJ’s IDEA to make it more readable. IDEA ensures that all instances are properly renamed.

Chapter 8: Hardcode

Figure 8.1: Ant build file shown in XMLSpy for viewing and editing.
Figure 8.2: Context highlighting is used to make strings and numbers more visible in Microsoft Visual Studio.
Figure 8.3: By adding underlining to strings and numbers in IntelliJ’s IDEA, they become more visible even when printed.

Chapter 9: Brittle Bones

Figure 9.1: Illustration of how a single weakness in the foundation can be built upon to create further weaknesses throughout development. This often obfuscates the fact that the weakness originates from the foundation, making this illness even more difficult to diagnose.
Figure 9.2: Effect of project scope and complexity on the amount of initial design required.
Figure 9.3: Effect of team size and skill level on the amount of initial design required.

Chapter 10: Requirement Deficiency

Figure 10.1: Communication and concerns of the standard parties involved in requirements and software development. Optimal communication involves all parties involved having direct communication with any other party when necessary, but it is more common and sometimes necessary to limit communication to the more standard channels.
Figure 10.2: Advanced search features in The Bat allow the use of regular expressions to find specific information. Here a search is being performed for all messages that contain the text indicating a zip file attachment.



 < Day Day Up > 



Preventative Programming Techniques. Avoid and Correct Common Mistakes
Preventative Programming Techniques: Avoid and Correct Common Mistakes (Charles River Media Programming)
ISBN: 1584502576
EAN: 2147483647
Year: 2002
Pages: 121
Authors: Brian Hawkins

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net