Eugen is a user on mastodon.social. You can follow them or interact with them if you have an account anywhere in the fediverse. If you don't, you can sign up here.

@Gargron You are missing
if (Boolean.valueOf(condition))
if (Boolean.valueOf(condition) == true)

@hashRaygoza

Same here. The second one seems a lot more intuitive to anyone who isn't a programmer, but maybe that's just me 🤔

@hashRaygoza
That is to say, I always choose readable code over compact code, it makes sense!

@Gargron

I think the bottom one is the same as the slightly less awful:

if("true".equals(condition))

Which is still null safe.

@Gargron but what about yoda code?! 🤓

(I'm assuming this would be a levitating coffee mug)

@Gargron in a programming interview
1) not hired (too inexperienced)
2) still not hired
3) Promoted to tech director

@Gargron careful, you might spill your coffee if you do that too hard

@Gargron if (String.valueOf(condition).startsWith("t"))

@Gargron I cant believe I actually understand this meme oh my god
@thehottestpotato are you proud of me