-
Notifications
You must be signed in to change notification settings - Fork 4
Design Philosophy
Cameron Lonsdale edited this page Nov 23, 2017
·
1 revision
-
Errors related to 3rd party dependencies MUST be handled within the library. They can either be handled or a custom error is returned
-
Other errors, ie. to do with invalid user input can largely be caught through duck typing. If there is a case where checking / try catching is acceptable then sure. Otherwise just do and ask for forgiveness. Duck typed errors within a function do not need to be documented explicitly. As long as the types of arguments and such are clear, then it should be understandable to a user how to properly use a piece of the library. These kind of errors do not need unit tests.
- Modules should keep the data as agnostic as possible unless they need it in a specific format for processing. If fitness functions need the data in a specific format they should adjust the data to match