ChapterÂ 55.Â Make Interfaces Easy to Use Correctly and Hard to Use Incorrectly
ONE OF THE MOST COMMON TASKS in software development is interface specification. Interfaces occur at the highest level of abstraction (user interfaces), at the lowest (function interfaces), and at levels in between (class interfaces, library interfaces, etc.). Regardless of whether you work with end users to specify how theyâll interact with a system, collaborate with developers to specify an API, or declare functions private to a class, interface design is an important part of your job. If you do it well, your interfaces will be a pleasure to use and will boost othersâ productivity. If you do it poorly, your interfaces will be a source of frustration and errors.
Good interfaces are:
Easy to use correctly
People using a well-designed interface almost always use the interface correctly, because thatâs the path of least resistance. In a GUI, they almost always click on the right icon, button, or menu entry, because itâs the obvious and easy thing to do. In an API, they almost always pass the correct parameters with the correct values, because thatâs whatâs most natural. With interfaces that are easy to use correctly, things just work.
Hard to use incorrectly
Good interfaces anticipate mistakes people might make, and make them difficultâideally, impossibleâto commit. A GUI might disable ...