|
|
|
|
|
by mristin
1837 days ago
|
|
In my anecdotal experience, it takes very little time for juniors to pick up adding contracts to their code. You need to grasp implication, equivalence, exclusive or, and get used to declarative code, but then it's easy. (I often compare it to SQL.) I find contracts personally super useful as I can express a lot of relationships in the code trivially and have them automatically verified. For example, when this input is None, then that output needs to be positive. Or if you dele the item it should not exist in this and that registry, and some related other items should also not exist any more. My email is in the commits of the repository, feel free to contact me and we can have a chat if you are interested in a larger picture and more details. |
|
I tend to limit myself to simple contracts and do table tests for the complex cases to reap the benefits of the both approaches.