Changes for page Tips and Tricks

Last modified by chrisby on 2024/04/01 13:11

From version 1.13
edited by chrisby
on 2023/05/29 17:00
Change comment: There is no comment for this version
To version 1.14
edited by chrisby
on 2023/05/29 17:03
Change comment: There is no comment for this version

Summary

Details

Page properties
Content
... ... @@ -56,3 +56,4 @@
56 56  * **Range-Based Assertions**: Inaccurate results should never be asserted against an exact value, but only within an expected range of approximation. This includes all floating-point numbers, which are always imprecise.
57 57  * **Focus on Own Code**: Don't exclusively test third-party code, such as other services or libraries. It's not your job, and it's probably a duplication of effort. Only test if it works correctly with your own code.
58 58  * **Avoid Cascading Validation**: It would be very cumbersome to perform input validations, such as the famous null checks, and corresponding tests for each unit. A common solution is to define a module consisting of several classes. The class at the top, which receives the input for the first time, validates it once. All subsequent classes can safely assume that the input is not null when processing it, and no longer need to explicitly check or write tests for such cases.
59 +* **Stick to Performance Requirements**: Once a performance test is passed, there is no need to optimize the performance of the code. Any effort in that direction is a waste of resources.