September 30, 2009

Little android

Yesterday evening I went to my mobile provider and changed some parts of my current contract with them. Reason for this was that I wanted to pick up a new mobile phone, the HTC Magic featuring the operating system Google Android.

I took this step because I've tweaked and enhanced my previous phone up to the point where it cannot improve anymore. And I was really pushing it to the limits with a load of custom applications for my personal usage patterns (custom alarm/scheduler/note-taking/profile applications, completely customized main interface, etc.). But with my increased usage it also became more unstable, probably because of the large amount of data not because the custom applications. In the last few weeks I almost had to reboot it daily as it began to lock up when sending SMS.

Since I wanted to keep the possibilities of customisation and easy application development, Android mobile phones have already been on my radar for quite some time. Also the tight integration of enhanced management capabilities with the Google applications has been something which raised my interest. Yes there is the point of mistrust to Google because of its information-harvesting behaviour, but for now I'm willing to take it. But I'll stay careful.

Since yesterday evening I've been busy investigating applications and addons which get me back to at least the point of productivity where I've been with my old phone and I'm quite near now I think. The most difficult part has been (and is still, as I'm having a SIM card from the first generation with many limitations, eg. 8-char contact names) to transfer my contacts and other phone data to the new device.

Until now I'm quite happy but I'll still have to check back to the store for some advanced questions (regarding insurance and details of my contract) and maybe an exchange of my SIM card.

Vintage continued

Yesterday the vintage from last week was continued and finished for this year. As everytime we started at 8am. Again, this time we were lucky with the weather and altough we were less people than last time, we finished earlier with more lines harvested.

Bunny was also with us. Since he was too small to help us with clipping the grapes, he decided to supervise us from an elevated spot. After the hard work later on he decided to say goodbye to the rest of the day :)

September 27, 2009

Walking freely

Yesterday I began leaving off the ankle stabilization I've been wearing for quite some time now. Walking without artifical help now feels very strange again. But what's more irritating is that many of the tendons and ligaments in my foot are now shortened and I have a very limited field of freedom compared to my healthy foot.

I hope that by leaving away the stabilization these shortened ligaments will be expanded again. But again this will take time and until then I have to take care not to overwork them or I'll be risking to rip them again before they are flexible enough again.

Btw.: Thanks Ellla for the ultra-short-term invitation to your self-made Oktoberfest yesterday. Saved my evening and lifted my mood :)

September 22, 2009

Started into the next vacation block

Today my next two weeks of vacation started. It's on Tuesday from now on because I aligned my vacation schedule with my companies sprints. That's better now because I'm not absent any more on the Sprint demo and retrospective of the sprint I've been present and also do not have to spend a day with demo and retro of a sprint where I haven't been present at all.

On this first vacation day I've been helping with the vintage of some relatives almost all day. Luckilly for us the weather today and in the last few days has been very good so that today we did not have to work in mud and dirt but instead had to put off our jackets because the temperatures were that high. And with vintage comes every time free catering :)

September 21, 2009

Syntax highlighting of code examples in Movable Type

Another small change I did to my blog recently: enhancing the layout of code-example blocks and adding syntax highlighting to them. As this has been no big deal but still involved some tricky parts I'm documenting my results for the interested audience.

First start with downloading the code prettify javascript module from the google-code-prettify project page. This is a javascript module which allows to dynamically add syntax highlighting to <pre> or <code> tags in your webpages which are marked with the attribute class="prettyprint". Movable Type allows very easy creation of <code>-blocks with its Markdown-syntax for code blocks. Since these are not identified with the needed class-attribute we have to implement a workaround but more on that shortly.

From the downloaded package I took the files prettify.css and prettify.js. Open the file prettify.js and add the following code at the bottom of the file:

function prettifyCodeTags() {
  var codes=document.getElementsByTagName('code');
  for (var i=0;i<codes.length;i++){
    codes[i].className = "prettyprint " + codes[i].className;

This is now the code which parses all the <code>-tags on the page and adds the class "prettyprint" to each tag. It is neccessary to enable the syntax highlighting without modifying the highlighting-code itself which would be much more difficult.

The next step is to put these two files on the website so that they can be included by the other files. I have created two index templates containing the contents of those files for that reason but if you just upload the files to your webpage that's fine too I guess.

Now all templates which could include <code>-sections have to be modified to call the prettifying-JavaScript-function. To include the files add following lines to all appropiate header-sections in your templates:

<link href="prettify.css" type="text/css" rel="stylesheet" />
<script type="text/javascript" src="prettify.js"></script>

Finally this modification to the <body>-tags in the templates enables the syntax highlighting upon the onLoad()-event of the webpage which occours when the page has finished loading.

<body onload="prettifyCodeTags()">

That's it. If you republish your site now all code-blocks should be syntax-highlighted automatically. Combined with the easy creation of code-blocks with the Markdown-Format available in Movable Type it cannot get much easier I guess.

Thanks Google for this little module :)

MSN Live Blog Trackbacks, sure! Uhm, wait...

For the second time now I tried to use the trackback-link on a MSN Live Blog posting which is offered on the bottom of each entry. And for the second time I got a

Ping '(entry-url).trak' failed: Blog does not allow Trackbacks

Is this a common issue with MSN blogs that trackbacks are offered but not accepted if used? Or is it some sort of security or configuration issue that it's just me who is not allowed to trackback? At least its not a new issue as others have already stumbled over this problem a long time ago.

September 20, 2009

Java language pitfalls

A recent blog entry posted in Argonauts blog deals with a C# codepiece which is valid at the first look and even compiles cleanly but failes gracefully with a runtime exception when executed.

Argo shows the C# code for his example but (as he also mentions) the same code can be used in a Java example. The following class hirarchy...

class BaseType {

class SubTypeA : BaseType {

class SubTypeA : BaseType {

looks innocent so far. But if it is used the following way

public static void main(String[] args) {
  BaseType[] baseArray = new SubTypeA[3];

  baseArray[0] = new BaseType();
  baseArray[1] = new SubTypeA();
  baseArray[2] = new SubTypeB();

things get interesting. The code compiles without any problems (as in C#) but when executed, one is faced with an java.lang.ArrayStoreException. The cause for this is burried in the Java Language Specification 4.6 (thanks for the hint in the posts comments which saved me some searching). Upon compilation the type of the array is BaseType and after that it gets the SubTypeA-array assigned. The compiler does not know at this position that it would have to re-type the array it is assigning to to avoid the problems lying ahead. That's why arrays are also checking their assigned objects at runtime and cause this exception if something invalid occours (as specified in JLS 4.7).

I think that this problem would be solvable in Java, C# and most other languages which treat arrays the same way. But I also think that this would open a pandoras box ful of problems and complexity arising from this new constraint just for this specific issue. And personally I think this issue is not a common one and appears just in border-cases so that most developers can deal with it for now. Nevertheless I also think, this issue can be solved, it just may be too late for Java and C#.

September 19, 2009

Hacking my LCD TV

Update 2011-02-18: The other wiki site seems to have been shut down by LG. But there is a similar project OpenLGTV which contains the same information on this page.

Update 2009-12-06: Meanwhile there's a cleaner wiki-page available here which contains much more details, screenshots and warnings of course. Go there for the most up-to-date information on how to activate your USB port on your LG TV, what sound and video formats are supported and how to sort out some playback problems with movies.

As I've already mentioned I have purchased a new LCD TV some time ago. Its an LG 37-LF 2510. I've been quite satisfied with it and it's quality but when I read in the manual that the USB connector on the backside is only for updates and not for connecting storage devices my interest was awakened by this fact. I looked in the internet for updates to get the latest firmware on my TV and found this forum thread.

In this thread I read about the possibility to unlock DivX/XVid support on my USB connector by setting the right property in the service-menu. Of course I was sold by this immediately.

Just for reference I'm documenting the whole process here, how I enabled DivX on my TV.

  1. entered the Expert menu to check for the version of my firmware (enter the menu, just select! the Options entry and press FAV seven times)
  2. as I got FW 3.24.00 I had to downgrade to 3.15 first before the service menu would be available
  3. downloaded firmware 3.15 for LG LH series (mirror), put the contained folder LG_DTV on a USB stick and plugged it into the TV
  4. entered the Expert menu again, selected the entry for version 3.15 and started the downgrade by pressing OK
  5. after the successful downgrade, I entered the service menu by pressing the two OK buttons on the remote and the TV for 5 seconds at the same time, the PIN for the following lock is 0000
  6. now in the service menu go to Option 3 and set JPEG/MP3 to 1 and DivX/XVid to HD
  7. leave the menu, voi'la

Now the USB port on the backside allowed me to play back DivX and XVid movies :) One backdraw was that the menus looked a bit shaby to me now so I again upgraded my firmware to 3.37 (3.67 is the current version. Beware, service menu code is changed to 0413). Upgrades don't reset the DivX settings (for now) so this was safe as I could downgrade at any time again via the Expert menu if it would be necessary.

If you're trying this on your own, be sure to check the thread above for further information and the correct and most up-to-date firmware versions. According to the instructions in this forum thread the firmware and procedure also works for following models (and their respective xx10 versions, as I've got): 32LF2500 37LF2500 42LF2500
19LH2000 22LH2000 26LH2000 32LH2000 37LH2000 42LH2000
32LH3000 37LH3000 42LH3000 47LH3000
32LH4000 37LH4000 42LH4000 47LH4000
32LH5000 37LH5000 42LH5000 47LH5000
32LH7000 37LH7000 42LH7000 47LH7000
19LU4000 22LU4000 26LU4000
19LU5000 22LU5000 26LU5000

Reanimation of dead laptop

Yesterday noon the girlfriend of my brother called me on my mobile phone telling me that her laptop computer died. At first I thought, it would be no big problem. Plug in a Windows CD and run a repair phase on the computer should be the last thing to do to bring it back to working condition. Oh boy, how I underestimated the problem...

Quite soon after I had my first looks into the issue, apparently some broken driver file which is loaded about two seconds after the Windows startup screen and caused the laptop to reboot over and over, the first signs of the complexity of the problem became visible. When all my previous tries failed and I wanted to start a Windows-CD repair it didn't find any harddisks to repair. It has never happened to me before that Windows was unable to locate the harddisks, so I've been very puzzled.

When I booted a Linux-Live-CD the harddisk was visible and the NTFS-filesystem was accessible, so there was no problem on this side of the issue. It took me several attempts and investigation on the internet to finally realize, that it was the SATA-controller of this laptop which is not supported by Windows versions until Vista. And without access to the disk from windows, I couldn't chkdsk it, install a new copy of windows or do something else from a Windows-like environment.

I tried a lot of different aproaches after this point. Loading additional drivers during Windows CD startup, live-CD with BartPE builder, live-CD with UBCD4CD, both with and without XP SP3 slipstreamed, with and without included SATA/RAID and network drivers... Without success, the disk refused to be accessible from Windows. It became quite late in the evening and I decided to continue today.

After some thinking and checking back with her brother I suggested to her this afternoon to try a switchover to Linux, where there were no problems with missing drivers for hardware components. I expected to have to do some convincing but to the contrary, she immediately agreed and wanted to switch over. She was already working with a lot of Linux-ready software (Firefox, Thunderbird, OpenOffice, ...) so a switchover would not be such a big change. She's been very curious of trying to work with Linux and this seemed to be an ideal opportunity.

Well. And that's what we did this evening. Following the backup of the data with a live-CD I installed an Ubuntu 9.04 linux. It went without any issues worth to mention and now the laptop is linuxified and ready again to be used. Setup of Printer and WLAN were the larger ones but these did not stay for long.

The next steps will be to install the remaining applications, copy over the individual settings (eg. Firefox favourites) from the backup and setting up Wine for those applications which have no linux-counterpart. I don't expect any serious obstacles there anymore.

September 17, 2009

DVB-T Cheap Antenna Hack

Simplest possible DVB-T antenna
Simplest possible DVB-T antenna
Originally uploaded by kosi2801

As I've recently purchased a new large LCD TV-set which also has abilities to receive DVB without additional devices I found myself in the need of also having to get a DVB-T antenna. I did a short test-drive with a borrowed antenna from my parents but was not too satisfied. There was a proper signal quality but it was far from what I expected. I'm living in direct line-of-sight from the DVB-T broadcast antenna, which is only a few kilometers away, so I should have an outstanding signal quality. But it was just a bit below average. Stable enough for uninterrupted TV viewing but nevertheless I somehow didn't want to buy an expensive antenna to just reach average signal quality.

So I began researching a bit why there was such a bad receiving performance despite the more-than-ideal conditions. As it turned out, DVB-T antennas which are available in the shops have (of course) been designed to have receiving abilities across the whole DVB-T broadcasting bands (UHF and VHF). But since in each area there are only a few channels used these allround-antennas are not the ideal solution for everyone.

I found several guides how to build a specialized antenna fitting for the used channels in the area but since I'm living in the direct proximity of the broadcaster I did a fast try with a simple setup. Just cut off a piece of thick wire from some I had lying around (according to the measurements I found here) and stuck it directly into the antenna-plug of my TV set. And surprisingly I immediately received the targetted channels with even better performance than with the allround-antenna.

I still want to build a proper antenna with correct shielding but for now this works excellently. And I'm also planning to try making a better performing antenna (a "Doppelquad-Antenne") to improve the reception in border areas. If I find the time to build it, I'll let you know.

September 14, 2009

Unexpected Sprint performance

This Sprint was an unusual one for our team. Firstly most of our team is on vacation and furthermore we're dealing with a project in an area where we have never worked before. Luckilly the project manager for this new project is very helpful and gave us enough assistance that we could handle the planned parts for the project better than we thought.

As of now there should only be minor work left for tomorrow and we expect to be finished with it by tomorrow afternoon which is much better than all our expectations. So today we began with estimation meetings to add some additional work to the current sprint. This is not exactly following Scrum but fits our business needs, boosts our sprint productivity and just does make sense.

I do not know where this excellent productivity originates. One possibility could be that we just overestimated the upcoming work at Sprint-start because we never did something in that direction. Or it could be because the project manager prepared and helped us much more than any other in the past. Admittedly he's much more into the technical stuff then our other project managers. Or it could just be coincidence.

Nevertheless. In my opinion in this sprint I've been much more productive compared to many of the past sprints, except the ones where I've been assigned to another team. I personally think that the reason for my improved performance is that I and a colleague did quite strong and effective Pair Programming. We did that at my computers where my setup allowed us to work on a single screen and computer using two keyboards and mouses. It enabled us to instantly switch the active/passive roles if needed every few seconds. I haven't been that concentrated for quite some time. Also I think if you work together it's the same thing as in sports where you motivate each other.

What I also changed this sprint is that I tried to manage the tasks I take over with Eclise Mylyn. When I started with it it was not very comfortable but after some time, I think one or two days, I got used to it and development became more fluent and I was able to better focus to the task at hand. What helped me with the start was reading some introductory literature like the Mylyn 2.0 Tutorial (still highly relevant even if Mylyn is already at version 3.2) and watching the Mylyn 3.0 video presentation by Mik Kersten. My experiences with Mylyn will be content of another posting some time in the future. Just two things I think which are very important: Create mylyn tasks for issues or other workable topics as soon as they cross your mind and try to keep them focussed and small, maybe so that they can be done in not more than two to three hours. You can group them to larger tasks later.

I'm very curious how the feedback after this sprint from the project managers and development leaders will be and also from the other members of my team. I also hope, that we can maintain a bit of the effectivity from this sprint in the future.

September 11, 2009

Meeting old friends

Today our company celebrated its anniversary. It was moved to this date from another date because of bad wheter back that time. Well, it hasn't been better today. It started to rain quite strong at about 3pm and went on with lighter rain into the evening.

For this anniversary our company even invited all ex-employees and people which are connected to it. Doesn't matter if our company had set them free or if they left on their own, everyone (from whom we could somehow acquire contact information) was invited. And as it turned out, quite a lot of the people who worked at our company some time in the past showed up.

It's always a great pleasure for me to meet my former work colleagues and long-unmet friends and exchange thoughts and experiences with them. I get a peek on what work they are busy with, how they work and what problems or chances they are faced with. And most of the time I can be sure, that work is almost the same in most companies and they all face the same problems and issues.

I also met my former boss who way back in time was the responsible person to have the final decision if I would get the job at the company or not. And I'm happy that he agreed. Altough he is not employed in our company anymore for years now, he is still some sort of motivation and acts as a model for me. I'm impressed how he managed to do what he has done, how he built up the connections he has and just how he seems to be successful with most of the things he touches. And when I talk to him I always get peeks into the other world of our business, the management and organisation world. The one, where things are much more volatile and political than in my developer-world.

I've always been interested in the management of projects or teams but until now I only managed to get small chances to get a deeper insight here and there. This may or may not be connected to my interest that I do not want to loose the connection to the hand-on engineering and development of software. And I have the opinion that when someone is managing a team or project this person should focus solely on this task and help the team by removing all obstacles for them but he should not join the development of software itself actively. But it's always been a tempting idea in my head...

Know your frameworks when developing software

In the last few weeks I've got the chance to look into the sourcecode in a lot of different modules of the product our department is working on. The more code I had a look at the more a certain insight was forming in my head. What I saw when I looked at the different parts of the sourcecode from a lot of different people is, that it's cruical for the maintainability of code to know the advantages and possibilities of the frameworks you're working with. Otherwise you're going to reinvent the wheel over and over again. And I recognized many different wheels in this code.

We're working with Java here and among our used frameworks is also the Apache Commons. It's a framework which greatly eases the solving of common problems every Java developer faces every day. To give examples I'll focus on working with collections here. The Java framework itself has already some convenience methods available when working with Collection classes in the their generic interface classes (like Collection, List, Set or Map) but the Commons Collections Classes provides further methods which cover many day-to-day operations with their xyzUtil classes (see CollectionUtils or ListUtils for examples).

A lot of the operations I came across in our code deal with creation and manipulation of different collections, transforming from/to arrays, intersecting or summing them and so on. Lots of loops and different ways to solve always-repeating problems. With the utility-classes and methods from the frameworks we're using a lot of these sourcecode-parts can be reduced and simplified from up to a few dozend lines to just a few ones or in a lot of cases even a single line.

Not only does this reduction aid the readability and comprehensibility of the code it also makes it more robust as most of the framework-methods are already for example null-safe and thus take the burden of null-checks from the developer. And less code is easier maintainable than endless pages of difficult logic. Of course, the usage of frameworks also requires the developers who get at it later on to have at least a little knowledge of these but the invested time to get familiar with the framework almost always pays off manifold.

PS: Another extremely useful utility class in the Apache Commons is the StringUtils class. Just have a look at the impressive convenience methods in its interface and I bet there are many methods in there which you immediately could use at some places of your code.

September 10, 2009

Experiences with optimized Firefox builds

I'm running Firefox on all my computers. And I have a habbit of collecting lots of tabs for later reading or further actions. Furthermore, a lot of the pages I'm visiting have at least a little bit of JavaScript running. Some of those use scripting quite extensively.

So it was no surprise that over time the oldest of my computers at work, which I use for reading email, was getting slower and slower with Firefox using up to 0.5 GB of the available RAM. Which got paged out to the harddisk a lot, when I also switched back and forth to Outlook and some other applications. It became quite inconvenient to use.

I decided to take action and try the speed- and memory-optimized Firefox-Builds from pigfoot (via Lifehacker). Installation consisted of unpacking the downloaded package (available as self-extracting archive or also as portable version) and copying over my Firefox-Installation (after making a backup of course).

Upon startup the first thing I recognized was the new application icon and startup screen. And it felt just a bit faster, almost unnoticeable. In all other manners it behaved exactly like the original Firefox. But now after having it runnig continuously for some days, which would have made the old Firefox crawling like a disabled snail, it is still running fluently and reacting a lot faster than I expected it.

I'm very satisfied with this build of Firefox and hope, that some of the optimizations somehow make it into the original build. I think many power-users like me would only appreciate that.

One drawback should not stay unmentioned: I do not know, if this version follows the automatic updates from Mozilla. Nevertheless, new versions have to be installed manually after these are available at pigfoot's weblog. But for the improvements I'm experiencing on my stressed computer I'm happy to live with that.

September 7, 2009

Small blog enhancements

Currently I'm trying to make some subtle enhancements to this web presence. If you experience any inconvinience, let me know in the comments.

One very visible change will be the new top box in the sidebar, titled Common, containing all the common stuff which are part of a blog. Like the new About me page. Or a proper tag cloud page, which is not yet visible because of an unknown reason, as it is present in the blogs templates. But I'll sort that out sooner or later.

A new section Similar Entries on each entry's page now lists also blog postings which may be related to the current one. As this is determined by an automatic process I still have to look if it matches my expectations.

Furthermore some tweaks here and there but no changes which are big enough for a separate announcement.

September 6, 2009

Back to a colorful world

Mask too big
Originally uploaded by kosi2801

Yesterday I joined some people in a paintball match at Since I already played a few times (one time here, one time at another company-event) I instantly agreed to participate when I was asked by ellla1981. if I'd like to play.

The match yesterday was quite fun. We've been eight people, split into two teams and I've been the only one who has played before. Altough it had rained the day before, yesterday the weather was fine and the places where completely dried up. There were two fields, a smaller 35x30m and a larger one with 70x30m. We started with some matches on the small one, which had some obstacles and covers, and switched to the greater one with forts and trenches later on.

In the end all of us were a bit exhausted but everyone was happy and would join another event if we manage to organize one in the future.

Bunny also wanted to join us but had to skip this chance when during equipping with the safety masks we found none which fit him. Some more impressions from the event are visible on my flickr-set.

Afterwards I went to a barbecue where I impressed to cook a bit when I emptied my plate which he filled with three chops, two large fried sausages, and a pile of chewabchichis. Added some bread, some salad and a few drinks and this made a nice conclusion of the day.

September 3, 2009

Term (almost) over

Past Monday finally I handed in one of my term papers for the last term. It has been quite a bit of work but it's now over at last. Just in time, so that I can see how the good weather is over and my plans to do some cycling will probably vanish in thin air.

Just one paper left for university to correct if I find the time. Its not mandatory, as the mark in that subject is already a positive one but it could be much better if I didn't disagree with the professor on some topics in that paper. He gives much more importance on form of the paper than on actual content. For example I gave the different work-packages short-names similar to their project phase, but the professor criticized it being not aligned to the "standard"... This standard was mentioned during the course but never stated as the definitive guideline. Oh well...