Easy steps for better living with Java

Here are some easy steps I try to do on every Java-project I'm working on. They are based upon what I've seen as major problem sources in different code bases, and should be fairly easy to apply - at least on new code. Tooling The first steps are to enable…

Building Java 8 apps with Gradle

If you try to build your java-app with gradle against JDK8,and you error out on the tests being run, then this is most likely due to Gradle using ASM4.x for test-detection. This has been fixed in Gradle 1.10 by using ASM5-beta to scan for tests, instead of…

Keeping sane in the depth of madness

This last year I've been working on systems that integrate with a master ERP-system over SOAP. As with all thing enterprise, things tends to get a bit messy. Most interactions with the SOAP-interface requires the user to specify a lot of identifactors for other objects. In our system, most of…

Dependency hell in the land of IoC

Using automated dependency injection has made the life of a developer a bit easier, or so it seems for a while. Maybe a bit too easy. In this post I'll describe some of the mess this can lead to, and what you should do to avoid it, or fix it…

Java dependencies

A little python snippet for creating dot-representation of the dependencies in a java app. Let this little baby chew on your target/classes dir and you will get a dot-file on stdout. #!/usr/bin/env python import re import os import sys from os.path import join, basename LIB_REG_…

Rot

I’m quite fascinated by how quickly code rots and becomes a mess, despite the programmers best intentions. A lot could be fixed by testing and and refactoring more often, but it always seems to come second to getting shit done, and does sometimes have unintended effects. For some reason…

Take control over your data - banking

So, banking data is quite interesting. If one could get a hold of your credit card transactions in an easy way, that would be sweet. But, its not that easy. My bank, DNBNor, has a feature that you can download either an excel document, or a CSV formatted dump of…

apache2-mpm-itk and libapache2-mod-wsgi

If you are running Apache 2 with mpm-itk and mod_wsgi on a debian system, you’re a bit out of luck performance wise. From the MPM-ITK documentation: mpm-itk is based on the traditional prefork MPM, which means it’s non-threaded; in short, this means you can run non-thread-aware code…