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.
IMO that is what unit tests are for, to help developers refactor code with confidence.
Another factor is the lack of or a poor (possibly toxic) peer review process and lack of/poor coding standards/conventions that lets poor code enter and persist in the code base.
The continual pressure to deliver features at the cost of addressing increasing technical debt (because is does not deliver value to the end-user).
In short, the degradation of sound Software Engineering principles.
Learn something new every day.
- I am a senior software engineer working in industry, teaching and writing on software design, SOLID principles, DDD and TDD.
Location
Buenos Aires
Education
Computer Science Degree at Universidad de Buenos Aires
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.
Learn something new every day.
- I am a senior software engineer working in industry, teaching and writing on software design, SOLID principles, DDD and TDD.
Location
Buenos Aires
Education
Computer Science Degree at Universidad de Buenos Aires
Helping individuals and teams improve their software development practices.
Introducing testing, test automation, CI, CD, pair programming. That neighborhood.
Learn something new every day.
- I am a senior software engineer working in industry, teaching and writing on software design, SOLID principles, DDD and TDD.
Location
Buenos Aires
Education
Computer Science Degree at Universidad de Buenos Aires
Helping individuals and teams improve their software development practices.
Introducing testing, test automation, CI, CD, pair programming. That neighborhood.
Learn something new every day.
- I am a senior software engineer working in industry, teaching and writing on software design, SOLID principles, DDD and TDD.
Location
Buenos Aires
Education
Computer Science Degree at Universidad de Buenos Aires
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.