This week's book giveaway is in the OO, Patterns, UML and Refactoring forum. We're giving away four copies of Refactoring for Software Design Smells: Managing Technical Debt and have Girish Suryanarayana, Ganesh Samarthyam & Tushar Sharma on-line! See this thread for details.
Oracle announced today that they are adding several new operators to the Java language.
One of the more interesting is the "approximator" operator, designed for specifying an estimated range. The syntax has two forms:
a(+-)b, which reads "a plus or minus b"
a(+-)b%, which reads "a plus or minus b percent"
These instantiate a new instance of javax.af.Range (another addition to the API), which has conveniently overridden toString. For example...
The output (under Java 8.0.1 Beta) is...
Range: (93, 107)
Range: (88, 112)
But even more fundamental is this change to the language...
Due to continuing confusion regarding postfix operators, an explicit operator cast will be required in Java 8 to force traditional postfix behavior. In the absence of such a cast, the postfix operator will default to prefix operator behavior.
This will break a lot of existing code, but the benefits are obvious.
Edit: Corrected minor inaccuracy.
"We're kind of on the level of crossword puzzle writers... And no one ever goes to them and gives them an award." ~Joe Strummer sscce.org
Even more exciting for those of us in the UI space is the addition of the AdmonishUser interface to the java.util library.
Methods is this interface are intended to alert the user when some action has been taken that should be dissuaded; for example, repeatedly performing the same action and expecting something different to happen.
The actual implementation of these methods are implementor-defined, but most implementors seem to favor an electric arc across the keyboard. For mobile environments, the release of curare gas has been discussed.
The proposed Javadoc for this interface goes to pains to point out that use of the interface does not indemnify the developer against wrongful death lawsuits.
The interface will also be available in the Applet environment for use on the web, and likely built into modern browsers as a new CSS property.
Bear Bibeault wrote:...most implementors seem to favor an electric arc across the keyboard...
The theory is that programmers who repeatedly perform the same action expecting a different result have already demonstrated a predisposition to enjoying electric shock. Therefore, the shock should reinforce such behavior, putting them in an infinite loop of performing the same (incorrect) action, thus effectively removing them from the programming pool.
Bear Bibeault wrote:Even more exciting for those of us in the UI space is the addition of the AdmonishUser interface to the java.util library.
Test-driven development (TDD) is being revised to Red-Green-Admonish User. (The Green step is optional.) Quite a few pioneering developers adopted this methodology years ago. I know because I use their software all the time.
Another addition to Java 8 is the method System.crashForNoReason(), which has been available in all Microsoft stacks since the very first version of Windows.
Bear Bibeault wrote:I would totally buy that T-shirt!
...at least for the diversion of filling out their order form.
Joined: Sep 12, 2008
where one gets to see the t-shirts?
Joined: Mar 05, 2008
Saurabh Pillai wrote:where one gets to see the t-shirts?
At the bottom of the Angry Nerds page. There's just one shirt, and we can't see it very clearly. But like Bear, I would definitely be willing to buy a shirt. And a "bugs nerd" plushie. And maybe even a "front end nerd" plushie - for Bear.
I suspect that if we never see the shirt and plushies actually for sale (for real), it would be because Atlassian does not want to risk a trademark infringement lawsuit from the makers of Angry Birds. But still, it could happen. Angry Birds could just laugh and see it as free advertising for their product, sort of. And Think Geek has many products that started as April Fools gags, that later became real products.