Category Archives: Software Engineering

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.

Facebook/Flattr/… Clickjacking Examples And How To Avoid It

Facebook’s “Like!” button, the Flattr button and plenty of other widgets work pretty much the same. You either create some IFRAME directly (Facebook non-XFBML method) or include some JavaScript which then injects the IFRAME into your DOM once it’s ready (Facebook XFBML, Flattr). The widgets provide you with some cool social one-click-functionality. That’s nice and easy… unless someone’s planning to mess around with it.

Android Game Development (Day 6)

It took some time until I finally could get back to my little Android game and I must admit that this wasn’t really a “day” I worked on it. Instead, it were multiple, scattered and short sessions where I worked on the collision testing and response code, some effects and UI stuff. It’s simply too hot currently… so bear with me that there’s no cool video this time.

ProjectA - Now with collision testing and explosions

ProjectA - Now with collision testing and explosions

Keep reading below if you’re interested in the recent progress. Comments are welcome! In case you missed it, also don’t forget to read the earlier reports on my steps in Android game development: Steps 1-3, Step 4, Step 5.

Android Game Development (Day 5)

Day #5, Sunday, June 27th.

Here’s the rough concept for timed events I already mentioned in my last posting. It’s working for now, but I’ll do some more tweaks to abstract this even further and make it more flexible.

Android Game Development, Day 5: Timed Events

Android Game Development, Day 5: Timed Events

Android Game Development – Steps 4-5 from Matthias Gall on Vimeo.

Keep reading below if you’re interested in today’s progress. Comments are welcome! In case you missed it, also don’t forget to read the reports on my steps in Android game development: Steps 1-3 and Step 4.

Android Game Development

I’m building rather boring enterprise applications at work and I love creating more appealing things in my spare time, so I do a bit of game development whenever I can. The main problem for a programmer is to get some graphics, but fortunately I have some nice renderings from my old Project E tutorial and the even older Project D game by sechsta sinn on my harddisk that I could put into use (all done by my friend and favorite artist Martin Ernst, btw.).

This is what I managed to do in three after work sessions so far, if you’re interested in the details, continue reading after the video.

Android Game Development – Steps 1-3 from Matthias Gall on Vimeo.