Well I told a lie about posting every week, but hey I was enjoying the sunshine in the antipodean lands (Australia and NZ)! So from here on in I'll try to keep my original promise and write _something_ every week and so here we are! Warning this post is heavily aimed at the Java world, those who prefer a non technical read had best leave now :-).
So a colleague and I were tracking down a problem late last night and were looking at a particular line of code that wasn't executing in the order that the original author intended:
* of Precedence rules in the JDK
* upon, but I'll forgive myself in this case.
* This probably should be a nice Unit test, many
* in any code base about the order of precedence
* when (x && (y || z)) gets executed
(this.conditionTwo() || this.conditionThree()))
So are we there yet? Well I guess for the code base I'm currently working on that would be a no, we've a few more of these cases to discover and iron out. Another musing that comes out of this is that perhaps "maintainability" is sometimes better than code brevity, maybe writing code in the style of if (x && (y || z)) can be simplified to it's component parts.
Sometimes it's the little things.