Fundamentals of Software Engineering
摘要
In this chapter, we will explore the components that constitute good code. Good code is neither extravagant nor overly complex; rather, it is straightforward and easy to understand. It requires clearly defined levels of abstraction that enhance our comprehension. Additionally, good code must include well-structured interfaces. It should adhere to the Single Responsibility Principle (SRP), which states that each object should have a single, well-defined task. Conversely, violating this principle can lead to a Big Ball of Mud, where the functionality of specific code segments becomes unclear and difficult to ascertain.