AuthorAdrian Elsener

Linux Workstation as Router


Since I have some Rasperry PI’s which do not have a WAN connection because they are in an autonomous LAN or just do not have a WLAN module. From time to time I want to do some upgrades. So I need a connection between the LAN containing my PI’s and the WAN.

Configure ssh certificate for password less login


It is not very difficult but every time I want to create and populate an ssh certificate I have to search for it. So I will show how to create and populate an ssh certificate for password less login over ssh. And if we have a look to man page of ssh (see below), it sounds really simple. Just create your key, copy the key to destination and register in authorized_keys. But how to do that in a simple way? Steps to do: create a key: eeelin:~$ ssh-keygen #(Don’t enter a password for password...

Create your own hamcrest matcher


If you are familiar with hamcrest and JUnit the time will come when you have the need to create your own matchers. Creating your own matcher can be as simple as useful. One reason for creating your own matcher could be that your object is not a default object like a String or a Collection. And if you would like to get a more readable version of the assert for the next developer who has to read your test. Let’s make an example. If you have an object with two methods; “getName”...

Easier JUnit testing with hamcrest


Have you ever thought that JUnit assertions are not really readable and do not correspond to natural language? It is a mess that the expected value is the first argument on an assert? This would not be like the spoken language where you would say “assert that this value is equal to this expected one” ? Or have you had tests where the expected value and the value to test were inverted? In this case you have not found an old friend of JUnit called hamcrest.

No more development, TDD begins with MoreUnit


Do you program or do you already TDD? 🙂
If you prefer to do TDD you will love the eclipse plug-in called MoreUnit. It is as simple as powerful. All it does is executing tests from corresponding productive class and makes it very simple to change between them.
Just press Ctrl-J (like Jump) to jump from test to implementing class and the other way. Or press Ctrl-R (like Run) to run the test regardless if you are in the test or the implementation class.

Mockito – ArgumentMatcher vs ArgumentCaptor


Since a few weeks the new mockito release candidate is available. So I think it is the right time to place a new post. Here I will show the differences between ArgumentMatcher and ArgumentCaptor. Most developer will first see the ArgumentMatcher and use it. What can be done with ArgumentCaptor is often not seen. With the sample I will show that an ArgumentMatcher should not be used to fetch arguments. For this work there is the ArgumentCaptor. The Matcher should really be used to check if an...

Variable prefixes


The idea of variable prefixes
The idea of prefixes on variable is “very” old. They are used to tell the developer what kind of variable he is using. The first prefix for example is m_ and the conclusion is this variable is a member. When I learned programming we had to give the developer more information in case of a member. Like the type of it like an integer became m_i.

Epia goes 2 VirtualBox


A few days ago, my epia device gave up it’s live. So I was looking for a temporary alternative to start the harddisk.
Looking back it was very easy to get it run in my desktop, to get the data I’m storing on it. (A little database and some Webservices)
Here you can read how you get an existing OS into your VirtualBox.

Recent Posts