r/developer • • Oct 02 '26

The "Code I'll Never Forget" Confessional.

15 Upvotes

21 comments sorted by

View all comments

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.