2 ms·
I have seen this so many times, it is not even funny anymore. Refactoring is fine. Abstraction is fine. But programmers fall to, at some point in time, some so
by manuelabeledo 5y ago
I have seen this so many times, it is not even funny anymore.
Refactoring is fine. Abstraction is fine. But programmers fall to, at some point in time, some sort of tunnel vision that drives us to use either tool to target the wrong thing.
At my current job, we have this tool to create query abstractions, a Spring Data of sorts if you will. It seems nice, and it naturally feels better than the alternative, which is allow the upper layers to issue queries themselves.
But it is wrong. All flexibility is gone. Our team is just not big enough to expand the functionalities of such library, so the queries it can handle are pretty basic. Also, there are at least five layers to go through in order to debug it, and the only thing it really does is converting objects into queries.
Of course, most API consumers have to bypass the library. It is just not flexible or powerful enough.
Moral of the story is, to accomplish a big refactor, having a clear, global vision of the long term benefits and shortcomings, is essential. Refactoring just for the sake of making something look good, is not worth the time.