• Android HTTP POST authentication error with Basic Auth

    In one of my Android apps, a user should be able to push JSON data to the server. Of course this should only be allowed if the user is authorized by his credentials. For simplicity, I decided to use Basic Auth via HTTPS. As I usually do not deal with Connectsions directly, I prefer to…

  • RaspberryPi Weatherstation – The Sensor Station (Part II)

    The second post of this series describes the RasperryPi that is connected to the sensors and used to record the data. Part 1 – Part 2 – Part 3 Hardware As described in the first part, I decided to use sensors from Tinkerforge as they are comparatively cheap, require no soldering, no electrical know how…

  • My first RaspberryPi project: TV-Controlled Weatherstation (Part I)

    Part 1 – Part 2 – Part 3 History For quite some time I’ve been playing with the thought about bying a Raspberry Pi. Yet the biggest issue was: I had no use case for it! I always liked information about the weather – especiallly I wanted to know in the morning how cold it…

  • Tomcat MongoDB Authentication Realm

    Tomcat MongoDB Authentication Realm Tomcat provides a nice and powerful mechanism for authentication by the so called Tomcat Authentication Realms. In the Tomcat Docs, Realms are explained as: A Realm is a “database” of usernames and passwords that identify valid users of a web application (or set of web applications), plus an enumeration of the…

  • A basic Java WebApp example project supporting an xml free Jersey REST config

    RESTful Webservices are an essential and convenient part in current web applications when Information should be exchanged. Additionally the main exchange formats in current webservices are either JSON or XML. So when we want to implement the serverside of a web application using Java and especially REST services, we might end up serializing and deserializing…

  • “Easy going” vs “Taking care”

    Freitag Abend. Heimfahrt in der BOB (BayerischeOberlandBahn). Wochenende here I come! In Bad Tölz (eine Station vor meinem “Zielflughafen”) höre ich “Hausham? Da sind sind im falschen Zug.” (Hätte man vor einer halben Std in Holzkirchen umsteigen müssen). Ich denke mir “Arme Sau – jetzt fährst erst mal wieder zurück – oder du kennst hier…

  • “bad subifd directory” Replacing/removing bad SubIFD

    Handling bad SubIFD entries in photos you want to geo tag / the problem I just converted some of my RAW photos in RawTherapee and polished them in Photoshop CS. Of course I also wanted to GeoTag them (using GeoSetter) before putting the images in my archive. Fortunately, a GPS point was found in my trace…

  • Convert Mercurial repository to Git

    I have converted yet another googlecode Mercurial repository to Git – and as it took me (again) a bit too much time, here is my recipe: Prepare Log into a Linux shell (Windows will hardly work – at least it didn’t work for me). If you don’t have some remote shell, download an Ubuntu VM…

  • How to write useful error messages

    Each programmer has to deal with error mesages in some way. Either we have to check our data (and possibly raise an error/exception) or we are using libraries and have to deal with error messages or exceptions that are raised in these libraries. The purpose of this post is to point out how meaningfull error…

  • An introduction to the Logging framework (a.k.a. System.out.println is evil)

    Motivation One of the first lines a programmer will write in a new language is surely “Hello World”. In Java you can write to the console or to the error stream quite easy with a simple System.out.println(“Hello World”) or System.err.println(“Hello Error”). Great! When the code grows, bugs creep into the code and make live a…