1 / 15

High Quality Code – Style Matters

High Quality Code – Style Matters. Chapter 5. Design in Construction Chapter 31. Layout and Style. Software Construction by Jeff Nogy. Chapter 5. Design in Construction. Introduction 5.1. Design Challenges 5.2. Key Design Concepts 5.3. Design Building Blocks: Heuristics

neylan
Télécharger la présentation

High Quality Code – Style Matters

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. High Quality Code – Style Matters • Chapter 5. Design in Construction • Chapter 31. Layout and Style Software Construction by Jeff Nogy

  2. Chapter 5. Design in Construction • Introduction • 5.1. Design Challenges • 5.2. Key Design Concepts • 5.3. Design Building Blocks: Heuristics • 5.4. Design Practices • 5.5. Comments on Popular Methodologies

  3. Introduction - Code Complete

  4. 5. Introduction • Process of building • The hands-on part • Coding or Programming • Construction = Programming

  5. 5.1. Design Challenges • Design Is a Wicked Problem • Wicked problem • Solve the problem once, then solve it again • Tacoma Narrows Bridge • Design Is a Sloppy Process (Even If it Produces a Tidy Result) • False steps and go down many blind alleys • Good Enough?

  6. 5.1. Design Challenges • Design Is About Tradeoffs and Priorities • Ideal world vs. Real world • Design Involves Restrictions • Create possibilities and Restrict possibilities

  7. 5.1. Design Challenges • Design Is Nondeterministic • More than one way to skin a cat • Design Is a Heuristic Process • Trial and Error • Design Is Emergent • Evolve and Improve

  8. 5.2. Key Design Concepts • Software's Primary Technical Imperative: Managing Complexity • Essential and Accidental Difficulties • Importance of Managing Complexity • How to Attack Complexity

  9. 5.2. Key Design Concepts • Desirable Characteristics of a Design • Levels of Design • Level 1: Software System • Level 2: Division into Subsystems or Packages • Level 3: Division into Classes • Level 4: Division into Routines • Level 5: Internal Routine Design

  10. 5.3. Design Building Blocks: Heuristics • Find Real-World Objects • Form Consistent Abstractions • Encapsulate Implementation Details • Inherit—When Inheritance Simplifies the Design

  11. 5.3. Design Building Blocks: Heuristics • Hide Secrets (Information Hiding) • Secrets and the Right to Privacy • Value of Information Hiding • Identify Areas Likely to Change • Keep Coupling Loose • Coupling Criteria • Kinds of Coupling

  12. 5.3. Design Building Blocks: Heuristics • Look for Common Design Patterns • Patterns provide several benefits • Other Heuristics • Things to aim for • Guidelines for Using Heuristics

  13. 5.4. Design Practices • Iterate • Divide and Conquer • Top-Down and Bottom-Up Design Approaches • Experimental Prototyping -------------------- • Collaborative Design • How Much Design Is Enough? • Capturing Your Design Work

  14. 5.5. Comments on Popular Methodologies • “Treat design as a wicked, sloppy, heuristic process. Don't settle for the first design that occurs to you. Collaborate. Strive for simplicity. Prototype when you need to. Iterate, iterate, and iterate again. You'll be happy with your designs.”

  15. Conclusion • Software complexity • Simplicity is achieved in two general ways • Design is heuristic • Good design is iterative • Information hiding • The first priority of visual layout • Looking good is secondary • Pure blocks and Pure-block emulation • Structuring code is important • Religious issues

More Related