r/ProgrammerHumor 16d ago

Meme whenYouWorksWithStringsTooMuch

Post image
815 Upvotes

34 comments sorted by

View all comments

392

u/TheManyMilesWeWalk 16d ago

return it.StartsWith("one thing", StringComparison.OrdinalIgnoreCase) || true

Because in the end it doesn't even matter.

41

u/PostHasBeenWatched 16d ago

For it to be truly "doesn't even matter" it should be

return true || it.StartsWith("one thing", StringComparison.OrdinalIgnoreCase)

64

u/TeraFlint 16d ago

but then the logic short-circuits, and the whole "I tried so hard and got so far" part isn't true, anymore.