Author Archives : Frank Appel

Home  >>  Author : Frank Appel

Clean JUnit Throwable-Tests with Java 8 Lambdas

On July 28, 2014, Posted by , In Common, By ,,,, , With No Comments

Recently I was involved in a short online discussion on twitter and google+ which concerned the question why the arrival of Java 8 Lambda expressions makes the catch-exception library1 obsolete. This was triggered by a brief announcement that the library won’t be longer maintained as lambdas will make it redundant….

A JUnit Rule to Run a Test in Its Own Thread

On July 21, 2014, Posted by , In Common, By ,,, , With No Comments

Occasionally it would be helpful to be able to run a JUnit test in a separate thread. In particular when writing integration tests that interact with encapsulated ThreadLocals or the like this could come in handy. A separate thread would implicitly ensure that the thread related reference of the threadlocal…

gonsole weeks: oops – it’s a framework

On June 26, 2014, Posted by , In Common,Eclipse,Gonsole, By ,,, , With No Comments

While Eclipse ships with a comprehensive Git tool, it seems that for certain tasks many developers switch to the command line. This gave Rüdiger and me the idea, to start an open source project to provide a git console integration for the IDE. What happened so far during the gonsole…

gonsole weeks: eclipse egit integration

On June 11, 2014, Posted by , In Common,Eclipse,Gonsole, By ,,, , With 5 Comments

While Eclipse ships with a comprehensive Git tool, it seems that for certain tasks many developers switch to the command line. This gave Rüdiger and me the idea, to start an open source project to provide a git console integration for the IDE. Rüdiger anounced the launch of this project…

Java Code Style: The Final Decision

On April 28, 2014, Posted by , In Common, By ,,,, , With 5 Comments

Isn’t it funny how the alleged most unremarkable things can lead to controversial discussions or sometimes even heated debates with hardend fronts? I witnessed on several occassions for example, how the usage of the keyword final triggered quite passionate arguments. And for an outside observer this might have looked as…

Clean Synchronization Using ReentrantLock and Lambdas

Recently I was reading an informative post about the differences between synchronized vs ReentrantLock by Javin Paul1. He emphasises on the advantages of the latter, but does not withhold some downsides, which are related to the cumbersome try-finally block needed for proper usage. While agreeing on his statements I brooded…

Efficient Code Coverage with Eclipse

There is a saying that a fool with a tool is still a fool. But how to use a tool most efficiently is not always obvious to me. Because of this I typically spend some time to check out new playgrounds1 that promise to increase my work speed without impairing…

Slim Down SWT FormLayout Usage

On March 31, 2014, Posted by , In Common,Eclipse, By ,,,, , With 2 Comments

Always on the quest for efficiency I reconsidered the usability of SWT FormLayout lately. Although it is one of my favored core layouts with respect to flexibility, I had to recognize that it is only reluctantly used by most of my fellow workers. Proposing it for an appropriate task sometimes…

What are Mockito Extra Interfaces?

On March 24, 2014, Posted by , In Common, By ,,,,, , With 5 Comments

Mockito is my favored little helper if it comes down to write light weight JUnit tests. It is very useful to replace the ‘real’ dependencies of a unit under test easily by mocks if necessary. In particular when working on the borderline to framework APIs such dependencies can otherwise be…

Getting JUnit Test Names Right

Finding good names is one of the challanges of crafting software. And you need to find them all the time and for everything – classes, methods, variables, just to name a few. But what makes a name a good name? To quote Oncle Bob: ‘Three things: Readability, readability, and readability!’…