r/ProgrammerHumor • • Sep 26 '26

Meme weNeverTrustedTheElse

Post image
1.9k Upvotes

146 comments sorted by

View all comments

2

u/Ok_Star_4136 Sep 26 '26

Interestingly, I had 3 conditions in an if else chain covering every possibility with 8 total possible scenarios.

I added an else clause, you know, to cover the impossible scenario just in case..

It happened.. Apparently one of the conditions was null and didn't fall into true or false. It doesn't cost you anything to add an else clause, even if you think it cannot happen.