The Art of Clean Code: Best Practices to Eliminate Complexity and Simplify Your Life
Softwarequalität

The Art of Clean Code: Best Practices to Eliminate Complexity and Simplify Your Life

Christian Mayer, 2022

Inhaltsverzeichnis des Buches

  • Title Page
  • Copyright
  • Dedication
  • About the Author
  • Foreword
  • Acknowledgments
  • Introduction
  • Who Is This Book For?
  • What Will You Learn?
  • Chapter 1: How Complexity Harms Your Productivity
  • What Is Complexity?
  • Complexity in a Project Life Cycle
  • Planning
  • Defining
  • Designing
  • Building
  • Testing
  • Deployment
  • Complexity in Software and Algorithmic Theory
  • Complexity in Learning
  • Complexity in Processes
  • Complexity in Your Daily Life, or Death by a Thousand Cuts
  • Conclusion
  • Chapter 2: The 80/20 Principle
  • 80/20 Principle Basics
  • Application Software Optimization
  • Productivity
  • Success Metrics
  • Focus and the Pareto Distribution
  • Implications for Coders
  • A Success Metric for Programmers
  • Pareto Distributions in the Real World
  • Pareto Is Fractal
  • 80/20 Practice Tips
  • Resources
  • Chapter 3: Build a Minimum Viable Product
  • A Problem Scenario
  • Loss of Motivation
  • Distraction
  • Running Over Time
  • Lack of Response
  • Wrong Assumptions
  • Unnecessary Complexity
  • Building a Minimum Viable Product
  • Four Pillars of Building a Minimum Viable Product
  • Advantages of the Minimum Viable Product
  • Stealth vs. Minimum Viable Product Approach
  • Conclusion
  • Chapter 4: Write Clean and Simple Code
  • Why Write Clean Code?
  • Writing Clean Code: The Principles
  • Principle 1: Think About the Big Picture
  • Principle 2: Stand on the Shoulders of Giants
  • Principle 3: Code for People, Not Machines
  • Principle 4: Use the Right Names
  • Principle 5: Adhere to Standards and Be Consistent
  • Principle 6: Use Comments
  • Principle 7: Avoid Unnecessary Comments
  • Principle 8: The Principle of Least Surprise
  • Principle 9: Don’t Repeat Yourself
  • Principle 10: Single Responsibility Principle
  • Principle 11: Test
  • Principle 12: Small Is Beautiful
  • Principle 13: The Law of Demeter
  • Principle 14: You Ain’t Gonna Need It
  • Principle 15: Don’t Use Too Many Levels of Indentation
  • Principle 16: Use Metrics
  • Principle 17: Boy Scout Rule and Refactoring
  • Conclusion
  • Chapter 5: Premature Optimization Is the Root of All Evil
  • Six Types of Premature Optimization
  • Optimizing Code Functions
  • Optimizing Features
  • Optimizing Planning
  • Optimizing Scalability
  • Optimizing Test Design
  • Optimizing Object-Oriented World Building
  • Premature Optimization: A Story
  • Six Tips for Performance Tuning
  • Measure First, Improve Second
  • Pareto Is King
  • Algorithmic Optimization Wins
  • All Hail the Cache
  • Less Is More
  • Know When to Stop
  • Conclusion
  • Chapter 6: Flow
  • What Is Flow?
  • How to Achieve Flow
  • Clear Goals
  • Feedback Mechanism
  • Balance Opportunity and Capacity
  • Flow Tips for Coders
  • Conclusion
  • Resources
  • Chapter 7: Do One Thing Well and Other Unix Principles
  • The Rise of Unix
  • Philosophy Overview
  • 15 Useful Unix Principles
  • 1. Make Each Function Do One Thing Well
  • 2. Simple Is Better Than Complex
  • 3. Small Is Beautiful
  • 4. Build a Prototype as Soon as Possible
  • 5. Choose Portability Over Efficiency
  • 6. Store Data in Flat Text Files
  • 7. Use Software Leverage to Your Advantage
  • 8. Avoid Captive User Interfaces
  • 9. Make Every Program a Filter
  • 10. Worse Is Better
  • 11. Clean Code Is Better Than Clever Code
  • 12. Design Programs to Connect With Other Programs
  • 13. Make Your Code Robust
  • 14. Repair What You Can—But Fail Early and Noisily
  • 15. Avoid Hand-Hacking: Write Programs to Write Programs If You Can
  • Conclusion
  • Resources
  • Chapter 8: Less Is More in Design
  • Minimalism in the Evolution of Mobile Phones
  • Minimalism in Search
  • Material Design
  • How to Achieve Minimalistic Design
  • Use Whitespace
  • Remove Design Elements
  • Remove Features
  • Reduce Variations of Fonts and Colors
  • Be Consistent
  • Conclusion
  • Resources
  • Chapter 9: Focus
  • The Weapon Against Complexity
  • Unifying the Principles
  • Conclusion
  • Letter from the Author
  • Index