Is it worthwhile to try to write foolproof data structures?
The problem We need to store data in a table-like way, but we have very strict space constraints (~1Mb per table of 10k+ rows). We store data like this: ID | reviews | factor | score | interval | etc. —+———+——–+——-+———-+—– 1 | 244 | 2.4 | 10 | 4268 | … in a simple […]
Differences between Design by Contract and Defensive Programming
Could Designing by Contract (DbC) be a way to program defensively?
Should I validate a method call’s return value even if I know that the method can’t return bad input?
I’m wondering if I should defend against a method call’s return value by validating that they meet my expectations even if I know that the method I’m calling will meet such expectations.
Should I validate a method call’s return value even if I know that the method can’t return bad input?
I’m wondering if I should defend against a method call’s return value by validating that they meet my expectations even if I know that the method I’m calling will meet such expectations.
Should I validate a method call’s return value even if I know that the method can’t return bad input?
I’m wondering if I should defend against a method call’s return value by validating that they meet my expectations even if I know that the method I’m calling will meet such expectations.