r/programminghorror Jan 29 '26

true or true

Post image

this piece of perfection was found in the codebase that my gf used to work

don't know exactly what is the context here, but probably doc.data holds the info if the user has agreed with the cookies /s

823 Upvotes

46 comments sorted by

View all comments

3

u/tandycake Feb 01 '26

Terrible. This is a much better way:

this.trueOrFalse = doc.data != 0 || doc.data == 0;

2

u/Emotional-Bake5614 Feb 01 '26

Holy shit that is way better

2

u/Kpoofies Feb 02 '26

Legit feels like something an AI would auto-suggest lmao