One dot per line saves time
Today I want to introduce you to a simple rule that I apply when developing software. This rule often saves me a lot of time and it is simple to apply. I usually write code in Java and so the rule is made for Java programming in the first place, but it might also be adapted to other languages. I call that rule One dot per line The dot character in Java is primarly used for dereferencing. This also means that it can lead to NullPointerExceptions. The nature of NPEs is that they contain few context information. java.lang.NullPointerException at org.apache.commons.lang3.time.FastDateParser$TimeZoneStrategy.<init>(FastDateParser.java:869) at org.apache.commons.lang3.time.FastDateParser.getLocaleSpecificStrategy(FastDateParser.java:637) at org.apache.commons.lang3.time.FastDateParser.getStrategy(FastDateParser.java:606) at org.apache.commons.lang3.time.FastDateParser.access$100(FastDateParser.java:73) at org.apache.commons.lang3.time.FastDateParser$StrategyParser.letterPattern(FastDateParser.java:234) … This is primarily a… Read More »One dot per line saves time