Book description
Have you ever felt frustrated working with someone else’s code? Difficult-to-maintain source code is a big problem in software development today, leading to costly delays and defects. Be part of the solution. With this practical book, you’ll learn 10 easy-to-follow guidelines for delivering Java software that’s easy to maintain and adapt. These guidelines have been derived from analyzing hundreds of real-world systems.
Written by consultants from the Software Improvement Group (SIG), this book provides clear and concise explanations, with advice for turning the guidelines into practice. Examples for this edition are written in Java, while our companion C# book provides workable examples in that language.
- Write short units of code: limit the length of methods and constructors
- Write simple units of code: limit the number of branch points per method
- Write code once, rather than risk copying buggy code
- Keep unit interfaces small by extracting parameters into objects
- Separate concerns to avoid building large classes
- Couple architecture components loosely
- Balance the number and size of top-level components in your code
- Keep your codebase as small as possible
- Automate tests for your codebase
- Write clean code, avoiding "code smells" that indicate deeper problems
Publisher resources
Table of contents
-
Preface
- The Topic of This Book: Ten Guidelines for Building Maintainable Software
- Why You Should Read This Book
- Who Should Read This Book
- What This Book Is Not
- The Follow-up Book
- About the Software Improvement Group
- About This Edition
- Related Books
- Conventions Used in This Book
- Generic Names for Elements of Source Code
- Using Code Examples
- Safari® Books Online
- How to Contact Us
- Acknowledgments
- 1. Introduction
- 2. Write Short Units of Code
- 3. Write Simple Units of Code
- 4. Write Code Once
- 5. Keep Unit Interfaces Small
- 6. Separate Concerns in Modules
- 7. Couple Architecture Components Loosely
- 8. Keep Architecture Components Balanced
-
9. Keep Your Codebase Small
- Motivation
- How to Apply the Guideline
-
Common Objections to Keeping the Codebase Small
- Objection: Reducing the Codebase Size Is Impeded by Productivity Measures
- Objection: Reducing the Codebase Size is Impeded by the Programming Language
- Objection: System Complexity Forces Code Copying
- Objection: Splitting the Codebase Is Impossible Because of Platform Architecture
- Objection: Splitting the Codebase Leads to Duplication
- Objection: Splitting the Codebase Is Impossible Because of Tight Coupling
- 10. Automate Tests
- 11. Write Clean Code
- 12. Next Steps
- A. How SIG Measures Maintainability
- Index
Product information
- Title: Building Maintainable Software, Java Edition
- Author(s):
- Release date: January 2016
- Publisher(s): O'Reilly Media, Inc.
- ISBN: 9781491953495
You might also like
book
Java Projects - Second Edition
Learn how to build scalable, resilient, and effective applications in Java that suit your software requirements. …
book
Continuous Delivery in Java
Continuous delivery adds enormous value to the business and the entire software delivery lifecycle, but adopting …
book
Optimizing Java
Performance tuning is an experimental science, but that doesn’t mean engineers should resort to guesswork and …
book
Building Large-Scale Web Applications with Angular
A definitive guide on frontend development with Angular from design to deployment Key Features Develop web …