Cup of cafe au lait Cafe au Lait Java News and Resources

Quote of the Day

it's like arguing that fairies are coming out of my toaster in the middle of the night. You can't prove to me that there aren't fairies in my toaster, but that doesn't mean you should take me seriously. What I have a problem with is not so much religion or god, but faith. When you say you believe something in your heart and therefore you can act on it, you have completely justified the 9/11 bombers. You have justified Charlie Manson. If it's true for you, why isn't it true for them? Why are you different? If you say "I believe there's an all-powerful force of love in the universe that connects us all, and I have no evidence of that but I believe it in my heart," then it's perfectly okay to believe in your heart that Sharon Tate deserves to die. It's perfectly okay to believe in your heart that you need to fly planes into buildings for Allah.

--Penn Jillette
Read the rest in Penn Jillette Is Willing to Be a Guest on Adolf Hitler's Talk Show | Little Gold Men | Vanity Fair

Today's News

Happy 20th Birthday Java! Next year I'll buy you a drink. InfoWorld has published some of my thoughts on the occasion, "Java at 20: How it changed programming forever".


Permalink to Today's News | Recent News | Older News | E-mail Elliotte Rusty Harold


Further Reading

On The Cafes:

On Mokka mit Schlag:



Currently on Cafe con Leche:

Recent News

Monday, November 15, 2010 (Permalink)

Several people have wondered what (if anything) is going on here. The short answer is that this site is on hiatus while I work on a new backend. The code used to drive this site is vintage 1995 (yes, it's been around that long) so it really doesn't meet the needs of a modern site.

When I was writing and teaching more or less fulltime, I could treat this site as part of that, and arguably it returned the time I invested, but that's no longer the case. It was becoming more and more obvious to me that there really hasn't been much of value here for a long time, both to me or to site readers; and that if Cafe au Lait was to become valuable again some serious rethinking and rework was needed. This site has always been a part time endeavor, and I did not feel I had the time to both continue updating it in its current state; and to work on improving it going forward. Nor did I think it was really worth pushing forward in its current state. Consequently early this year I made a deliberate decision to devote what time I had to writing a modern backend and putting updates aside while I did that.

Why write something new instead of adapt an existing modern backend such as WordPress? WordPress would have made sense if the site were valuable in and of itself, but the site really didn't seem to be. My thinking was (and still is) that the infrastructure holds more potential than the content. That potential may or may not be realized, but I am still reasonably convinced that the site in and of itself no longer justifies the time investment I'd have to put into it to keep it running in its current form.

Work on the new system is ongoing in fits and starts, but it may yet take some time before it's ready. The new site almost launched in very rough form a month ago, but hosting issues held that up. When it is ready, (if it is?) you'll hear it here first.

Wednesday, April 7, 2010 (Permalink)

IBM's developerWorks has published my latest article, "When you can't throw an exception". This article explores the different options for working with an insufficiently expansive throws clause. What do you do when you need to override or implement a method that doesn't declare an exception you need to throw? This is one of the thornier problems with checked exceptions, and far more often than not programmers get this one wrong.

Tuesday, April 6, 2010 (Permalink)

I've released XOM 1.2.5, my free-as-in-speech (LGPL) dual streaming/tree-based API for processing XML with Java. 1.2.5 is a very minor release. The only visible change is that Builder.build((Reader) null) now throws a NullPointerException instead of a confusing MalformedURLException. I've also added support for Maven 2, and hope to get the packages uploaded to the central repository in a week or two.


In other news, I have had very little time to work on this site lately. In order to have any time to work on other projects including XOM and Jaxen, I've had to let this site slide. I expect to have more news about that soon.


Also, speaking of Jaxen, I noticed that the website has been a little out of date for a while now because I neglected to update the releases page when 1.1.2 was released in 2008. Consequently, a lot of folks have been missing out on the latest bug fixes and optimizations. If you're still using Jaxen 1.1.1 or earlier, please upgrade when you get a minute. Also, note that the official site is http://jaxen.codehaus.org/. jaxen.org is a domain name spammer. I'm not sure who let that one slide, but we'll have to see about grabbing it back one of these days.

Wednesday, February 24, 2010 (Permalink)

Modern Jass is an interesting open source, annotations based Design-by-Contract system for Java 6. Annotations include:

  • @Invariant
  • @Pre Precondition
  • @Post Postconditions
  • @SpecCase a full method specification (normal and exceptional behaviour)
  • @Also a container for multiple specifications
  • @Min the lower bound of a numerical value

My biggest concern with this is that it makes the same mistake assertions did: it uses errors that can be be disabled at runtime where it should be using runtime exceptions. This makes it a debugging tool, but not really part of the running code.

Tuesday, February 16, 2010 (Permalink)

The Apache Jakarta Project has released Commons-DBCP 1.3 and 1.4, a library for pooling database connections. Version 1.4 supports JDBC 4 and requires Java 1.6. Version 1.3 supports JDBC 3 and requires Java 1.4. According to the web page, "Creating a new connection for each user can be time consuming (often requiring multiple seconds of clock time), in order to perform a database transaction that might take milliseconds. Opening a connection per user can be unfeasible in a publicly-hosted Internet application where the number of simultaneous users can be very large. Accordingly, developers often wish to share a 'pool' of open connections between all of the application's current users. The number of users actually performing a request at any given time is usually a very small percentage of the total number of active users, and during request processing is the only time that a database connection is required. The application itself logs into the DBMS, and handles any user account issues internally." "Both releases contain numerous bug fixes and enhancements. Support for pooling managed connections and callable statements has been added, and several long-standing API consistency and reliability issues have been resolved."

Friday, February 12, 2010 (Permalink)

Google has posted version 1.3.1 of the AppEngine for Java SDK.

App Engine uses the Java Servlet standard for web applications. You provide your app's servlet classes, JavaServer Pages (JSPs), static files and data files, along with the deployment descriptor (the web.xml file) and other configuration files, in a standard WAR directory structure. App Engine serves requests by invoking servlets according to the deployment descriptor.

The JVM runs in a secured "sandbox" environment to isolate your application for service and security. The sandbox ensures that apps can only perform actions that do not interfere with the performance and scalability of other apps. For instance, an app cannot spawn threads, write data to the local file system or make arbitrary network connections. An app also cannot use JNI or other native code. The JVM can execute any Java bytecode that operates within the sandbox restrictions.

Version 1.3.1 adds Datastore Query Cursors, Transactional Tasks, Custom Admin Console pages, built-in support for unit testing, and URLFetch asynchronous requests.

Monday, February 8, 2010 (Permalink)

The Apache Project has released Ant 1.8, the popular XML based, open source build tool for Java. New features in 1.8 include

  • A top level element extension-point allows build files to be extended with custom targets more easily
  • if and unless attributes will be evaluated according to the values of the properties entered if these properties evaluate to true, false, on, off
  • An include provides an alternative to <import> that should be preferred when you don't want to override any targets

Java 1.4 or later is required. I should probably move XOM over to this version. The if and unless attributes will be extremely helpful in further automaing the build process.

Monday, January 25, 2010 (Permalink)

JetBrains has released IntelliJ IDEA 9.0.1, which I ereally should test drive one of these days. New features in the 9.0 line include:

  • "New background-enabled file indexing allows you to start using essential editing features almost immediately. All the advanced features become available in minutes. The responsiveness of the user interface has been improved, with many time-consuming operations now performed in the background. We have also introduced on-the-fly module reloading, which means that changes in .iml files (in particular, after updating from version control) no longer require reopening the entire project."
  • Global unused symbols highlighting
  • Easy class exclusion from completion & auto-import
  • Built-in spell checker (They didn't have this already?!)
  • Auto-folding (ditto?!)
  • Subversion 1.6
  • JEE 6
  • JSR 308 type annotations such as @Nonnull
  • OSGI (Bleah.)
  • Google App Engine
  • GWT 1.7 and 2.0
  • Android (Yay!)
  • Flex (Interesting choice)
  • PHP (About time!)
  • UML (Boo!)

9.0.1 is a bug fix release.

Saturday, January 23, 2010 (Permalink)

The Gnu Project has released version 4.4.3 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. "4.4.3 is a bug-fix release containing fixes for regressions and serious bugs in GCC 4.4.2." GCC is released under the Gnu General Public License.

Thursday, January 21, 2010 (Permalink)

The Eclipse Project has posted the fourth "milestone" of Eclipse 3.6 Helios. This release adds PowerPC 64-bit support, virtual folders, Wrap indent in StyledText, expanded JUnit 4 support, and warnings for missing @Override on methods that implementa na interface.

Tuesday, January 19, 2010 (Permalink)

The Apache Project has posted the first release candidate of Ant 1.8, the popular XML based, open source build tool for Java. New features in 1.8 include

  • A top level element extension-point allows build files to be extended with custom targets more easily
  • if and unless attributes will be evaluated according to the values of the properties entered if these properties evaluate to true, false, on, off
  • An include provides an alternative to <import> that should be preferred when you don't want to override any targets

Java 1.4 or later is required.

Friday, January 15, 2010 (Permalink)

The Legion of the Bouncy Castle has released version 1.45 of the Bouncy Castle Java Cryptography API, an open source, clean-room implementation of the Java Cryptography Extension (JCE). It supports X.509 certificates, PKCS12, S/MIME, CMS, PKCS7, TEA, XTEA, SHA224, and lots of other juicy acronyms. It also includes its own light-weight crypto API that works in Java 1.0 and later, and does not depend on the JCE. Version 1.45 adds support for "EC MQV to the light weight and CMS/SMIME libraries. In addition to that OpenPGP now supports UTF-8 in file names for literal data, EC keys are now serialisable, and the provider now makes use of a privileged block for constructing the provider table. In addition, to additionally improve the security and reliability of the libraries, ASN.1 processing has been reviewed to further reduce the likelihood of OutOfMemory errors for badly corrupted streams, and use of constant time comparisons have been introduced to remove the possibility of timing attacks in several areas such as with cipher modes like GCM and CCM."

Wednesday, January 13, 2010 (Permalink)

IBM's developerWorks has published my latest article, Speaking Java without an accent. C++ programmers often put certain inflections on Java code that unmistakably mark them as converts rather than native speakers. In this article, I explore a number of Java programming idioms that often get overlooked precisely because semantically they don't matter all that much, if at all. They are purely issues of style and convention. A few of them have plausible justifications. Some of them lack even that. But all of them help distinguish Java code that sounds right from Java code that sounds wrong.

Wednesday, January 6, 2010 (Permalink)

Julien Ponge has released IzPack 4.3.23, an open source tool for building cross-platform installers in Java. "This ia a stable, maintenance release that fixes some issues found in IzPack 4.3.1 and IzPack 4.3.2." IzPack is published under the Apache License 2.0.

Tuesday, January 5, 2010 (Permalink)

Bob Martin has released FitNesse 20100103. FitNesse is an open-source Wiki with built-in web server for defining acceptance tests as web pages containing simple tables of inputs and expected outputs. New features in this release include:

  • Parameterized Scenario Tables
  • Can run nested Suites using !see.
  • Plain Text Tables. e.g. tables without using vertical strokes.
  • Sequential Arguments in Script Tables.
  • Pages can now be saved in HTML format. FitNesse will still render and test them.
Thursday, December 31, 2009 (Permalink)

Google has released version the Google Collections Library 1.0, which extends the standard JDK collections classes with:

  • New Collection types: Multimap, Multiset, BiMap and others
  • High-performance immutable implementations of the standard collection types, for example ImmutableSet
  • MapMaker, a builder for concurrent hash maps with many advanced features
  • Ordering, which can only be described as a "Comparator on steroids"
  • Iterators and Iterables utility classes: element-based equality, cycle, concat, partition, filter with predicate, transform with function, and much more
  • Lists, Sets and Maps utility classes: a plethora of convenient factory methods and much more
  • Forwarding collections, such as ForwardingSet, allowing you to customize collection behavior without subclassing
  • Implementation helpers like AbstractIterator

I've been using this library for a couple of years now. There's some good stuff in here, but it's mostly relatively minor. For example instead of writing

List<String> list = new ArrayList<String>();

you can instead write

List<String> list = Lists.newArrayList();

Yes, it saves a few characters and avoids an annoying redundant generic type declaration; but is it worth the extra dependency? The downside of this sort of library is that most projects don't need but a small subset of this functionality, and end up pulling in a lot of extra stuff they don't need to get the one or two pieces they do need. Of course it's open source (Apache License 2.0) so you can just fork out the one or two pieces you need for your own program and repackage them; but I do wish Java had a better way to use just a Multimap, for example, without pulling in Multiset, Bimap, forwarding collections, and everything else. Java 5 or later is required.

Wednesday, December 30, 2009 (Permalink)

Alan Ezust, Slava Pestov, Björn "Vampire" Kautler, Marcelo Vanzin, Matthieu Casanova, Eric Berry, and Eric Le Lay have released jEdit 4.3, a free-as-in-speech (GPL 2.0) programmer's editor written in Java with extensive plug-in support and my preferred text editor on Windows and Unix (though still far behind TextMate and BBEdit on the Mac.) Java 5 or later is now required.

Wednesday, December 23, 2009 (Permalink)

Bare Bones Software has released version 9.3.1 of BBEdit, my preferred text editor on the Mac, my favorite XML editor on any platforms, what I'm using to type these very words. This release fixes bugs including some issues in handling UTF-8 with byte-order marks.

Tuesday, December 22, 2009 (Permalink)

Version 1.7 of Groovy has been released. Groovy is a JVM hosted scripting language that "builds upon the strengths of Java but has additional power features inspired by languages like Python, Ruby and Smalltalk." New features in 1.7 include:

  • Anonymous Inner Classes and nested classes. (I could have sworn Groovy had closures so it didn't need these half-measures?)
  • Can now annotate imports, packages and variable declarations
  • Power Asserts, whatever those are
  • AST Viewer and AST Builder, for easing the creation of AST transformations
  • Several GroovyConsole enhancements, like line numbers, a new output view, and more
  • SQL batch updates and transaction support
  • The kitchen sink
Monday, December 21, 2009 (Permalink)

JetBrains has released TeamCity 5.0, a $1999 payware continuous integration server. TeamCity manages builds and can be configured not to check in code unless tests pass. "This release brings a huge potential improvement in scalability by reinforcing its distributed build grid with Amazon EC2 cloud integration. Features such as build configuration templates, project archiving, and backup&restore eliminate unnecessary redundancy and hassle in configuring large build infrastructures. To make TeamCity feel at home everywhere and benefit developer productivity, we've added issue tracker integration, better support for Maven, Command line tool for personal builds, and many other features."

Thursday, December 17, 2009 (Permalink)

Google has released the Android Development Kit 2.0.1. According to Xavier Ducrohet:

Android 2.0.1 is a minor update to Android 2.0. This update includes several bug fixes and behavior changes, such as application resource selection based on API level and changes to the value of some Bluetooth-related constants. For more detailed information, please see the Android 2.0.1 release notes.

To differentiate its behavior from Android 2.0, the API level of Android 2.0.1 is 6. All Android 2.0 devices will be updated to 2.0.1 before the end of the year, so developers will no longer need to support Android 2.0 at that time. Of course, developers of applications affected by the behavior changes should start compiling and testing their apps immediately.

We are also providing an update to the Android 1.6 SDK component. Revision 2 includes fixes to the compatibility mode for applications that don't support multiple screen sizes, as well as SDK fixes. Please see the Android 1.6, revision 2 release notes for the full list of changes.

Finally, we are also releasing an update to the SDK Tools, now in revision 4. This is a minor update with mostly bug fixes in the SDK Manager. A new version of the Eclipse plug-in that embeds those fixes is also available.

Wednesday, December 16, 2009 (Permalink)

The Apache Jakarta Project has released POI 3.6, an open source Java library "for reading and writing Microsoft Office file formats, such as Excel, PowerPoint, Visio and Word." Version 3.6 focuses on improving performance and reucing memory usage.

Tuesday, December 15, 2009 (Permalink)

Sun has released NetBeans 6.8, its open source IDE for Java. C++. PHP, and Ruby. New features in this version include:

  • EJB 3.1 support
  • RESTful web services (JAX-RS 1.1), GlassFish Metro 2.0 web services (JAX-WS 2.2), JAXB 2.2
  • Java Persistence JPA 2.0, deployment, debugging and profiling with GlassFish v3 application server
  • Code completion, error hints, namespace completion, documentation popups, and tag auto-import for Facelets
  • Editor support for Facelets libraries, composite components, expression language, including generators for JSF and HTML forms
  • Customizable JSF components palette generates JSF forms and JSF data tables from entities
  • JavaFX SDK 1.2.1
  • Editor Hints: Fix Imports, Surround With, Implements Abstract Methods, and more
  • Improved navigation: Hyperlinks, Go to Type, Find Usages
  • Full JIRA support
  • Project dashboard with more member and project details, improved search and navigation, easier project sharing
  • Improved instant messenger integration
  • Improved issue tracker integration
  • PHP 5.3
  • Symfony Framework support
  • PHPUnit, Code Coverage, FTP/SFTP integration improvements, exclude PHP project folders from scanning/indexing
  • New Project from Maven archetype catalog and improved support for Java EE 6, Groovy, Scala projects
  • Support for Rails 2.3.2 apps with dispatchers, JRuby 1.3.1, Ruby 1.9 debugging, and RSpec 1.2.7
  • C++ Profiling: New Microstate Accounting indicator, Thread Map view, Thread Analyzer, Hot Spots view, Memory Leaks view, Sync Problems view
  • C++ Parallelization Adviser
  • Support for gdbserver attach and easier attaching to already running processes
Monday, December 14, 2009 (Permalink)

I've released XOM 1.2.4, my free-as-in-speech (LGPL) Java library for processing XML. The major change in this release is a hopefully user-transparent one-button release process. This still needs some work though. The Ant target to tag the release in CVS is broken (I'd appreciate it if anybody coudl figure that out). Furthermore, it's still hooked up backwards. The release is bundled and deployed from my local hard drive, and then tagged in CVS. What should happen is that first I tag the release as an independent target. Then the deploy target checks out a tagged version from CVS and uploads that. This would make sure that what's deployed macthes what's in the repository. It would also make it a little easier to build older versions when someone needs one. As is, CVS is just sort of off to the side of the deployment chain rather than being a crucial link in the process.

There's also one small optimization in XPath evaluation, and the maven POM that was broken in 1.2.3 should now be fixed.

Friday, December 11, 2009 (Permalink)

JetBrains has released IntelliJ IDEA 9.0. I'm still using 7.0 (and Eclipse) myself, but reports from colleagues using the 9.0 beta have been uniformly positive. New features in 9.0 include:

  • "New background-enabled file indexing allows you to start using essential editing features almost immediately. All the advanced features become available in minutes. The responsiveness of the user interface has been improved, with many time-consuming operations now performed in the background. We have also introduced on-the-fly module reloading, which means that changes in .iml files (in particular, after updating from version control) no longer require reopening the entire project."
  • Global unused symbols highlighting
  • Easy class exclusion from completion & auto-import
  • Built-in spell checker (They didn't have this already?!)
  • Auto-folding (ditto?!)
  • Subversion 1.6
  • JEE 6
  • JSR 308 type annotations such as @Nonnull
  • OSGI (Bleah.)
  • Google App Engine
  • GWT 1.7 and 2.0
  • Android (Yay!)
  • Flex (Interesting choice)
  • PHP (About time!)
  • UML (Boo!)
Thursday, December 10, 2009 (Permalink)

Google has released GWT 2.0, an open source Java-to-JavaScript compiler and library for building AJAX applications in Java. In version 2.0

  • Development Mode in a regular browser replaces hosted mode.
  • Speed Tracer Performance Analysis
  • Developer Guided Code Splitting
  • Compiler Optimizations
  • Draft Compile
  • UiBinder enables you to create user interfaces declaratively in XML instead of having to assemble them programmatically.
  • Layout Panels
  • Bundled Resources via ClientBundle
  • HtmlUnit for Testing
Wednesday, December 9, 2009 (Permalink)

Kent Beck and David Saff have released JUnit 4.8.1. "This was a quick bugfix release for an important bug...Category annotations on classes were not honored."

Tuesday, December 8, 2009 (Permalink)

Oliver Burn has released Checkstyle 5.0, a lint-like tool that checks Java code for adherence to various coding standards:

elease 5.0 is not 100% backwardly compatible with release 4.4. Most likely you will need to update your configuration file.

The following checks were added since release 4.4:

Monday, December 7, 2009 (Permalink)

Apple has released Java Update 1 for Mac OS X 10.6 and Java for Mac OS X 10.5 Update 6 to plug a few security holes that could enable an untrusted applet to obtain elevated privileges. Essentially this upgrades Java 1.6.0_17 to 1.6.0_17 and Java 1.5.0_20 to 1.5.0_22. Check Software Update to download.

Software Update Java for Mac OS X 10.6 Update 1

Thursday, December 3, 2009 (Permalink)

Version 1.6.7 of Groovy has been released. Groovy is a JVM hosted scripting language that "builds upon the strengths of Java but has additional power features inspired by languages like Python, Ruby and Smalltalk." According to Guillaume Laforge, "Groovy 1.6.7 is a drop-in replacement for 1.6.6, so you can just upgrade to 1.6.7 directly, or replace 1.6.6 with 1.6.7 in your projects."

Wednesday, December 2, 2009 (Permalink)

Kent Beck and David Saff have released JUnit 4.8. This release adds categories:

From a given set of test classes, the Categories runner runs only the classes and methods that are annotated with either the category given with the @IncludeCategory annotation, or a subtype of that category. Either classes or interfaces can be used as categories. Subtyping works, so if you say @IncludeCategory(SuperClass.class), a test marked @Category({SubClass.class}) will be run.

You can also exclude categories by using the @ExcludeCategory annotation

Example:

public interface FastTests { /* category marker */ }
public interface SlowTests { /* category marker */ }

public static class A {
    @Test
    public void a() {
        fail();
    }

    @Category(SlowTests.class)
    @Test
    public void b() {
    }
}

@Category({SlowTests.class, FastTests.class})
public static class B {
    @Test
    public void c() {

    }
}

@RunWith(Categories.class)
@IncludeCategory(SlowTests.class)
@SuiteClasses( { A.class, B.class }) // Note that Categories is a kind of Suite
public static class SlowTestSuite {
  // Will run A.b and B.c, but not A.a
}

@RunWith(Categories.class)
@IncludeCategory(SlowTests.class)
@ExcludeCategory(FastTests.class)
@SuiteClasses( { A.class, B.class }) // Note that Categories is a kind of Suite
public static class SlowTestSuite {
  // Will run A.b, but not A.a or B.c
}

Older News | Today's XML News on Cafe con Leche | Mokka mit Schlag | The Cafes