4 ms·
I’d say interfaces are part of the problem. People are happy to change interfaces when it makes the implementation of a component easier. I’ve seen interfaces c
by vegetablepotpie 2y ago
I’d say interfaces are part of the problem. People are happy to change interfaces when it makes the implementation of a component easier. I’ve seen interfaces change without notice and this imposes maintenance overhead.
I’d say that complexity is the other part of the problem. As developers, we like to organize functionality into packages, and version them based on the type of changes we make. We like layers of abstraction to contain classes of problems to work on them independently. But all software is a list of instructions, and all the ways that they can interact cannot be categorized in a Symantec version number, or a unit test. Subtle changes can break functionality in surprising ways.
- eddd-ddde 2y agoAn interface that changes because of the implementation is not really an interface. I can change from ext2 to btrfs and my program won't die because open and read are a good interface.
- f1shy 2y agoIf 10% of people doing SW would understand this, the world would be much better.
- cpeterso 2y agoI fear good ol’ fashioned information hiding is being forgotten in modern software design. Systems are increasingly complicated and developers are busy just trying to get all their code to fit together to worry about the difference between an interface and encapsulation. https://en.m.wikipedia.org/wiki/Information_hiding https://en.m.wikipedia.org/wiki/Information_hiding
- oooyay 2y agoOne of my more favorite forms of testing is offline E2E testing. Python and Go are very adept at doing this kind of testing, which is nice. The idea is that you use exposed APIs (read: anything for consumption. Could be REST but also could be important packages) just as the user would use them. The nature of testing is that it captures the discreet contracts you're mentioning by reusing the API itself and ensures them. There's a discussion to be had that's the volume of E2E vs unit tests, but that isn't this discussion.