In a legacy code there was a direct comparison between a floating point number and exact zero ( to this point it's enough horror, but the second part is: ) in an object-oriented programming language to check if a field is initialized.
What did it teached me?
I've tried to convince the "senior" dev it's really not okay, but I failed. I learned that day I can't save everyone. I have no confidence, energy and power to do that.
1
u/throwaway_oranges Oct 04 '26
In a legacy code there was a direct comparison between a floating point number and exact zero ( to this point it's enough horror, but the second part is: ) in an object-oriented programming language to check if a field is initialized.
What did it teached me?
I've tried to convince the "senior" dev it's really not okay, but I failed. I learned that day I can't save everyone. I have no confidence, energy and power to do that.