3 ms·
Code is very often ambiguous with respect to the coder's intent. I've seen plenty of bugs because the coder inadvertently used `=` instead of `==` (or `==` inst
by andrewfong 10y ago
Code is very often ambiguous with respect to the coder's intent. I've seen plenty of bugs because the coder inadvertently used `=` instead of `==` (or `==` instead of `===`) or left out parentheses in conditionals (`!w || x && y || z`).
The nice thing about code is that we can reveal bugs by executing the code and comparing the results with our expectations. Ideally, we do this with lots of testing. But even then, there's a hole in coverage and bugs make it into prod and cost someone lots of money. Which is basically what happened here.