The first thing we read after the if the condition is the IF
TL;DR: You have the important else condition on the else.
Problems
Rea...
For further actions, you may consider blocking this person and/or reporting abuse
Hi Maxi,
RANT WARNING
I see more of this type of code in reviews since the adoption of agile practices. I think this is down to a combination of factors:
Inexperienced developers changing pre-existing code and understandably fearful of introducing a bug by changing more than they need to in order to get the job done.
In short, the degradation of sound Software Engineering principles.
Rant accepted. we have more automated review tools than ever!
Whilst I agree linting tools and prettifies are very useful they cannot replace the human peer-review. Linters and prettifies cannot draw on personal experience (lessons learned) to advise and instruct junior team members.
One of the downsides of remote working, which I am finding is particularly prevalent in the software industry (in the UK), is the reduced team interaction that can result and the impact this has on bringing on junior team members. This is why I personally think peer-programming is more important than ever.
I like the post title for this one. Very creative.
Ok, I must ask: How were you able to invert the orientation of the title?
It is just "upside down text" :)
I wonder what do you say about languages that allow the condition to come after the statement?
and then what about
or
nice and intersting.
unless is pretty clear
the other sintax is new to me. which language is?
Both Perl and Raku
Python allows statements like this:
It is basically like the conditional ternary operator of Java, C, C++, but with condition in the middle.
nice and clear!
I've seen instances of this used with backwards if..else like:
So potential for same issues as normal if/else.