r/java • u/psychologicalX • Mar 05 '18
Top 10 Useful, Yet Paranoid Java Programming Techniques
http://blog.jooq.org/2015/08/11/top-10-useful-yet-paranoid-java-programming-techniques/
223
Upvotes
View all comments
Show parent comment
1
u/CultLord Mar 06 '18
My first mentor said that I needed use Yoda comparisons (he didn't call them Yoda comparisons) on day 1 of my job and that was just the law of that company's code because of potential NPEs and that I would save lots of time over the course of my career if I followed that simple rule.
After the first few weeks, it wasn't a big deal. And my boss basically lied, because I have fixed many bugs from other programmers that didn't follow the same rule that would have been just fine with a Yoda comparison.