Book description
Most software developers waste thousands of hours working with overly complex code. The eight core principles in The Art of Clean Code will teach you how to write clear, maintainable code without compromising functionality. The book’s guiding principle is simplicity: reduce and simplify, then reinvest energy in the important parts to save you countless hours and ease the often onerous task of code maintenance.
Bestselling author Christian Mayer leverages his experience helping thousands perfect their coding skills in this new book. With expert advice and real-world examples, he’ll show you how to:
•Concentrate on the important stuff with the 80/20 principle — focus on the 20% of your code that matters most •Avoid coding in isolation: create a minimum viable product to get early feedback •Write code cleanly and simply to eliminate clutter •Avoid premature optimization that risks over-complicating code •Balance your goals, capacity, and feedback to achieve the productive state of Flow •Apply the Do One Thing Well philosophy to vastly improve functionality •Design efficient user interfaces with the Less is More principle •Tie your new skills together into one unifying principle: Focus
This Python-based guide is suitable for programmers at any level, with ideas presented in a language-agnostic manner.
Publisher resources
Table of contents
- Title Page
- Copyright
- Dedication
- About the Author
- Foreword
- Acknowledgments
- Introduction
- Chapter 1: How Complexity Harms Your Productivity
- Chapter 2: The 80/20 Principle
- Chapter 3: Build a Minimum Viable Product
-
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
- Chapter 6: Flow
-
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
- Chapter 9: Focus
- Letter from the Author
- Index
Product information
- Title: The Art of Clean Code
- Author(s):
- Release date: August 2022
- Publisher(s): No Starch Press
- ISBN: 9781718502185
You might also like
book
Five Lines of Code
In Five Lines of Code you will learn: The signs of bad code Improving code safely, …
book
Tidy First?
Messy code is a nuisance. "Tidying" code, to make it more readable, requires breaking it up …
book
Clean Coder, The: A Code of Conduct for Professional Programmers
Programmers who endure and succeed amidst swirling uncertainty and nonstop pressure share a common attribute: They …
book
Refactoring: Improving the Design of Existing Code
Fully Revised and Updated–Includes New Refactorings and Code Examples “Any fool can write code that a …