Java Tag

Two months ago the OSGi JAX-RS was released in Version 2.0. Today I'm proud to announce Version 2.1. In addition to minor improvements, a new feature was added based on the work of Dirk Lecluse. It's now possible to register @Provider annotated objects as OSGi services. The @Provider annotation is used to register custom de/serialization. Now you can implement a custom MessageBodyWriter, MessageBodyReader, ContextResolver or ExceptionMapper,...

Read More

I've met many programmers over the years who had just started using Eclipse or already had "some experience" -- but they used Eclipse just as a text editor or handled it in a very cumbersome way. The main problem was that they hadn't yet learned about Eclipse's capabilities and how to leverage its powerful features. So, I thought I would write about my top 10 recommendations...

Read More

In some of my previous posts I've talked about well-crafted code. I'm really convinced that software development is a craft - but what does that mean? The "Manifesto for Software Craftsmanship" contains the following 4 points: Considering these points I took a look at the EclipseCon Europe 2012 session schedule and picked out a view talks I would like to attend. Maybe they are a good...

Read More

Serial communication is one of the ancient technologies in computing that is still relevant today. Its origins date back to the 1960's when serial communication was used between teletypewriters and modems. Today, serial interfaces can be found inside myriads of embedded systems where they transfer data between different components. A serial interface is also a common way to connect a PC to an embedded system....

Read More

Whatever your project's specific policy on whitespaces is (tabs vs. spaces, etc), the most important rule should always be consistency. Not just to make your code look nice, but also to avoid issues with patches and your version control system. Changes to whitespaces may be more or less invisible to the naked eye, but Git and co. register them anyway. Here are some simple ways to...

Read More

Recently I scanned the source code of our current Eclipse RCP/RAP project for occurrences of the Listener (or Observer) pattern. I found no less than 6 (!) different implementations and decided to unify them into one. When researching the implementation options (and the Java world has many to offer), I found an aspect of Listener programming that is usually not mentioned by internet resources. But...

Read More

In the last few months I noticed that I've been recommending the same books again and again to new and also to experienced developers. For this reason I decided to put together a list of must-reads. The books I'll recommend were good company during my journey from beginner to the level I'm currently at (whatever level that is ;)). Many fellow programmers were involved in...

Read More

The Raspberry Pi, a credit card-sized PC, is drawing a lot of attention - and justifiably so. It is cheap. Very cheap. From its main distributors it is available for around £32. This makes the device so cheap that it is useful in a great variety of use cases. Originally intended as an educational platform, as described in this insightful speech by the project's founder,...

Read More

In Java, every object has a method hashCode that is simple to understand but still it's sometimes forgotten or misused. Here are three things to keep in mind to avoid the common pitfalls. An object's hash code allows algorithms and data structures to put objects into compartments, just like letter types in a printer's type case. The printer puts all “A” types into the compartment for...

Read More

Back in January 2012, I wrote about the release of the OSGi JAX-RS connector in version 1.0. The connector gives you the opportunity to publish resources by registering @Path annotated types as OSGi services. I'm glad to say that the connector is in production use in many projects. It is pretty stable and as a result there was not much need for maintenance. So, why...

Read More