Yossi Moalem :: Easy to use, hard to misuse: Practical guidelines to tame your API
Presented at Core C 2023 conference.
The second most quoted statement in program development is “make your API easy to use correctly, hard to use incorrectly”. But what does this really mean? Most examples that explain this are very basic and deal more with readability of the code than with actual protection against misuse or incorrect usage.
We want our API’s to be simple and generic. We want to allow for a wide variety of operations to be done simply. But we also want it to be used correctly and to protect against mistakes. Unfortunately, as we will see in this talk, these two goals can conflict with each other.
In this talk I will demonstrate some design and implementation decisions I encountered in real life code. We will discuss different considerations we need to take into account when designing our API and see how we can make the code guide you towards using it correctly.
-----
Yossi is a SrPrincipal Software Dev Engineer at Fortinet. He has over 15 years of experience as a professional programmer, mainly in C/C . Yossi considers the standard as light reading and spends all his spare time learning new technologies and methodologies (much to the delight of his wife!!). He likes teaching and sharing his knowledge, but what really does it for him is refactoring legacy code into beautifully crafted code. On the positive side, he loves Led Zeppelin.
1 view
145
42
11 months ago 00:33:20 1
Yossi Moalem :: Easy to use, hard to misuse: Practical guidelines to tame your API