When working with Java and XML there is a number of frameworks that support working with that technology. Furthermore when working with an already working api there must be code in order be able to convert Java objects into XML and vice versa. Using xjc
is an easy way to generate Java classes in order to “talk” XML. Continue reading
Spinning down disks with hdparm
When having a datastorage it’s a good idea to cope with the energy saving settings of your hard discs. Controlling the settings may provide quiter disks, more energy saving disks and disks that spin down when their service is not requested. So they may run a longer time until they fail. Continue reading
Debugging Maven
When developing with maven by default there is no way to debug maven – or a self written maven plugin. This is really nasty when trying to write a plugin and then test the plugin. But there is a simple solution/workaround to do this. Continue reading
Introducing … mobile shell
Trying to access a server when not at home or in office is sometimes really terrific. Having an unstable connection requires reconnects very often. When trying do a setup or a process that should run atomically in best case it is quite impossible. But there is a solution: mosh Continue reading
Checking data consistency – 2 – smartmontools
In order to ensure the consistency of a data storage, a regularly check is recommended. This might be checking a hdd, sdd, usb stick, flash card (sd,cf). In general there is only a basic check by the operating system. This check is insufficient to guarantee no data loss. When using Linux there are some small tools that provide an enhanced check for data consistency. This second part describes the usage of smartmontools. Continue reading
Comparing Serialization Performance
When transmitting data, all the information must be serialized. When Serializing there are two relevant criteria in order to select a suitable format: size and performance. This article compares the efficiency of different serialization formats (Java Serialization, ByteBuffer, Unsafe, Json and Protobuf). Continue reading
Checking data consistency – 1 – badblocks
In order to ensure the consistency of a data storage a regularly check is recommended. This might be checking a hdd, sdd, usb stick, flash card (sd,cf). In general there is only a basic check by the operating system. This check is insufficient to guarantee no data loss. When using Linux there are some small tools that provide an enhanced check for data consistency. This is the first part that describes the usage of badblocks. Continue reading
Setting up a tor node
The last weeks and months all the documents (e.g. by Edward Snowden) delivered the evidence what many people already knew without being able to prove it. There is nothing that may not be surveilled. Continue reading
Backup using rsync
When running a computer system, backing up data normally is an every day task. But for different reasons, often there is no backup. In case setting up a backup would be really really easy, there would be no excude not to set up a backup. Continue reading
Mocking Resources using JUnit @Rule
When writing unit tests in Java there might be the need to access a resource in the class that should be tested. A common way is to mock the resource. But mocking a simple resource is quite easy. This is supported by mocking frameworks like Mockito, EasyMock or PowerMock. It is a good idea in case you want to test a single action on the mocked resource – e.g. returning a value when accessing a map that contains master data. The following exmaple describes mocking a resource using Mockito. But in case there are complex operations on this resource mocking it is going to be really nasty.
Continue reading