|
|
|
|
|
by EvanAnderson
1687 days ago
|
|
Also: Let API calls fail and return errors instead of trying to "predict" errors and be "helpful" to the user. You don't know how people are going to use the software you've written in the future. Example: Old software that can't handle larger-than-expected disk free space. There are AppCompat shims in Windows for lying to applications re: free disk space quantity because some old applications stored the result of disk free queries in 32-bit integers. Who would ever have more than 4GB of free disk?!? The integer overflows that result invariably cause unexpected behavior. Just make the API call to write to the disk. If that returns "disk full" let the user know. Don't "check" first. |
|