2 ms·
I would also add: * For critical code, enable as many compiler warnings as you can while remaining sane. This would definitely include unreachable code warning
by ZoFreX 13y ago
I would also add:
* For critical code, enable as many compiler warnings as you can while remaining sane. This would definitely include unreachable code warnings.
* Consider using static analysis
* Initialise your error variable in the "error" state not in the "everything is ok" state
- drone 13y agoHere's one more to add: * Stop copying and pasting the same code over and over. If you do a complex series of operations several times, encapsulate them in a function/method.
- EvanAnderson 13y agoI came here to make your third point. I feel strongly that code should be written to "fail safe"-- error state should be assumed until calls return otherwise, etc.