Animating views on Android

Note to self: whenever you try to animate a view that is either GONE or has height 0 this will not work the first time. The moment the user touches the screen or an UI update is triggered only then will the animation start. Of course I found this Stack Overflow question about not starting animations, but the view was defined as being VISIBLE. I also explicitly made the view visible in code – just to be sure – but this was not enough.

Spray JSON

So you’re making yet another Scala app and you need to parse or write some data to file/database/webservice. What do you do? If you’re not already inside an (awesome) framework like Play Framework you will probably search “Scala JSON” and find something like Spray JSON. That’s what I did. So then you write: import scalax.io._ import spray.json._ import DefaultJsonProtocol._ val jsonString = largeMapObject.toJson.compactPrint Resource.fromFile("someFile").write(jsonString)(Codec.UTF8) … and you get an exception upon either writing, or parsing this string after it was only partially written.

NewRelic causing OutOfMemoryError in Play Framework app

Today I disabled the NewRelic JVM agent on one of my projects. While the Play Framework server was outputting a ZipOutputStream to a client, the NewRelic agent would for some reason gather massive amounts of data and cause the JVM to Garbage Collect continuously until the app became unresponsive, and finally crashed: Uncaught error from thread [play-akka.actor.default-dispatcher-33] shutting down JVM since 'akka.jvm-exit-on-fatal-error' is enabled for ActorSystem[play] java.lang.OutOfMemoryError: GC overhead limit exceeded Uncaught error from thread [play-scheduler-1] shutting down JVM since 'akka.

[OS X] Linux Open Directory and Mavericks clients: network accounts need GeneratedUID field

It has been quite some time since the last post on Open Directory on this blog, but I wanted to share something i found out about OS X Mavericks as a OD client. Let’s face it: running a non-Apple server for Apple clients is not your ideal, one-click-solution. It is not officially documented and the blogs are sparse, and more importantly: dated. Most how-to’s date back to 2009 or even older.