"Puzzling" features considered harmful?
It may be a first: a puzzler on a feature that hasn't even been approved for inclusion in the Java language yet. Of course, it helps that the source of this puzzler is Neal Gafter, co-author of both Java Puzzlers and the so-called BGGA Closures proposal, Gafter being one of the two "G"s (James Gosling is the other).
In Closures Puzzler: Neapolitan Ice Cream, he writes,
This puzzle explores the question of whether people experiencing
the same thing through different senses are really experiencing
the same thing at all. What is the program's output, and why?
This puzzle uses Java
Closures, so if you want to try it you should download the
prototype href="http://www.javac.info/closures.tar.gz">here. You can
download the puzzle sources href="http://www.javac.info/Neapolitan.java">here.
Without getting too deeply into the specifics of the puzzler and why it involves
enums, there very idea that closures are already fertile ground for puzzlers, i.e., non-intuitive behavior, strikes some as a code smell (a phenomenon that Neal makes an oblique reference to earlier in his blog). Kirill Grouchnikov confronts this issue head-on in his blog, And so it begins - the first closures puzzler.
Saying that the kinds of weird side-effects and unintuitive overloads typified by the book's various puzzlers are atypical of the real-world Java code he works with, Kirill goes for the money quote:
I would even go as far as to say that a feature implemented in a way that results in at least one puzzler is not a feature worth having in the language.
Check out the comments on the blog for the debate between Neal and Kirill. I imagine that for every programmer who thinks Kirill's dismissing closures and their necessary details too quickly, someone else is probably saying "why weren't we thinking this way before the generics fiasco?"
Debate ahoy. Enjoy.
Also in Java Today,
Geertjan Wielenga continues a NetBeans tutorial series on JavaLobby with the brief tutorial, How to Add Resize Functionality to Visual Applications in Java? Picking up from a previous article that showed how to use the
IconNodeWidget class, he shows how to create resize borders that activate when hovered over, and which can be used to resize the icons, including their respective images.
Eduardo Pelegri-Llopart notes GlassFish and NetBeans support for Grails 1.0 in an entry on The Aquarium: "Good news for
Grails 1.0 is
and its adoption seems to be increasing:
is already in the list of
Grails Supported Platforms,
and others are going to continue to improve on that.
On the tools side,
report on early Grails support
NetBeans 6.1 M1
(but some growing pains still)
and we had already reported on
Grails and Hudson."
BillyÂ Newport takes a look at
Characteristics of DataGrids in today's Weblogs. "This describes the various characteristics of DataGrids in terms of features and how they work. It should help people understand what this new technology does."
Happy Brithday Project Grizzly! Jean-FrancoisÂ Arcand writes,
"one year has passed since we started the Grizzly Project by its own...from zero, we have now a strong community of users, customers and an healthy Grizzly that doesn't seems to want to hibernate!"
Notice: The java.net download server, download.java.net, went down Monday morning 4 Feb. 2008. It has since been restored but some files are currently missing. Downloads from that server should not be considered current. The frong page message will be updated when full restoration is complete.
Today's Forums begin with a post from
rah003 on SwingX's
"We are about to prepare next release - 0.9.2 towards the end of February/ beginning of March so if there is anything that you would really like to see fixed, vote for it today. Or even better - provide a patch as an attachment to the issue. Just remember that for any contributions bigger then 20 lines you need to sign JCA/SCA so we can include those contributions in the code."
billgwould like to get the
Source for the effects demo.
"I didn't know if it was possible, but I'd love to see the source for the new effects demo: https://scenegraph-effects.dev.java.net/ . It's a great demo, and it would be useful to see the code behind it if possible."
How does WS-Reliability ensure messages are not lost in metro?
"Using WS-Reliability for a web service in NetBeans seems to just be a case of turning on a checkbox for the web service. But how is this actually handled by metro? How are SOAP messages over HTTP made reliable? I would expect that for a reliable solution, the client needs to know how to manage broken HTTP pipes / timeouts and redeliver any WS requests. If the HTTP response is not received by the client, how does the client know whether the message was actually received by the WS or not? One implementation could be for the web service to actually maintain state of these requests and save the results of duplicate requests for specific clients so that they are not replayed."
Current and upcoming Java
- FebruaryÂ 7 - Creating Grid-Based Data Infrastructures for the Enterprise - Cameron Purdy, Founder, Tangosol Â
- FebruaryÂ 21-23 - 2008 Groovy/Grails Experience
- FebruaryÂ 22 - Rapid and Reliable Disaster Recovery for Servers and Storage
- FebruaryÂ 23 - FOSDEM 2008 - Free Java developer room
- FebruaryÂ 29-MarchÂ 2 - Greater Wisconsin Software Symposium 2008
- MarchÂ 4-7 - Java Posse Roundup 08
- MarchÂ 7-9 - Gateway Software Symposium 2008
- MarchÂ 12-14 - JSFDays 2008
- MarchÂ 14-16 - Twin Cities Software Symposium 2008
- MarchÂ 26-28 - TheServerSide Java Symposium
Registered users can submit event listings for the
href="http://www.java.net/events">java.net Events Page using our
href="http://today.java.net/cs/user/create/e">events submission form.
All submissions go through an editorial review before being posted to the
Archives and Subscriptions: This blog is delivered weekdays as
Today RSS feed. Also, once this page is no longer featured as the
front page of java.net it will be
archived along with other past issues in the href="http://today.java.net/today/archive/">java.net Archive.
"Puzzling" features considered harmful?