Software craftsmanship Tag

As a software developer you will use plenty of frameworks during your career. There are the big beasts like Spring, ActiveMQ or OSGi that you have to master in order to build the foundations of your applications. And then, there are the small frameworks. Let's call them lightweight tools. Like a carpenter, the lightweight tools are kept in a toolbox. The carpenter will use industrial...

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

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

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

JFace Data Binding allows you to attach only one validator to a binding. Putting all constraints into one validator is essentially bad design and compromises reusability. Here's a trick for dealing with this limitation of the data binding API and at the same time, keeping your validators small and reusable. When binding a source observable to a target observable in JFace Data Binding, it is possible...

Read More

"This is just about getting some numbers." "Oh, and we need some basic UI, nothing fancy though." "We should have some alternative storage or exporting options, you know, keep it simple, just export to Excel. Oh and some more numbers, please." "This latest function broke some of the numbers from before, could you fix that please?" Many projects that start out small legitimately grow bigger over time, by adding...

Read More

During my life so far with Java I found myself often using separated Strings, such as a comma separated String. The reason is simple. Separated Strings are useful in many situations, like persistence prototyping, where you don't want to add a full blown persistence solution but a small, lightweight file based store to save some values. Or, when you transmit data over the wire and...

Read More

A common task in object oriented programming is comparing two objects for the purpose of sorting. In Java the useful Comparable<T> Interface exists. I’ve found myself implementing the compareTo method from this Interface plenty of times. But there is something that bothers me everytime: the complexity of the code this implementation creates. Let me explain. One of my goals is to always write easily readable code....

Read More