A well-designed visual interface has lots of the same features as a well-designed programming interface. Just like an API, a visual interface is designed to serve the user. They both strive to provide the user with the simplest solution that solves their problem. They both benefit from frequent refactoring to clean up debt. They're both made by combining many smaller components that do a single thing well into a larger product.
Lots of interface designers already think about their interfaces like programmers think about APIs, they just might not realize it. If you remember only one thing, remember that "interface design" principles aren't limited to visual interfaces.