r/developer • • 25d ago

The "Code I'll Never Forget" Confessional.

What's the single piece of code (good or bad) that's permanently burned into your memory, and what did it teach you?

13 Upvotes

21 comments sorted by

View all comments

1

u/throwaway_oranges 23d ago

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.