←back to thread

449 points lemper | 1 comments | | HN request time: 0.238s | source
Show context
mdavid626 ◴[] No.45037164[source]
Some sanity checks are always a good idea before running such destructive action (IF beam_strength > REASONABLY_HIGH_NUMBER THEN error). Of course the UI bug is hard to catch, but the sanity check would have prevented this completely and the machine would just end up in an error, rather than killing patients.
replies(1): >>45037182 #
b_e_n_t_o_n ◴[] No.45037182[source]
invariants are so useful to enforce even for toy projects. they should never be triggered outside of dev, but if they do sometimes it's better to just let it crash.
replies(1): >>45037264 #
bzzzt ◴[] No.45037264[source]
Making sure the beam is off before crashing would be better though.
replies(1): >>45048664 #
1. b_e_n_t_o_n ◴[] No.45048664[source]
For sure :P