- Xmas Clean Sheet Update (0.9) - 21. December 2021
- Clean Sheet Service Update (0.8) - 23. May 2020
- Clean Sheet Service Update (0.7) - 24. April 2020
gonsole weeks: eclipse egit integration
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
Isn’t it funny how the alleged most unremarkable things can lead to controversial discussions or sometimes even heated debates with hardened fronts? I witnessed on several occasions, for example, how the usage of the Java final keyword triggered quite passionate arguments. And for an outside observer this might have looked…
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 with 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
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?
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 challenges 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 Uncle Bob: ‘Three things: Readability, readability, and readability!’…
Clean SWT Listener Notifcations with SWTEventHelper
Writing tests for SWT based UIs often requires to notify widget listeners programmatically. Unfortunately, the code to create, initialize and finally to trigger the event is a bit verbose and distracts from the actual purpose of the test. After writing similar initialization routines a couple of times I came up…
SWT: Do You Know the Difference between Tree#select and Tree#setSelection?
Actually I did not, neither did Google and the API documentation seems to miss out one crucial point – which took me some time to figure out. So I decided to be a nice boy scout and share my findings as my good deed of the day 1. According to…
A JUnit Rule to Ease SWT Test Setup
Rüdiger and I have written a lot of SWT test cases for our current RCP project lately. Most of the time we can execute them as plain JUnit tests. Still they also have to run in a RCP integration environment. Long story short we wrote a DisplayHelper fixture to reduce…
Responsive UIs with Eclipse and SWT
Recently I had the problem that my ‘well-conceived’ view design did not scale down reasonably. I realized that the flexibility to arrange viewparts in stacks of arbitrary sizes in an Eclipse workbench window does not exactly ease the development of appealing UIs. At least if you strive for more than…
Mockito Templates for Eclipse
Sometimes I miss the forest for the trees – and that for a disturbingly long time. I just became aware of this once again recently, typing one of the more verbose mockito expressions for the umpteenth time. The statement in question was a doAnswer(Answer) construct which always feels a bit…
More Units with MoreUnit
Just over a year ago I wrote a post about working with JUnit in Eclipse. One of the commenters recommended MoreUnit in order to increase testing efficiency even more. Giving it a try I was delighted and the plugin’s keyboard shortcuts were immediately memorized by my autonomic nervous system… Additionally,…
Running JUnit Tests Repeatedly Without Loops
Recently I came across a problem where I had to write tests for a method that calculates randomly distributed values within a certain range of possibilities 1. More precisely if you assume a signature that looks like interface RandomRangeValueCalculator { long calculateRangeValue( long center, long radius ); } a test…
WordPress Webhooked into GitHub
Code Affine is published using WordPress. Besides content provisioning there are technical tasks like site composition and software maintenance we have to take care of. Hence we were looking for a pragmatic but efficient way that allows us to develop locally, do versioning of changes, publish such changes automatically and…
Working Efficiently with JUnit in Eclipse
Recently I was dragged into a discussion1 with some test infected2 fellows about how we use JUnit within the Eclipse IDE. Surprisingly the conversation brought up some ‘tips and tricks’ not everybody was aware of. This gave me the idea to write this post doing a sum up of our…
JUnit Rules
The first time I stumbled over a JUnit @Rule annotation I was a bit irritated of the concept. Having a public field in a test case seemed somewhat odd and so I was reluctant to use it regularly. But after a while I got used to that and it turned…
Running HTTP/REST Integration Tests efficiently in Eclipse
Lately I had a chance to use the OSGi-JAX-RS-Connector library written by my dear fellow Holger Staudacher. The connector enables you to publish resources easily by registering @Path annotated types as OSGi services – which actually works quite nicely. While it is natural for me to write the service classes…
Performance Analysis of REST/HTTP Services with JMeter and Yourkit
My last post described how to accomplish stress- or load-testing of asynchronous REST/HTTP services with JMeter. However, running such tests often reveals that the system under test does not deal well with increasing load. The question is now how to find the bottleneck? Having an in-depth look at the code…
Stress/Load-Testing of Asynchronous HTTP/REST Services with JMeter
Although I have been using JMeter for stress- and load-testing of web applications a good few times it took us a while to figure out how to test asynchronous HTTP/REST based services with the tool. With us I mean a fellow programmer – Holger Staudacher, I have the honor to…