Cafe au Lait Java News and ResourcesI believe that when we Americans look deep into ourselves and ask us what we want our government--because it is our government: it is our agent to do what we want with our money just as the guy in Florida we hire to keep grandma's one bedroom condo in repair is our agent--to do, we conclude the following:
- We want to let the Bush tax cuts expire.
- We want to close the 75-year Social Security gap, half by raising the limit on earnings taxed by Social Security so that the upper middle class and the rich pay more for Social Security and half by reducing the rate of growth of benefits at retirement.
- We want to stop sending our soldiers--the best-trained and best-equipped high tech armed forces in the world--abroad to be military police in countries riven by sectarian conflict where they do not speak the language--and so return defense spending to its late-1990s share of GDP.
- We want to reduce but not eliminate the "excess" cost growth in Medicare and Medicaid: we believe our doctors, nurses, and druggists will learn how to do wonderful things over the next two generations, and we do not want those wonderful things in the way of medicine applied only to the rich but to the poor and old as well.
- Whether or not we decide to do (1) through (4) above, we want to raise taxes to cover whatever of the long-run fiscal gap remains, and so bring the federal budget back into balance over the long run.
Note that (5) is not optional. As the late Milton Friedman liked to put it: to spend is to tax. If the government buys things, it must get the money to buy them from somewhere. It can get the money from three places. It can tax. It can borrow--but then the borrowing has to be repaid with interest, and the more is borrowed the higher the interest and the worse the value the taxpayers ultimately get for their money when they are taxed to repay the borrowing. Or it can print the money and so inflate the currency--but that too is a tax, and an especially unfair, painful, and destructive one, as lots and lots of people victimized by inflation find their wealth doesn't buy what it used to and what they expected.
We can argue over whether (1) through (4) is what we want to do--that is what politics is about. But whatever we decide to do with (1) through (4), (5) is not optional--not, that is, if we want to continue to have a rich country in the long run. And the politicians who have told you that (5) is optional from Ronald Reagan to George H.W. Bush to Robert Dole to George W. Bush and now John McCain are not your friends, or America's friends.
--Brad Delong
Read the rest in Grasping Reality with Both Hands: The Semi
Subversion 1.5.2, an open source version control system designed to replace CVS, has been released.
This appears to be a bug fix release.
Permalink to Today's News | Recent News | Older News | E-mail Elliotte Rusty Harold
You can also see previous recommended reading or subscribe to the recommended reading RSS feed if you like.
To recommend something for inclusion in this section, please e-mail the URL and title of the article.
Google has released GWT 1.5, an open source Java-to-JavaScript compiler and library for building AJAX applications in Java. The major new feature in 1.5 is support for Java 5, including generics, enums, annotations, and the enhanced for loop.
The Apache Commons Group has released Commons BeanUtils 1.8.0. This provides some easier-to-use wrappers around Java's built-in Reflection and Introspection APIs. "BeanUtils 1.8.0 is binary compatible with version 1.7.0 and contains a number of bug fixes and enhancements." In particular:
BeanUtils is publishedunder the Apache License 2.0.
The Gnu Project has released version 4.3.2 of GCC, the GNU Compiler Collection. GCC contains frontends for C, C++, Objective C, Fortran, Ada, and Java as well as libraries for these languages. GCC's Java is a clean room implementation that doesn't use any Sun code, so it doesn't always exactly match Sun release versions, but this is roughly at the Java 1.5 level with some omissions. Accoprding to Joseph S. Myers, "GCC 4.3.2 is a bug-fix release, containing fixes for regressions in GCC 4.3.1 relative to previous GCC releases. "
Bare Bones Software has released version 9.0 of BBEdit, my preferred text editor on the Mac, and what I'm using to type these very words.
Some of the many new features in this release include:
There is a new command on the Window menu: Show Scratchpad
The Scratchpad window’s purpose is to be a space where you can manipulate text by performing transforms, manual edits, or batches of copy/paste.
It is ideal for quickly beating text from one source into submission before pasting it elsewhere.
The Scratchpad window automatically saves its content and state, eliminating those pesky “Save Untitled 237?” warnings when closing a window, or quitting BBEdit.
The Scratchpad is also available from BBEdit’s dock menu.
Finally, there is a new item on BBEdit’s Services menu: Append Selection to Scratchpad. This command will take the selected text, and place it at the end of the scratchpad, attempting to preserve any selection that was previously present. The Scratchpad window does NOT need to be open to use this command. Any text appended in this fashion will be present the next time the window is opened.
Text completion. This is incredibly annoying, and I think I'll have to turn it off. If I don't want pop-ups in my web browser, why would I want them in my text editor? I may be right in the bottom of the trough for this feature: too fast a typist to need it, and too slow a typist to finish my thought before the pop-up appears. What's really weird about this one is it isn't doing simple code completion like most IDEs. It's actually trying to complete ordinary words as I type this very text.
Furthermore, when faced with the word don't, the autocomplete looks for completions that begin with the letter "t": table, take, taking, etc. That makes no sense at all.
The pop-up even stays open when there's no possible completion.
I try to ignore the popups and look at my keyboard like the bad two-finger typist I am. However even then I occasionally find an arrow key or the return key, navigating through the pop-up instead of the text. Worse yet, if a pop-up is open and I click the mouse to reposition the insertion point somewhere outside of it, the pop-up goes away but the insertion point doesn't get repositioned. I end upm typing at the old location instead of the new.
Enough is enough. I'm turning this misfeature off now. I think this is an experimental feature that got out the door way before it was ready.
Barebones fixed at least one of the annoying bugs I reported in the HTML tools with 8.7. However the paragraph tool still pops up an annoying modal dialog, and the acronym and abbreviation tools don't. This really needs to be corrected.
Upgrades cost $30. New copies cost $125. If you bought 8.7 this year, upgrades are free.
Mac OS X 10.4 or later is required.
Ben Gardner has posted Uncrustify 0.49, an open source, command line beautifier for C, C++, C#, D, Java, and Pawn (whatever that is). Uncrustify is published under the GPL.
Michael Fuchs has released DocBook Doclet 5.0.1, a doclet that creates DocBook SGML and XML documents from JavaDoc. Version 5.01 fixes some bugs.
John Dickson has released JCR 0.6.4 a "web application for performing and managing formal code reviews. It can be used for reviews of any type of source code, although it has some special smarts for reviewing Java projects."
My day job is pretty thoroughly committed to code reviews these days. Overall, I'd say it's a net positive. Though the review process does tend to slow down the development process somewhat, and block coding more than I'm comfortable with when the reviewers don't respond quickly, the reviews do catch a lot of serious bugs and issues in advance of check-in.
Michael Fuchs has released DocBook Doclet 5.0, a doclet that creates DocBook SGML and XML documents from JavaDoc. Version 5.0 upgrades to DocBook 5.0 and docbook-xsl 1.74.
Laurent Cohen has released the Java Parallel Processing Framework (JPPF) 1.4, an open source Grid Computing platform written in Java. "The client has to split up the calculations into pieces that are executed in a single server node, and pass them to the JPPF framework. The atomic portions that are executed in a JPPF node are called tasks. It is up to the client application to define a reasonable part of the complete algorithm as a task. Small tasks may cause a high transport overhead, while large tasks may cause poor parallelism in execution." Java 5 or later is required.
Overall it looks interesting and cleaner than I expected. I don't think this is all the way to Hadoop and map-reduce though. I see one major flaw in the design: it relies on Java object serialization to pass arguments back and forth over the network. That's pretty much always a mistake for multiple reasons. Objects can't be serialized. (Not just in Java either. This is a general characteristic of objects.) Absent executing code, there simply is no such thing as an object. The sooner we start realizing that the object metaphor fails across networks the better. I 'm not saying you can't submit tasks to remote servers. I'm just saying you can't do it by sending an object across the network. There are no objects on the wire, only bytes.
Kevin Bourillon and Jared Levy have posted version 0.8 of the Google Collections library, which extends the standard JDK collections classes with:
- BiMap. A Map that guarantees unique values, and supports an inverse view.
- Multiset. A Collection that may contain duplicate values like a List, yet has order-independent equality like a Set. Often used to represent a histogram.
- Multimap. Similar to Map, but may contain duplicate keys. Has subtypes SetMultimap and ListMultimap providing more specific behavior.
There are also more than a dozen collection implementations, mostly of the interfaces above, but not all. ReferenceMap, for example, is a ConcurrentMap implementation which easily handles any combination of strong, soft or weak keys with strong, soft or weak values.
Static utility classes include:
- Comparators. Natural order, compound, null-friendly, ad-hoc . . .
- Iterators and Iterables. Element-based equality, cycle, concat, partition, filter with predicate, transform with function . . .
- Lists, Sets and Maps. A plethora of convenient factory methods and much more.
- PrimitiveArrays: "boxing"/"unboxing" of primitive arrays
And there's more:
- Forwarding collections
- Constrained collections
- Implementation helpers like AbstractIterator
Changes in this release include:
Added classes
- Collections2: Provides static methods for working with Collection instances
- ImmutableBiMap: An immutable BiMap with reliable user-specified iteration order
- ImmutableMultimap: An immutable ListMultimap with reliable user-specified key and value iteration order
- ImmutableMultiset: An immutable hash-based multiset
- Serialization: Provides static method for serializing collection classes
- UnmodifiableIterator: An iterator that does not support remove()
New functionality
- Added Join methods taking a Map parameter
- Added Comparators.toStringOrder()
- Added Constraints.notNull()
- Added HashMultiset.create() methods
- Added ImmutableList.of() methods taking 2-5 parameters and ImmutableList.copyOf(Iterator)
- Added ImmutableSet.copyOf(Iterator)
- ImmutableSortedSet now extends ImmutableSet
- Added ImmutableSortedSet.orderedBy() and reverseOrder()
- Added contains(), containsNull(), removeAll() and retainAll() methods to Iterables and Iterators
- Added Sets.filter()
- Widespread Javadoc improvements
- Explicit serialized forms for most collection classes
- To support more serialization options, Forwarding classes now have an abstract delegate() method, have a no-argument constructor, and don't implement Serializable
- Moved static ForwardingCollection methods to Iterables
Removed code
- Removed Functions.TRIM_STRING and trimString()
- Removed Objects method deepEquals(), deepHashCode(), deepToString(), and nonNull()
- Removed classes ImmutableBiMapBuilder, ImmutableMultimapBuilder, and LinkedListMultimap
- Removed interface SerializableComparator
- Removed constructor ConcurrentMultiset(ConcurrentMap)
- Removed constructors EnumBiMap(EnumBiMap) and EnumHashBiMap(EnumHashBiMap),
- Removed constructors HashMultiset(int) and HashMultiset(Iterable),
- Removed Maps methods immutableBiMap(), newBiMap(), sortedKeySet(), uniqueIndex(Collection, Function), and uniqueIndex(Iterator, Function)
- Removed Multimaps.immutableMultimap() methods
- Removed Multisets methods emptyMultiset() and immutableMultiset()
Java 5 or later is required.
Sun has posted the proposed final draft of JSR-290, Java Language & XML User Interface Markup Integration to the Java Community Process (JCP). According to the draft,
The scope of this JSR is to enable the creation of Java ME applications which combine the ease of authoring and graphical richness of Web UI technologies (such as XHTML Basic and SVG Tiny) with the power, flexibility, and breadth of the Java ME platform. The APIs and conventions defined by this JSR will provide for three styles of Java and XML UI markup integration:
- cross-referencing between markup and Java ME code
- embedding a Java ME component within markup (e.g. a browser page)
- embedding UI markup data witin a Java ME application
This specification provides a binding to the Compound Document Format [CDF] markups such as Web Interaction Compound Document [WICD] [Mobile 1.0]. It defines an API to load, manipulate, interact and render XML markups for user interfaces. It follows models of DOM API definitions used by [JSR-226]/[JSR-287] and [JSR-280].
The Expert Group has collaborated with the W3C CDF Working Group.
Caoyuan Deng has posted a beta of Scala support for NetBeans 6.5.
JetBrains has released IntelliJ IDEA 7.0.4. This is mostly a bug fix release, though they're also a few small new features. IDEA is $499 payware. Upgrades from pre-7.0 versions are $299.
Sun has open sourced the Lightweight UI Toolkit (LWUIT) under the GPL. LWUIT is a GUI library for Java Micro Edition and requires CLDC1.1 MIDP2.0/CDC PBP/SE. It includes "visual components and other UI goodies such as theming, transitions, animation and more."
Teodor Danciu has released JasperReports 3.0.1, an open source (LGPL) Java library for generating reports from XML templates and customizable data sources (including JDBC). The output can be displayed on the screen, printed, or written to XML or PDF files. This release adds Gantt charts and improves the Swing report viewer component exporter filtering.
Jetbrains has posted milestone 1 of IntelliJ IDEA 8.0 (Diana). New features in 8.0 include:
After my last couple of less-than-complimentary mentions of IDEA, the friendly folks over in St. Petersburg asked me to elaborate on just what I found lacking, and why I preferred Eclipse. Here's my somewhat edited response.
I use IDEA on Linux almost exclusively, and this is not about IDEA being Mac native. There are usability bugs in this product that transcend platforms. The keyboard shortcuts are actually a bad example, because there's no fundamental reason they have to be what they are. 25 years ago the industry could have settled on different shortcuts than they did, and different platforms could have made different choices. However there is now a pretty consistent set, and one deviates from it at one's peril. Sadly IDDEA so deviates.
To fix this, start by making Ctrl-W to close a window, not Ctrl-F4; and then add Ctrl-G to Find Again and Ctrl-L to Go to Line. (Command-W, Command-G, and Command-L on the Mac of course.) I suspect there are others that need to be fixed too.
Yes, this means you're going to have to break the non-standard, incorrect bindings IDEA's already been using for Ctrl-G (and possibly the other two) for years now.
There are much more critical and harder to fix problems in IDEA's design than this. However the keyboard shortcuts are so easy to get right, that correct keyboard shortcuts are a very good proxy for whether a product has paid any attention to usability whatsoever.
Regarding method level navigation within a class, I'll check out the toolbar button you suggest, but why would there even be a toolbar button or a preference for this? That's needless clutter. Just turn the damn thing on by default and ditch the button.
In general toolbars contain opaque, meaningless icons. Neither Idea nor Eclipse is an exception here. There are some well-done toolbars (a few buttons in web browsers, most paint programs) but IDE operations don't lend themselves to visual representations. What could possibly be an icon for "Compare with latest in repository" for example? or even "Compile"? Well-named menu items are the way to go.
In any case, I did try it, and while useful you method-level navigation is simply not as good as what Eclipse has. The IntelliJ version is an extra pane with yet another confusing toolbar. In Eclipse, I just click on the little triangle next to the class name and all the members drop down. It's like browsing another folder in Windows Explorer. It's a standard metaphor, and very intuitive and easy to use. I can have several classes open at once if it helps me. The IntelliJ version just isn't as fluid I'm afraid.
You also asked me to name specific instances where Eclipse's refactoring, code completion, editing and browsing facilities are surpass those of IntelliJ IDEA. That the Context menu in Eclipse does not require me to remember Ctrl-B to jump to a declaration is the most obvious. Also Eclipse's context menu is more predictable. IntelliJ's seems to add and remove menu items so no one item stays where I expect to find it.
The References and Declarations context submenus in Eclipse are a major help. There's probably a way to do this in Idea but I've never found it. In general, the context and menubar menus in Eclipse just give me more of the options I need. Another example: adding a directory to the Build Path in Package Explorer.
The only really tricky point to explain is that Eclipse doesn't keep popping up suggestion boxes/tooltips that get in my way and keep me from editing. I'm not sure I can quite articulate the differences between IntelliJ tooltips and Eclipse's. It may have to do with the difference between Swing and SWT, but the fact is Eclipse's tooltips don't interfere with my workflow and IDEA's do. :-(
In general, focus seems to be a major problem in IDEA. When building a project. IDEA constantly steals focus from any other window I'm in (though that one might be our build plug-in's fault, not yours). However consider the Find text box. Half the time when I type in it I'm searching for a term and half the time I'm navigating through a list of previous search terms, and I have no idea which will happen when. There's probably rhyme or reason to it, but none that's apparent to me. If I try to use a keyboard shortcut to select a menu item while the focus is on the find box, it more than likely doesn't work at all.
Speaking of find, something I haven't mentioned is the Find and Replace dialog. I much prefer Eclipse or BBedit's, even when searching in a single file.
Thinking about it, IDEA's major problems really seem to come down to two issues:
- Focus problems
- Menu layouts and organization
(Code completion and refactoring aren't worse in IDEA than Eclipse, but they aren't better either. There is one minor problem in IDEA that Eclipse doesn't have with code completion: IDEA seems to double escape double quotes in my strings and insert extra double quotes where they aren't needed or wanted. I don't usually want double quotes auto-completed, and Idea doesn't seem able to match my expectations when pasting one string into another.) But otherwise code completion/refactoring is pretty much par between the two products.
With regard to menus, it's just never obvious where anything is nor are related items grouped together much of the time. For instance, I still couldn't tell you how to Open the Perforce console to move files between change lists in IDEA. I know I've done this, but I have to hunt for it every single time, and it's always a crap shoot. In Eclipse it's obvious: Window/Show View. In IntelliJ I have never found a context or other menu item to add a JavaDoc comment. In Eclipse, it's not obvious (the menu item is poorly named) but I did find it. There are lots of things like this that are probably somewhere in IDEA if I knew where to look, but the menus are too poorly organized for anyone to ever figure this out.
When someone is watching over my shoulder as I use IDEA, they're often asking, "How'd you do that?" because the only way to make things happen is obscure keyboard shortcuts like Ctrl-B that they usually didn't find themselves. When I'm watching someone else I have the same experience because they've found a few different obscure shortcuts than the ones I know. I never have that experience with Eclipse.
IDEA is like magic, and that's not a compliment. UI's should not hide how they're operated. Everything should be open and above board, not hidden by magic prestidigitation and misdirection. The more clear it is to an observer how the trick is done, the better. You shouldn't need years of practice in front of a mirror to use a code editor fluently. Lord knows Eclipse's UI is far from perfect, but I'm afraid IDEA's is much further from perfect.
If you became accustomed to IntelliJ some years ago when Eclipse was lacking, do yourself a favor and check out Eclipse for a week or two. Eclipse is certainly far from perfect, but I do think it has completely leap-frogged IDEA in general usability. If you last tried Eclipse back in the days of 2.0, or, worse yet, 1.0, I think you'll be pleasantly surprised at how far it's come.
NetBeans I don't have a strong opinion about; because, unlike Eclipse and IDEA, I've never really used it for a more than couple of hours at a shot. However I've spent months putting Eclipse and IDEA through their paces and for me the winner is clear. Eclipse is just a far more fluid and usable editor and development environment than IDEA.
IntelliJ could come back. Lord knows Eclipse didn't used to be this good, and NetBeans was unusable until quite recently, so it is possible for an IDE to improve. However to have a real chance, JetBrans is going to have to make a choice a lot of companies are afraid to make. They have to break with the old interface completely. They're going to have to reassign keyboard shortcuts by default, and reorganize menu items. Done right, a new interface could be so superior that there'd be only minor if any grumbling from the installed base. Done wrong, it can make matters much, much worse and even kill a product outright. However in the long term there is no choice. Eclipse and NetBeans are only going to keep getting better. Unless IntelliJ makes the hard choices, it's going the way of JBuilder and Visual Cafe.
jPOS 1.6.3 has been released.
jPOS is an "ISO-8583 library/framework that can be used to implement financial interchanges, protocol converters, payment gateways, credit card verification clients and servers (merchant/issuer/acquirer)."
An NYU class has commenced work
JavaGit, a Java API that provides access to git repositories by accessing the native Git binaries.
The current version is 0.10 alpha. javagit is published under the LGPL.
Oracle has released Berkeley DB 4.7. This is a non-relational, key-value database. "Berkeley DB Java Edition (JE) provides an easy method for object storage, query, and retrieval. That's now been added to Berkeley DB's Java/JNI API. The Direct Persistence Layer (DPL) adds a built-in Plain Old Java Object (POJO)-based persistent object model, which provides support for complex object models."
Sun has announced its results for the fourth quarter of its fiscal year (ended in June). They aren't great but they did turn a profit of $88 million/11 cents a share, in the quarter. This is down from $329 million/36 cents a share in the same quarter last year. Sales were $3.78 billion, down from $3.84 billion in the year ago quarter. Sun also announced a one billion dollar stock buyback program.
The Jakarta Apache Project has released
Tomcat 6.0.18,
an open source servlet container
and official reference implementation of
the Java Servlet API and Java Server Pages.
"This release includes many bugfixes over Apache Tomcat 6.0.16.
Apache Tomcat 6.0 includes new features over Apache Tomcat 5.5, including support for the new Servlet 2.5 and JSP 2.1 specifications, a refactored clustering implementation, advanced IO features, and improvements in memory usage."
Jetbrains has posted a beta of IntelliJ IDEA 8.0 (Diana). New features in 8.0 include:
I note that standard keyboard shortcuts are still missing from this list, as are method level navigation in the explorer, a context menu that doesn't require you to remember obscure shortcuts like Ctrl-B, and a pop-up blocker. (Well, OK, IDEA doesn't really need a pop-up blocker. It just needs to stop popping up focus-stealing warnings too fast even when you're on a different line.)
Also, "Due to a major internal refactoring, we have made a significant number of backward incompatible changes to the plugin API. Most of third-party plugins will not work unless they are updated for Diana."
Older News | Today's XML News on Cafe con Leche | Mokka mit Schlag | The Cafes