Cup of cafe au laitCafe au Lait Java News and Resources

Quote of the Day

The fashion in most programming languages today demands strong typing. The theory is that strong typing allows a compiler to detect a large class of errors at compile time. The sooner we can detect and repair errors, the less they cost us. JavaScript is a loosely typed language, so JavaScript compilers are unable to detect type errors. This can be alarming to people who are coming to JavaScript from strongly typed languages. But it turns out that strong typing does not eliminate the need for careful testing. And I have found in my work that the sorts of errors that strong type checking finds are not the errors I worry about. On the other hand, I find loose typing to be liberating. I don't need to form complex class hierarchies. And I never have to cast or wrestle with the type system to get the behavior that I want.

--Douglas Crockford
Read the rest in JavaScript: The Good Parts

Today's News

Sun has posted the first public review draft specification of JSR-297 Mobile 3D Graphics API 2.0 for Java ME. This is divided into two parts, a required core and an optional advanced block. According to the draft, new features include

CORE BLOCK:
  • Collision detection
  • Bounding volumes
  • Automatic level-of-detail (LOD)
  • Multichannel keyframe sequences
  • Direct sampling of keyframe sequences
  • Animation events
  • Combined morphing & skinning
  • Depth sorting of blended objects
  • Subset morphing
  • Point sprites
  • Triangle lists
  • Lines
  • Texture combiners
  • Dynamic (video) textures
  • Ericsson Texture Compression
  • 16-bpp texture formats (RGB565, RGBA5551, RGBA4444)
  • All depth buffer comparison modes
  • All alpha test comparison modes
  • Perspective correction
  • Multitexturing (at least 2 units)
  • Bilinear filtering
  • Mipmapping
  • Textures up to 1024x1024 pixels
ADVANCED BLOCK:
  • Programmable shading
  • Stencil buffering
  • Cube mapping
  • Advanced blending
  • Antialiasing

Deprecated and superceded features

  • Flat shading. The implementation cost of flat shading on OpenGL ES 2.0 is very high, for very little benefit to the user. Applications can still enable flat shading, but the implementation may silently revert to smooth shading.
  • Two-sided lighting. The implementation cost of two-sided lighting on OpenGL ES 2.0, as well as on some implementations of OpenGL ES 1.1, is very high, for very little benefit to the user. Applications can still enable two-sided lighting, but the implementation may silently revert to one-sided lighting.
  • Local camera lighting. Local camera lighting is a quality hint that was never supported by more than a handful of devices, mostly because the corresponding OpenGL feature was dropped from OpenGL ES. Applications can still enable local camera lighting, but the implementation may silently ignore the request.
  • Sprite3D. The implementation cost of Sprite3D is fairly high, especially if it were to be made any faster than a pair of textured triangles. As a result, most implementations are using ordinary textured triangles, yielding no speed benefit. This is especially true of hardware implementations. The use cases for Sprite3D are also limited. Sprite3D can still be used, but point sprites or textured quads are likely to yield better performance. Also, the maximum size of a sprite image is now the same as that of a texture; images of unlimited size are no longer allowed.
  • Background image. As with Sprite3D, background images are typically implemented with textured triangles, and do not serve a great number of useful purposes. Background images are still available for use, but sky cubes and other techniques are likely to yield better image quality and performance. Also, the maximum size of a background image is now the same as that of a texture; images of unlimited size are no longer allowed.
  • TriangleStripArray. Arrays of triangle strips, as well as arrays of triangles, point sprites, lines, and line strips, are now available in the IndexBuffer base class. The derived class is still available, but using the base class directly is recommended.
  • MorphingMesh. Vertex morphing functionality has been promoted to the Mesh base class, so that both morphing and skinning can be applied to the same mesh. This was not possible previously. Morphing has been improved in other ways, as well: it is now possible to morph only a subset of all vertices -- for example only the facial area of an animated character -- saving potentially large amounts of memory. MorphingMesh can still be used, but the equivalent methods in Mesh are recommended instead.
  • Picking of deformed meshes. Skinning and/or morphing meshes are now treated as regular rigid-body meshes when computing intersections with a pick ray. This facilitates moving all mesh deformation code from the CPU to the GPU. It can also speed up picking significantly, at the cost of only slightly less accurate results in most use cases.
  • Picking of sprites with alpha. Sprites are no longer tested for transparency at the intersection point of the pick ray. A Sprite3D is always picked if the pick ray intersects the sprite rectangle. This allows implementations to offload the sprite image into an OpenGL ES texture object, rather than keeping a second copy available in main memory just in case the sprite happens to be picked.

Comments are due by September 8.


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


Further Reading

On The Cafes:

On Mokka mit Schlag:



Random Sites Around the Web

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.


Currently on Cafe con Leche:

Recent News

Thursday, July 3, 2008 (Permalink)

java.net has published my latest article in the The Open Road series, java.nio.file. This article talks about a really mundane and prosaic but critical topic, copying and moving files. Shockingly over 12 years after Java was first released we still don't have a good way to copy and move files in pure Java. However, maybe Java 7 is finally going to fill this gap. Read on to find out more.

Wednesday, July 2, 2008 (Permalink)

Syncro Soft has released Syncro SVN Client 3.2, a $59 GUI Subversion client written in Java. Version 3.2 "adds a set of improvements to the previous version: filtering the content of the History view based on revision number and commit date, computation of the SVN annotations on a limited range of revisions, modification of the attributes of a revision in history, configurable shortcut keys for actions, editing a conflict with an external diff application, editing of global SVN configuration files and some new comparison actions."

Tuesday, July 1, 2008 (Permalink)

The Apache Jakarta Project has released POI 3.1, an open source Java library for "manipulating various file formats based upon Microsoft's OLE 2 Compound Document format. OLE 2 Compound Document Format based files include most Microsoft Office files such as XLS and DOC." Version 3.1 adds support for various Word, excel, and PowerPoint features.

Saturday, June 28, 2008 (Permalink)

The Eclipse Project has released Eclipse 3.4 Ganymede, their open integrated development environment for Java. Version 3.4 adds numerous small new features and user interface improvements. There's no one killer new feature here, but the gradual accumulation of small improvements does add up over time.

For the last few months I've been using IntelliJ 7 in my day job on a regular basis, so I think I can finally reasonably compare these two. IntelliJ has the reputation of being more expensive but much more productive, while Eclipse is thought to be somewhat rougher but free. After several months of using IntelliJ in anger for the first time, I have to say that while this may have been true a few years ago, it isn't true today. Eclipse is far from perfect, but it has noticeably better refactoring, code completion, editing, and browsing facilities. IntelliJ's Swing UI looks prettier than Eclipse's SWT UI, but the user experience is far inferior. IntelliJ still screws up basic things like the keyboard shortcuts for Close and Find Next. I can work with IntelliJ because I have to (certain proprietary plug-ins our build system depends on have been developed for IntelliJ only) but I don't like it. Coding in IntelliJ is like being working with my keyboard covered in hot tar. Coding in Eclipse is like working with my keyboard covered in hot molasses, bad but better than the alternative.

I won't say Eclipse is the best IDE for Java. I've still never really used NetBeans 6 in anger, so it may be superior. I don't know. But I am willing to say that in 2008 that there's no reason for most programmers to pay money for a Java IDE. Whichever IDE is the best one, that IDE is a free IDE.

Friday, June 27, 2008 (Permalink)

Red Hat's IcedTea open source JVM has passed the Java Compatibility Kit tests. Thus on paper we now have a fully open source Java virtual machine. Now the work starts to begin noticing and reporting areas where the Sun VM and the Red hat VM diverge in significant ways, and thus indicate bugs in the specifications and compatibility kit. Nonetheless this is a major milestone.

Thursday, June 26, 2008 (Permalink)

LG Electronics has posted the first public review draft specification of JSR-300 DRM API for Java ME. According to the draft,

This specification defines an optional JavaME package that enables applications to access DRM protected content on the device in a secure manner. This package can be used along with the Connected Limited Devices Configuration (CLDC) or Connected Devices Configuration (CDC). This specification defines generic APIs to access DRM protected content, abstracting the difference between the underlying DRM agent implementations a device might have. i.e. the DRM APIs are not tied to any specific DRM technology.

The features of DRM APIs are following:

  • Generic interface for JavaME Applications to underlying DRM Agents.
  • Accessing the content in a secure manner for rendering
  • Identifying that the content is DRM protected.
  • Obtaining the information about the rights associated with the content.
  • Support for acquiring rights
  • Support for handling proprietary rights and properties.
  • Protecting locally created contents
  • Move, copy, backup and restore of contents

Comments are due by July 21.


Sun's posted a maintenance release of JSR-252 JavaServer Faces 1.2. Changes seem to be extremely minor.

Friday, June 20, 2008 (Permalink)

Subversion 1.5, an open source version control system designed to replace CVS, has been released. Major new features include:

  • Merge Tracking [foundational]
  • Sparse checkouts (see new '--depth' option)
  • Interactive conflict resolution
  • svn:externals handles relative URLs and peg URLs
  • Changelist support
  • WebDAV transparent write-through proxy
  • Better support for large FSFS deployments (via sharding and partitioning)
  • Cyrus SASL support for ra_svn and svnserve
Wednesday, June 18, 2008 (Permalink)

Atlassian has released Clover 2.3.1, a $1200 payware test coverage tool. Clover modifies the source code to enable it to follow which statements are executed when, and keeps a running count of how many times each statement is executed during the test suite. Any statement that executes zero times is not being tested. I use Clover with Ant, but there's also an Eclipse plug-in. Clover can generate test coverage reports in XML, HTML, PDF, or via a Swing Viewer. Version 2.3.1 improves the integration with Maven, IntelliJ IDEA, Eclipse, and Ant.


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