2 Layers of abstraction
This chapter covers
- How to break a problem down into subproblems with clean layers of abstraction
- How layers of abstraction can help us achieve a number of the pillars of code quality
- APIs and implementation details
- How to break code into distinct layers of abstraction using functions, classes, and interfaces
Writing code is about solving problems. These can be high-level problems, such as “We need a feature to allow users to share photos,” all the way down to low-level problems such as “We need some code to add two numbers together.” Even if we’re not conscious of the fact we’re doing it, when we solve a high-level problem, we usually do it by breaking it down into multiple, smaller subproblems. A problem statement ...
Get Good Code, Bad Code now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.