Month: September 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 🙂


  • 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 🙂

  • 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 🙂

  • 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][1] from the [google-code-prettify][2] project page. This is a javascript module which allows to dynamically add syntax highlighting to

     or  tags in your webpages which are marked with the attribute **class="prettyprint"**. Movable Type allows very easy creation of -blocks with its [Markdown-syntax for code blocks][3]. 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-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 
    -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:
    
        
        
    
    Finally this modification to the 
    -tags in the templates enables the syntax highlighting upon the onLoad()-event of the webpage which occours when the page has finished loading.
    
        
    
    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 :)
    
    [1]: http://google-code-prettify.googlecode.com/files/prettify-small-21-May-2009.zip "Google code prettify module - 21 May 2009"
    [2]: http://code.google.com/p/google-code-prettify/ "Google code: google code prettify"
    [3]: http://daringfireball.net/projects/markdown/syntax#precode "Markdown syntax: Code blocks"
  • 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.

  • 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#.

  • 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.

  • 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.