Wednesday, April 10, 2019

Invest in good software abstractions to simplify difficult problems

But like many other aspects of code quality, building an abstraction for a problem comes with tradeoffs. Building a generalized solution takes more time than building one specific to a given problem. To break even, the time saved by the abstraction for future engineers needs to outweigh the time invested. That’s more likely to happen with software the team relies heavily on — such as logging or user authentication libraries — than with peripheral parts of the codebase, so focus more energy on making the core abstractions great.

Edmond Lau, "Manage Complexity through Abstraction", in The Effective Engineer: How to Leverage Your Efforts In Software Engineering to Make a Disproportionate and Meaningful Impact, 113.