This is the blog of Gerd Riesselmann, a freelance software developer from Cologne, Germany. This site contains articles about software development and user interface design in general and object oriented programming in special, covering a set of programming languages from C++ and C# to PHP and Javascript. Additionally, you'll find code snippets and modules for Drupal, the open source content management system powering this site.


Updating HTC Hero ROM on Windows 7 64 bit

I recently tried to update my HTC Hero to version 2.73.405.5 using a Windows 7 64 bit. Unfortunately this didn't work, since I ran into error 170 - "USB Connection lost" - over and over again, either when starting the RUU executable or after switching the phone into bootloader mode. It seems, that the Rom Upgrade Utility simply doesn't work with Windows 7 64 bit.

However, it is supposed to work with Windows XP, so the solution is to use Windows 7' s build in Windows XP compatability mode. Here's how you do it.

Apache Buildr and Scala 2.8

Quick hack: to use Apache Buildr with the lates Scala 2.8 release candidate (RC3 at the time of writing) open up the file /usr/lib/ruby/gems/1.8/gems/buildr-xxx/lib/buildr/scala/compiler.rb and change the DEFAULT_VERSION to DEFAULT_VERSION = '2.8.0.RC3'

This works for Ubuntu 8.04, with Buildr 1.3.5 installed. You will need root or sudo privileges, though.

Identifrac reloaded

Maybe you know identicons: little unique icons generated out of hash values. But maybe you don't know identifracs, which offer the same functionality based upon fractal functions. Identifrac was created back in 2007 by Jesse Dubay, but his site has gone in the meantime. That's why I took his code, updated it, and now released it to the open domain.

Gyro-PHP application framework release

It has been more than two years since my last post. Two very exiting years for me, though. Not only my daughter was born, but also my PHP application framework is now ready to be open-sourced: Gyro-PHP, a PHP application framework.

PHP and UTF-8: A Guide - Announcement

I started to write a guide on using PHP with UTF-8. It's on German, but I plan to translate it within the next couple of days.

A Drupal site (mainly) without programming

Today Comic-Sammlung.Net went online. Well, layout is still to be done, and the functionality sure will increase (there are non-hierarchical relations to be implemented, and user reviews will be integrated, too), but for now its OK (and gives the search engines something to do).

The site contains information about nearly 90.000 German comics, grouped into more than 6.000 comic series and categorized by topic, style, and publisher. The project was realizes in Drupal with (nearly) no special programming, but with sole use of Content Construction Kit and Views module.

Yet another browser! Safari On Windows

As you might have heard, Apple's Safari browser now is available for Windows, too. So there is yet another browser to support for us web developers. Hallelujah!

Unfortunately, the current build seems terribly broken, as the following screenshot shows (Click to enlarge):

Screenshot of this site with Safari Beta for Windows

Apache Xerces' weird error message

For one of my projects I'm using Apache's Xerces C++ XML Parser and run into this strange error:

The primary document entity could not be opened.

Took me a while to figure out that Xerces simply wants to say "File not found" here, because I was was calling parse() with the data to be parsed, while Xerces expects a file name here. Silly me.

However: Here's how to parse an XML string using Xerces SAX parser. you need to use a MemBufInputSource:

When Internet Explorer displays a white page...

.. this may be because of a wrong script tag. Actually, both Internet Explorer 6 and 7 will fail, if you use the script tag like this:

<script type="text/javascript" src="blabla.js" />

IE instead requires an explicit closing tag, like this:

<script type="text/javascript" src="blabla.js"></script>

PS: This is primary a note to myself, since I get trapped by this over and over again...

PHP: Beware of Variables Inside Strings

One of the rather useless discussion among software developers is if to use PHP variable parsing when building string or not. That is if you should write your code like this:

<?php
$value
= 15;
$text = "Value is $value, isn't it?";
?>

Or better like this?

<?php
$value
= 15;
$text = 'Value is ' . $value . ', isn\'t it?';
?>

Well, some claim that the first version, using variables inside strings, is slower, while the others point out the second code is less readable.

A matter of taste, I think, since both readable code and performance are important some way or another.

However, this PHP memory bug gives me the creeps: The first code will not free the memory used until the end of script execution. So you better don't use code like this within loops.