Ask HN: What is the best code base you ever worked on?
561 pointsAnd what made it so good?
Was there someone enforcing good practices top down? Just being in a group of great engineers? Or something else?
Was there someone enforcing good practices top down? Just being in a group of great engineers? Or something else?
Comments (454) 104 threads
Show all comments
Showing thread 37 of 104
Wrapping the API lets you see, all in one place, the surface area of an external API that is in use, and minimizes the changes required here when reimplementing it.
---
Also, not that Clean Code is any great authority (but it is popular!):
> [Wrapping] third-party APIs is a best practice. When you wrap a third-party API, you minimize your dependencies upon it: You can choose to move to a different library in the future without much penalty. Wrapping also makes it easier to mock out third-party calls when you are testing your own code.
> One final advantage of wrapping is that you aren’t tied to a particular vendor’s API design choices. You can define an API that you feel comfortable with.