News for hackers. Stuff that matters.
Re:Defensive Programming by uxp100 on Wednesday December 23, 2020 @01:01PM (#25520231)
I believe "offensive" programming is heavily used in automotive. If there is an issue with the connection to the camera, it is better to show nothing than corrupted and potentially misleading images. Better not to try to guess about uncertain throttle position.

Defensive programming can sometimes look like silently ignoring errors. A haphazard test of defensively written code (that, for example falls back to a different encryption scheme or io device) could pass incorrectly. But there is a place for defensive programming too. I think most important is being aware of which is which.

There are no comments on this comment yet.