Archive

Author Archive

No more development, TDD begins with MoreUnit

December 25th, 2011
Adrian Elsener

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. read more

 

Agile, Java, Test Driven Development , , , , , , , ,

Get bytes from ByteBuffer

December 6th, 2011
Adrian Elsener

Here I will show how to get bytes from a ByteBuffer. This isn’t as simple as it sounds. read more

 

Java ,

Mockito – ArgumentMatcher vs ArgumentCaptor

November 25th, 2011
Adrian Elsener

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 argument matches or not.
read more

 

Java, Test Driven Development , , ,

Java 7 is out now

July 29th, 2011
Adrian Elsener

Have you seen. Java 7 is now available on oracles web site.

http://www.oracle.com/technetwork/java/javase/downloads

 

Java

Variable prefixes

February 26th, 2011
Adrian Elsener

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. read more

 

Methodology , ,

Epia goes 2 VirtualBox

December 4th, 2010
Adrian Elsener

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.
read more

 

Hardware, Linux , , , ,

Google Collections

September 26th, 2010
Adrian Elsener

Why should we leave apache common collection?
There are several reasons to change the collections framework.
Since the apache collections should be backward compatible it would not be possible to change to a actual Java version. It would be necessary to change to another collection framework (or write all the stuff by yourself).
There are several projects which created a collections framework by themselves or took the apache collection library and upgraded it with generics.
Guava is a project like the apache commons. Since a few weeks the Google collection project is now in the guava project integrated.
I just will take a view to the collection package in the guava library.
What is in the guava-collection?
Helper classes for:

  • Lists, Sets Maps
  • New collection types
  • New immutables
  • Helpers for Iterator
  • read more

     

    google, Java , , ,

    VI like editing in eclipse

    August 25th, 2010
    Adrian Elsener

    Since a few days I’m using a plugin in eclipse which allows vi like editing. It’s called vrapper and can be found under http://vrapper.sourceforge.net. It is a very good light weight alternative to commercial vi plugins. In my opinion there are not more disadvantages as in other vi plugins.
    Sometimes it has hangers, this means it does not fall back to the main state instead it hangs in any command mode. In this rare cases normally helps to restart the plugin with the icon in eclipse.
    The installation is very simple, only add the stable update site (http://vrapper.sourceforge.net/update-site/stable). Or if not possible to use the update site just download the file from http://sourceforge.net/projects/vrapper/files/, just copy the files into the plugins directory ;) .

    If you like to use vi commands look in and check it out.

     

    Java , , , ,

    Obscure reactions within terminal client

    July 30th, 2010
    Adrian Elsener

    Since we use the new terminal client from microsoft we register sometimes obscure reactions. For example: program flipping while pressing the tab key solo, get the dialog which is shown normally pressing ‘Ctr-Alt-Del’ while pressing the delete key solo.
    read more

     

    Windows , , , , , ,

    Multiscreen with microsoft terminal client

    July 28th, 2010
    Adrian Elsener

    Since a few months I’m working in a new project where we have remote PC’s for developing. Since they updated the clients from Windows XP SP1 to SP3 we we have the new remote desktop client. Now it’s possible to show the terminal client on two monitors (or a monitor with a resolution over 1600×1200). We just had to do the following:

    1. create a Shortcut to mstsc.exe
    2. add as params
      • /w:2560 (The screen witdth)
      • /h:1024 (The screen height)
      • /v:hostname

    The link will look like this: mstsc.exe /w:2560 /h:1024 /v:hostname
    Our expirience was it works not bad. The only thing we noticed was, the client needs more power.

     

    Windows , , , , ,