objenesis

Playing with constructors

Immutability is a property I look after when designing most of my classes. Achieving immutability requires: A constructor initializing all attributesNo setter for those attributes However, this design prevents or makes testing more complex. In order to allow (or ease) testing, a public no-arg constructor is needed. Other use-cases requiring usage of a no-arg constructor include: De-serialization of serialized objectsSub-classing with no constructor invocation of parent classesetc. There are

design pattern

The Visitor design pattern

I guess many people know about the Visitor design pattern, described in the Gang of Four’s Design Patterns: Elements of Reusable Object-Oriented Software book. The pattern itself is not very complex as many design patterns go. I’ve known Visitor since ages, but I’ve never needed it…​ yet. Java handles polymorphism natively: the method call is based upon the runtime type of the calling object, not on its compile type.

mutation testing test

Introduction to Mutation Testing

Last week, I took some days off to attend Devoxx France 2014 3rd edition. As for oysters, the largest talks do not necessarily contain the prettiest pearls. During this year’s edition, my revelation came from a 15 minutes talk by my friend Alexandre Victoor, who introduced me to the wonders of Mutation Testing. Since I’m currently writing about Integration Testing, I’m very much interested in Testing flavors I don’t know about.

agile project management

Can we put an end to this 'Estimate' game of fools?

When I was a young software programmer, I had to develop features with estimates given by more senior programmers. If more time was required for the task, I had to explain the reasons - and I’d better be convincing about that. After some years, I became the one who had to provide feature estimates, but this did no mean it was easier: if the development team took more time to develop, I had to justify it to my management. Now, after even more years, I have to provide estimates for entire pro

My recap of JavaLand

This week, I have been attending the first edition of JavaLand in Brühl, organized by Oracle User Groups of Germany, Austria and Switzerland. Here’s quick recap of my experience there. The first thing that deserves special mention is that the event took place in a theme park. Picture this, an empty theme park (or more likely a part of it) only opened for specially privileged geeks (like me). You can imagine that some people doing this stuff non-stop, like 8 times in a row - where in

GUI webapp

Reusing front-end components in web applications

In the Java SE realm, GUI components are based on Java classes with the help of libraries such as AWT, Swing or the newer JavaFX. As such, they can be shared across projects, to be inherited and composed. Things are entirely different in the Java EE world, as GUI components are completely heterogeneous in nature: they may include static HTML pages, JavaScript files, stylesheets, images, Java Server Pages or Java Server Faces. Solutions to share these resources must be tailored to each type. Si

angularjs

Doubly geeky stuff: AngularJS meets Marvel comics

Let’s face it: despite us having very serious titles like Principal Consultant, Senior Software Architect or Team Leader, most of us are geeks through and through. Each shows it in a different way; some fiddle with machines, some like cosplay, me I like comic books. When I learned that Marvel Comics provided a developers REST API, I couldn’t resist playing with it. I’m more of a backend guy, and though I love Vaadin, using it to call REST services would be like proxying with n