Property-Based Testing in Java 8

In the last article we learned how to generate objects with Java 8 in a functional way and implemented a small API based around the Gen monad. Although already powerful on its own, generators really shine when we use them in combination with property-based testing. A property-based test verifies a statement about the output of your code based on some given input. The same statement - or property - is verified for many different possible inputs to find one that falsifies the property. This article builds upon the implementation of Gen and discusses a simple API that enables us to write property-based tests.

more ...

Functional Generators in Java 8

I recently had the chance to toy around with property-based testing. Property-based tests verify statements about the output of your code based on some input, where the same statement is verified for many different possible (admissible and inadmissible) inputs. Such tests rely heavily upon randomly generated objects and values. Even if you do not fully commit to property-based testing, having abstractions for generating random objects and values from your domain can simplify testing a lot. This article shows how to build a simple generator-based approach that plays well along with property-based testing and can simplify your test cases tremendously.

more ...

Devoxx 2013 @ Antwerpen, Belgium

Date Tags Java / JUG

A very exciting week has finally come to an end - the mother of all Devoxx incarnations took place this week at the Metropolis Business Center in Antwerpen, Belgium. With roughly about 3500 fellow software engineers, over 200 presentations held by international speakers and 9 tracks the Devoxx is one of the biggest Java-related events in the world. And always a blast. This is my third time at this conference as a guest and I have to say that it is always an ideal place to mingle and exchange ideas, new technologies and trends with other developers.

more ...

Buchrezension zu Functional Programming in Java 8

Mit Version 8 erreichen Lambda Expressions endlich Java und gehören in naher Zukunft zum Standard-Repertoire eines jeden Java-Entwicklers. Doch wie schlägt man am besten die Brücke von Java 7 zu Java 8? Nahezu zeitgleich mit dem Release von Java 8 ist das neue Buch Functional Programming in Java von Venkat Subramaniam erschienen. Das Buch hat den Anspruch, genau diese Lücke zu schließen und insbesondere Leser mit wenig bis keiner Erfahrung in funktionaler Programmierung effektiv mit den Möglichkeiten der neuen Lambda-Funktionen und der Streams-API vertraut zu machen.

more ...

Retro zur JUG-DA: Netty 4 mit Norman Maurer

Date Tags Java / JUG

​Am 15.5. traf sich die JUG-DA zu einem Vortrag von Norman Maurer zum Thema "Netty 4". Norman Maurer ist für Red Hat als Principal Software Engineer tätig, ist Core Committer zu Netty (inzwischen auch bei vert.x) und beschäftigt sich bei Red Hat vornehmlich mit dem Thema NIO. Er ist Autor diverser Artikel im JavaMagazin (zum Thema Netty gibt es eine interessante Artikelserie), Speaker auf der JAX und arbeitet gerade an einem Buch zum Thema ("Netty in Action"), das voraussichtlich Ende des Jahres bei Manning erscheinen wird.

more ...