Bumper Sticker Software Design
Joshua Bloch has a good tech talk on How to Design a Good API and Why it Matters that he does from time to time in the conference circuit. He outline that talk with one liners, he calls them bumper sticker API design. Below are some of my favorite bumper sticker API design advice, if I had a wide enough car.
- All programmers are API designers.
- APIs can be among your greatest assets or liabilities.
- Public APIs, like diamonds, are forever.
- APIs should be easy to use and hard to misuse.
- APIs should be self-documenting.
- Example code should be exemplary.
- You can’t please everyone so aim to displease everyone equally.
- Expect API-design mistakes due to failures of imagination.
- API design is not a solitary activity.
- When in doubt, leave it out.
- Keep APIs free of implementations details.
- Minimize mutability.
- Minimize accessibility.
- Don’t make the client do anything the library could do.
- Obey the principle of least astonishment.
- Use consistent parameter ordering across methods.
Technorati Tags: effective java, software, design, api, bumper sticker, bloch