Latest Posts

Learning Grails the hard way: Facebook Authentication

Every now and then I try to explore a new programming language. Last year, I tried Scala, this year, I’m fiddling around with Grails. My first attempt was to try something I already implemented in other languages, like verifying Facebook’s signed_request. It’s fun to see what I tried to get it running and how a short version by a more experienced Groovy coder looks like.
Compare both versions after the break if you like.
Read More

arcadiaCharts public alpha released

The wait has come to an end and it’s quite a relief to finally be able to write about (and promote) something I’ve been involved in my spare time, mainly in 2009 and partly in 2010 as well.
In December 2008 I had the pleasure to meet members of the management board of element5, one of the world’s largest outsourcing partners for the software industry, who were just kicking off a new little project: a charting library for JavaScript and Java. My colleague Oliver created the GWT Canvas project which was used for the rendering and I designed most of the project architecture and laid grounds for the available chart types. Unfortunately I had to reduce my involvement in late 2009 due to other personal projects and more responsibilities in my day job and made way for Joern and Andreas as the current main developers, but I’m still part of the development team and a little proud to see the first alpha come to light.
showcase-salesbar-big
The first public release is an alpha version for testing purposes, so if you’re interested in a flexible, yet easy to use chart library for JavaScript/GWT, have a look at arcadiaCharts.com.

Android Application Development Tips: Pull screenshot with ADB

For some reason, pulling screenshots in the DDMS view in Eclipse doesn’t always work. In that case, the following calls became handy (tested with HTC Hero):
adb pull /dev/graphics/fb0 fb0
dd bs=1920 count=800 if=fb0 of=fb0b
ffmpeg -vframes 1 -vcodec rawvideo -f rawvideo -pix_fmt rgb565 -s 320x480 -i fb0 -f image2 -vcodec png image.png

More examples available at the source.

Android Application Development Tips: ADB server didn't ACK

If you’re working on Windows and have HTC Sync installed, you may run into this error message. I hardly develop under Windows anymore, but since the Android plugin was a little buggy on OSX, I had to. This message drove me nuts and I did a little research: with netstat -o I could see which process ID was occupying the port and with Process Explorer I could see that HTC Sync itself was the culprit. I killed it but this didn’t help until I hindered it completely from auto-starting and restarted my machine afterwards.

GWT 2.1 compilation issues on OSX

Today I experienced a compilation problem with GWT 2.1 and the Maven GWT plugin:

[INFO] Compiling module com.mycompany.platform.crm.ui.gwt.Crm
[INFO]    Validating newly compiled units
[INFO]       [WARN] Warnings in 'jar:file:/Users/myuser/.m2/repository/com/google/gwt/gwt-dev/2.1.0/gwt-dev-2.1.0.jar!/com/google/gwt/dev/jjs/intrinsic/com/google/gwt/lang/Cast.java'
[INFO]          [WARN] Line 29: Referencing field 'java.lang.Object.castableTypeMap': unable to resolve field, expect subsequent failures
[INFO]          [WARN] Line 29: Referencing field 'java.lang.Object.castableTypeMap': unable to resolve field, expect subsequent failures
[INFO]          [WARN] Line 38: Referencing field 'java.lang.Object.castableTypeMap': unable to resolve field, expect subsequent failures
[INFO]          [WARN] Line 38: Referencing field 'java.lang.Object.castableTypeMap': unable to resolve field, expect subsequent failures
[INFO]       [WARN] Warnings in 'jar:file:/Users/myuser/.m2/repository/com/google/gwt/gwt-dev/2.1.0/gwt-dev-2.1.0.jar!/com/google/gwt/dev/jjs/intrinsic/com/google/gwt/lang/Util.java'
[INFO]          [WARN] Line 27: Referencing field 'java.lang.Object.castableTypeMap': unable to resolve field, expect subsequent failures
[INFO]          [WARN] Line 35: Referencing field 'java.lang.Object.castableTypeMap': unable to resolve field, expect subsequent failures
[INFO]       [WARN] Warnings in 'jar:file:/Users/myuser/.m2/repository/com/google/gwt/gwt-user/2.1.0/gwt-user-2.1.0.jar!/com/google/gwt/emul/java/util/Arrays.java'
[INFO]          [WARN] Line 1348: Referencing method 'com.google.gwt.lang.LongLib.compare([D[D)': unable to resolve method, expect subsequent failures
[INFO]          [WARN] Line 1358: Referencing method 'com.google.gwt.lang.LongLib.compare([D[D)': unable to resolve method, expect subsequent failures
[INFO]    [ERROR] An internal compiler exception occurred
[INFO] com.google.gwt.dev.jjs.InternalCompilerException: Unable to locate index method: GWT.isProdMode
[INFO] 	at com.google.gwt.dev.jjs.ast.JProgram.getIndexedMethod(JProgram.java:824)
[INFO] 	at com.google.gwt.dev.jjs.impl.GenerateJavaAST$JavaASTGenerationVisitor.processType(GenerateJavaAST.java:550)
[INFO] 	at com.google.gwt.dev.jjs.impl.GenerateJavaAST.exec(GenerateJavaAST.java:3147)
[INFO] 	at com.google.gwt.dev.jjs.JavaToJavaScriptCompiler.precompile(JavaToJavaScriptCompiler.java:519)
[INFO] 	at com.google.gwt.dev.jjs.JavaScriptCompiler.precompile(JavaScriptCompiler.java:32)
[INFO] 	at com.google.gwt.dev.Precompile.precompile(Precompile.java:545)
[INFO] 	at com.google.gwt.dev.Precompile.precompile(Precompile.java:466)
[INFO] 	at com.google.gwt.dev.Compiler.run(Compiler.java:205)
[INFO] 	at com.google.gwt.dev.Compiler.run(Compiler.java:177)
[INFO] 	at com.google.gwt.dev.Compiler$1.run(Compiler.java:149)
[INFO] 	at com.google.gwt.dev.CompileTaskRunner.doRun(CompileTaskRunner.java:87)
[INFO] 	at com.google.gwt.dev.CompileTaskRunner.runWithAppropriateLogger(CompileTaskRunner.java:81)
[INFO] 	at com.google.gwt.dev.Compiler.main(Compiler.java:156)
[INFO]       [ERROR] at GWT.java(26): final class GWT extends Object
[INFO]          com.google.gwt.dev.jjs.ast.JClassType

I couldn’t really identify the origin of the problem, but scrapping the whole gwt Maven repository subdirectory and redownloading the 2.1.0 dependencies resolved the issue for me.

AirPort Connection Timeout with MacBook Pro

As it seems, there are dozens of other users who experienced a connection timeout using AirPort W-LAN connections on Macs. There are dozens of different solutions described in the forums, I tried plenty of them. From reboot to deleting the WPA2 key from the keyring, nothing worked.
Eventually I tried the following and this worked for me. (Note that I’m using a German installation, the real English translation may be slightly different.)

  1. Go to Mac (the Apple symbol in the top left) -> Location -> Network Settings
  2. Click on the “Airport” entry on the left
  3. Click on the “additional options” button
  4. On the Airport tab, click the “+” button below the “preferred networks” list
  5. Click on the “show networks” button and select your W-LAN from the list
  6. Enter your password

That way, I could connect without problems. It may be coincidence that exactly this way worked, and none else, but maybe there’s really some strange difference.
Let me know if this helps.

Music Tip: Parov Stelar

I got a bit lazy with my code music list to the right. However, I’m currently addicted to the great music of Parov Stelar (bought three albums at once on iTunes recently, sad I didn’t find him earlier), so I thought I could share some videos.
A live example:

(I’d love to have this unfortunately unreleased recording.)
And a studio mix:

Plenty of other tracks are available on YouTube.