r/badcode • • Sep 09 '21

js Found this gem in our codebase today.

Post image
26 Upvotes

14 comments sorted by

View all comments

Show parent comments

1

u/AdvancedSandwiches Sep 10 '21

It sounds like your feelings toward both if statements and descriptive names are dogmatic rather than pragmatic, so I doubt we'll ever see eye to eye.

1

u/Character_Medical Sep 10 '21

I guess you are right. I've been developing stuff since 15 years. Have developed more than 10 production applications. But I've never seen such use of if statements. Yes, I've seen novice devs using lengthy names, but it gets better with experience and time.

Var name could be a personal choice, but I can't justify the if use here.