LaCie LaCinema Black Max

10. Februar 2009

I must admit that I’m not an owner of the LaCie LaCinema Black Max but I’m a proud owner of the popcorn hour A110. The popcorn hour A110 is a small media box which plays almost every video and audio format on the market. The media box includes portal services for youtube, google video, shoutcast and many more platforms. Although I’m very pleased with this box I want to present to you the latest news about LaCie LaCinema Black Max.

The LaCinema Black Max is shipped with the video codecs for MPEG-1, MPEG-2, MPEG-4, DIVX, XVID, H.264, MKV and WMV9 HD and is able to play video material up to 1.920 x 1.080p. VOB- or IFO structures without protection can be played directly on the media box without converting. The LaCinema Black Max is also able to upscale videos with less resolution up to 1080i.

The most exciting feature of the LaCinema is the integrated DVB-T module. The DVB-T module contains an integrated program guide which allows to use the black max as a video recorder with time shifting.

LaCinema supports the following audio codecs: MP3, WMA, AAC, OGG, AC3, MP4 and WAV. Pictures in the format JPEG, PNG, GIF, BMP and TIF can be directly viewed on the screen via the integrated photo viewer.

Unfortunately the integrated DVB-T module makes the LaCinema quite an expensive product. The current list prices for the LaCinema with 500 GB hard disk are about 650 swiss francs. This makes the LaCinema about 200 swiss francs more expensive than the popcorn hour A110 with integrated samsung F1 hard disk with 1 TB disk space.

But for those who want an all-in-one player and recorder which supports the latest and greatest high definition codecs the LaCinema Black Max is a “must buy”!

Here are some pictures (copyright by Lacie):

lacinemaBlackMax_1 lacinemaBlackMax_2
lacinemaBlackMax_3 lacinemaBlackMax_4
lacinemaBlackMax_5  

planetgeek.ch to the rescue

9. Februar 2009

As some of you may already have noticed some of my blog entries are now cross-posted on tracelight.ch and planetgeek.ch. A few weeks ago we decided to start a new blog project called planetgeek.ch. The goal of this blog is to provide geeky information to all ICT interested people. The language of the blog is English. We hope that we can provide some valuable and interesting information to you guys (both male and female!) out there in the world.

Please have a look and join us on planetgeek.ch! I can especially recommend the page “Ask a geek”!

Part I: Mimic SynchronizationContext behaviour on .NET CF

8. Februar 2009

Before I got into the details of the problem I want to briefly describe what the SynchronizationContext class really does and what it’s main purpose really is in the first part of the article. From that perspective I’m going to show how the basic functionality of the SynchronizationContext class can be implemented for the .NET compact framework in the second part of the article..

The msdn library documentation states:

Provides the basic functionality for propagating a synchronization context in various synchronization models.

I must admit the first time when I read this definition I didn’t really get the key point behind the SynchronizationContext class. Detailed look into the implementation of SynchronizationContext and its base classes provided me the following information:

The SynchronizationContext class is a class belonging to the System.Threading namespace. The SynchronizationContext provides a model to make the communication between threads easier and more robust especially if multiple threading contexts/apartments such as “UI threading context” etc. are present.

To get a deeper understanding of the definition above I want to give you a short example. Imagine if you have a separate thread performing an intense calculation such as calculating the n-th Fibonacci number. When the separate thread has finished its long running operation you want to display the n-th Fibonacci number on a user interface. Normally (without using the SynchronizationContext class) you would need to do the following (or at least something similar):

private delegate void FibonacciResultDelegate(long fibonacciResult);
 
private void MethodCalledByTheFibonacciThread(long fibonacciNumber)
{
   if( fibonacciResultTextBox.InvokeRequired)
   {
      FibonacciResultDelegate fibonacciDelegate =
         MethodCalledByTheFibonacciThread;
      fibonacciDelegate.Invoke(this, new object[] { fibonacciNumber });
      return;
   }
   fibonacciResultTextBox.Text = fibonacciNumber.ToString();
}


With the SynchronizationContext class we can invoke delegates in the context of a different thread. For the example above we could do the following:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
public class FibonacciPresenter
    {
        private readonly Thread workerThread;
 
        private readonly SynchronizationContext context;
 
        private readonly IFibonacciView fibonacciView;
 
        public FibonacciWorker(IFibonacciView view)
        {
            fibonacciView = view;
 
            context = SynchronizationContext.Current;
 
            workerThread = new Thread(new ThreadStart(FibonacciCalc));
 
            workerThread.Start();
        }
 
        private void FibonacciCalc()
        {
            long result = CalculateFibonacciNumber( ... );
            context.Post(new SendOrPostCallback(delegate(object state)
            {
               fibonacciView.DisplayResult(result);
            }), null);
        }
 
        // details omitted...
    }

In code line 13 we can see how the SynchronizationContext is retrieved. The SynchronizationContex.Current property points to the SynchronizationContext of the thread where the FibonacciWorker was created (in my example the FibonacciWorker would be created in a control). Then the FibonacciCalc method can post (asynchronous) or send (synchronous) a SendOrPostCallback delegate containing the “job” which needs to be marshaled over the SynchronizationContext. Therefore the line fibonacciView.DisplayResult(result) would be invoked on the UI thread which allows us to remove the “invoke required” code parts and directly set the fibonacci calculation result to the textbox text property.

We can briefly summarize that the purpose of the SynchronizationContext is to post (asynchronous) or send (synchronous) SendOrPostCallback delegates in the correct threading context which simplifies marshaling.

Code reviewing

2. Februar 2009

whatthefucks

Windows Mobile 6.5 information leaked

24. Januar 2009

We don’t have to wait for the official announcements of Windows Mobile 6.5 to get the latest news about the mobile operating system. Yesterday a beta version of Windows Mobile 6.5 hast been leaked to the public which everyone can install on his qtek 9090.

Let me describe what is new in Windows Mobile 6.5 in counterpart to the Windows Mobile 6.1:

  • No finger friendly user interface
  • No multi touch
  • Internet Explorer Mobile 6 with flash support
  • Sliding Panels
  • Scroll without scrollbars
  • New screen lock
  • New applications such as market player, my phone

You can have a quick look at Windows Mobile 6.5 in the following two videos:

As you can see Windows Mobile 6.5 is a major disappointment. Hopefully Windows Mobile 7 will knock us out of the chair!

Rumors about Windows Mobile 6.5

21. Januar 2009

There are rumors going around on the internet about the release of windows mobile 6.5. Some say that windows mobile 6.5 is never going to be released but other strongly believe that the new windows mobile 6.5 will be released soon.

Not long ago people were blogging on the internet that Microsoft is probably going to focus on windows 7 and it’s integration into the newest mobile devices. But that has not been approved by Microsoft.

And today some screenshots about windows mobile 6.5 came up out of never on the following blog:

http://wmpoweruser.com/?p=2536

Nobody can approve if these screenshots are real or just another horrible fake. We are staying put and watching the latest news on this topic. We’ll keep you guys posted!

Delegate.DynamicInvoke for .NET Compact Framework

18. Januar 2009

As you might already know I’m a certified windows mobile application developer. My speciality is hybrid application development for applications which target both the full .NET framework platform and also the mobile platform. Of course nobody wants to write the same code for each platform again so you have to come up with some tricks and solutions to overcome some limitations on the compact framework.

One such limitation is the missing Delegate.DynamicInvoke method. The Delegate.DynamicInvoke method allows to dynamically invoke delegates late-bound. That means normally when you are invoking a method via a delegate you actually need to have knowledge about the target type where the delegate gets executed. With Delegate.DynamicInvoke this is not longer necessary. The beauty of this is, that you can have base code like the following:

// Elsewhere
RegisterDelegate(SomeClass.SomeMethod);
RegisterDelegate(SomeOtherClass.SomeOtherMethod);
FireForAllWith(1, 2, 3, 4);
 
// Code in some utility
public void FireForAllWith(params object[] args)
{
   someGenericCollection.ForEach(dlg => dlg.DynamicInvoke(args));
}
public void RegisterDelegate(Delegate dlg)
{
   someGenericCollection.Add(dlg);
}

But if you try to use Delegate.DynamicInvoke in the compact framework your infrastructure code will not compile because for some obscure reasons microsoft decided not to implement Delegate.DynamicInvoke for .NET compact framework. Here is my solution to this problem:

I created an extension method for the delegate class with the name DynamicInvoke. This extension method uses a small trick to implement the DynamicInvoke behaviour of the full framework platform.

    public static class DelegateExtensions
    {
        public static object DynamicInvoke(this Delegate dlg, params object[] args)
        {
            return dlg.Method.Invoke(dlg.Target, BindingFlags.Default, null, args, null);
        }
    }

As you can see I’m using the delegates method property which returns a MethodInfo object. On the MethodInfo I’m able to call Invoke and pass the arguments to the bound method. But the problem here is that Invoke requires a target where the method gets executed. This is where the delegates target property comes into play. That’s the whole magic and you’re able to dynamically invoke late bound methods via Delegate.DynamicInvoke.

Download DelegateExtensions for the source code.

Heroes Volume Three

2. Januar 2009

I wanted to write a review about Heroes Volume Three on my own blog. But after watching the season three I was so disappointed I was looking around for other peoples comments about the season three. I actually found two quotes that really summarizes my point of view! With the publication of these quotes on my blog I also want to thank the writers of these quotes for their mind-blowing way of expresing their opinions :D

Attention this may contain spoilers!

jc in chicago said,

October 7th, 2008 

The season has major suckage…but the writers are best with surprises and ironies.

FAST FORWARDS
I’m tired of premonition images (and, oh, super lame nondescript paintings) that tell me what “could” or “will” happen. And I’m tired of timelines and fixes to them. And after New York was saved at the end of Season 1, we still have Nathan on track to the presidency, which fulfills the initial vision of the future, which was supposedly mended.

So things are inevitable, images are re-interpetable, and the past/present/future can be tinkered with. THEN WHY BOTHER with the timescapes? If the story’s supposed to be in four dimensions, fine–I love a good mind*#$@ once in a while. Just don’t use it as the principle plot device.

IT’S THE PEOPLE, STUPID!
The series painstakingly introduced us to PEOPLE but it’s uprooted the characters and immersed them in a boring solution of All Powers All The Time. Peter was a compassionate home health care worker. Tom was a cop trying to hold his marriage together. Suresh was a son trying to either walk in the legacy of his father or solve the mystery his father had hidden. See all the relationships? There are none–not even between the main characters (well, Ando & Hiro). You even have Mrs. Petrelli proclaiming her family ties to Sylar, and is there any warmth to it? The air got chillier at that moment than when Nikki-TRiplet freeze-dried a rose in her hands. Does anyone agree with me, the triplet story is lame and so is keeping this mouth-breathing actress on board?

THINGS I DON’T HATE
I’m not too keen on all our heroes becoming bad guys, and vise versa. There may be a balance in the universe–some say yin/yang. But yin should always be yin and don’t you dare mess with my yang.

Oddly enough, the character signal we got from Tom forcing the Company members identities from Mrs. Petrelli–and she actually said it to him, was that if he did this, he would become what he hated (his father). This should have been the first hero to “go dark” but no, he’s off in Africa talking to turtles.

I insist that my interpretation of Tom’s wilderness scenario is better than what the writers have done. My take was that Tom had been thrown into a dreamscape prison like his father, or he, or Peter could create.

I like that Peter has become Sylar, and I like how it happened (Hey Vic, he wanted Sylar’s innate power ‘to understand how things work,’ so that he could “un-unravel” the timeline.)

I saw Peter going dark back when he confronted Sylar, in the episode where Sylar pinned him and said “This is the part when most people scream.” Once Peter got his game on, his face became ruthless and you could see he was manifesting Sylar’s lust for power….I thought for sure Peter was going to “become” Sylar and would himself fulfill the scene where Hiro saw someone kill Isaac. Another case where MY story was better than the real one. :-)

HOW THE FUTURE IS FIXED
Peter somehow acquires the powers of the Haitan. He also acquires the powers of Daphne. He has Hiro’s powers already. Now he combines these and runs all over the planet and all over time making all the NBC viewers *forget* what they’ve seen of Season 3. See? No muss, no fuss, no can-opener craniums.

Ergo Proxy said,

October 21st, 2008 

Well, you know…

I’ve officially given up on this show… it’s drowning and I don’t like to see good people get dragged through hell and drown…

This show is an example to everyone just how horrible it can become.

Heroes is suffering from the dumbest writers in the history of writers…

They’ve dealt with story lines in the most amateuristic ways, trying to fool the viewers into forgetting all the past errors, by simply not mentioning them.
Like copy cat girl… The grandmother Uhura, how Parkmans dad ever got out of that mind trap he put him there… so many things have become so stupid, bordering idiotic, that I am just waiting to see the headline “HEROES CANCELLED”.

This whole new idea of “genetically enhanced humans” just makes me sick to my stomach… it’s become more 4400 than Heroes… suddenly it’s just lost its own identity…

It went from amazing to ridicules to appalling…

This show is hurting the actors… Sylar is a joke, Hiro is a pain in the neck… you’d think he’d mature… and what the hell was that killing Ando scene for?

New characters coming in and old ones being forgotten… such bad writing..

So, we’re not talking about genetically enhanced humans with supernatural powers (X-Men and 4400 comes to mind, been there done that)

In so many ways the show is trying to wipe out the existence of it’s first season.

Dr. Suresh was the voice the morality the philosophy in the show in it’s first season…

The entire idea of EVOLUTION (Season 1) was what made it special… it was unique… now… it’s a discounted version of an idea that died a horrible death…

Heroes has become the perfect example to use in lectures and seminars on WHAT NEVER TO DO in this business.

This show is dead to me…

Happy new year

31. Dezember 2008

I wish everyone of my blog readers a happy new years eve and a really good start into the year 2009. May all your wishes, hopes and dreams come true! And hopefully you are still one of my blog readers in the year 2009 ;)

happynewyear

Enjoy the party, don’t drink too much. See you soon in 2009!

Programming quotes

30. Dezember 2008

I discovered a cool web page which has a collection of programming quotes on it. You’ll find there quote diamonds like the following:

“Debugging is twice as hard as writing the code in the first place. Therefore, if you write the code as cleverly as possible, you are, by definition, not smart enough to debug it.”

- Brian Kernighan

or

“There are only two kinds of languages: the ones people complain about and the ones nobody uses.”

- Bjarne Stroustrup

http://www.hackification.com/2008/12/23/a-double-handful-of-programming-quotes/