> countless hours debugging
Did you forget to supply a radix to parseInt when calculating this?
It would be like the time I almost electrocuted myself. I could have claimed that electricity was broken but I’m just very stupid at times when I need to be very smart.
With some experience and/or foreknowledge of this behavior, you can avoid the shock, but the average person is going to assume the outlet works like any other electrical outlet and plug things in without thinking about the switch.
They'd still be correct to complain when this one outlet gives them a jolt from time to time.
And, in all likelihood, even people who know about the switch will absentmindedly get zapped occasionally.