# Focus On Being Precise

DevFeed: [Focus On Being Precise](<https://devfeed.tech/articles/focus-on-being-precise-22132.md>)

Original publisher: [Read original article](<https://www.ardanlabs.com/blog/2018/02/focus-on-being-precise.html>)

Published: 2018-02-20T00:00:00Z

Content type: opinion

Language: en

Sources: [William Kennedy](<https://devfeed.tech/sources/william-kennedy.md>)

Topics: [Code](<https://devfeed.tech/topics/code.md>), [Refactoring](<https://devfeed.tech/topics/refactoring.md>), [API](<https://devfeed.tech/topics/api.md>)

Tags: [abstraction](<https://devfeed.tech/tags/abstraction.md>), [api](<https://devfeed.tech/tags/api.md>), [ardan-labs](<https://devfeed.tech/tags/ardan-labs.md>), [blog](<https://devfeed.tech/tags/blog.md>), [code](<https://devfeed.tech/tags/code.md>), [debugging](<https://devfeed.tech/tags/debugging.md>), [go](<https://devfeed.tech/tags/go.md>), [go-programming](<https://devfeed.tech/tags/go-programming.md>), [golang](<https://devfeed.tech/tags/golang.md>), [legacy-code](<https://devfeed.tech/tags/legacy-code.md>), [programming](<https://devfeed.tech/tags/programming.md>), [refactor](<https://devfeed.tech/tags/refactor.md>), [refactoring](<https://devfeed.tech/tags/refactoring.md>), [testing](<https://devfeed.tech/tags/testing.md>)

## AI overview

The article argues that private codebases should favor precise, clear, and efficient functions over generalized APIs and excessive abstraction. It presents refactoring and, when necessary, breaking APIs as ways to avoid legacy code, misuse, fraud, bugs, and less accurate testing and debugging.

## Source excerpt

Introduction I was guided for many years to write functions that are generalized and to create layers upon layers of abstraction so things don't break as business requirements change. That the cost of breaking a function signature, for example, is expensive and something that should be avoided. Therefore, write functions that take more generic parameters or hide things in a receiver or context to be less prone to breakage. On the surface this seems like a good and reasonable idea. However, I have come to believe that this practice leads to engineering problems that I consider to be much worse than the supposed benefit. For private code bases, which is the majority of the code I work on, breaking an API should be encouraged if it will make the code base better. It's better to refactor and keep the code base clear than to head down a path of legacy code.