A couple of days using OpenSuse

KDE is beautiful, no doubt of that and I like the development tools they have a some applications but... In terms of performance I still prefer Gnome. And in terms of "stability" I prefer Ubuntu (it doesn't means that Suse is not stable!).
Well, the guys at Suse are making an impressive work (and very necessary) on tools like Yast2, developing graphical tools for everything but the performance could be improved. I'm happy supporting OpenSuse and it is being great having the last Mono and MonoDevelop versions, it is really productive for my projects.
So far, what I've learned as a Suse user is:

  • The system doesn't freeze, but sometimes it gets stuck for few seconds and you may think it is frozen... so don't restart it !
  • Suse developers want you to use their graphical tool so don't skip them touching files manually !
  • If you want to improve the performance... upgrade the packages!, use Gnome!
  • If you download a .rpm package (ie, monodevelop 0.14) don't open it with the "package installer" that you will see on the list (it doesn't work for me and nor for some friends), rather open the .rpm packages by typing "zen-intaller" in the applications search box

There is only one thing I hate on KDE: when you click on an application icon, the icon animation starts but the application never starts and you never get any error message. It sounds like somebody is catching an exception improperly !! 🙂

Welcome Open Suse 10.2

S8000349.JPG After 1 year using Mandrake, 5 years using Debian and about 2 using Ubuntu I decided to jump to Open Suse, having both systems in my laptop. The main reason is that I don't have much time to struggle with packages and versions and I do want to get the latest versions of Mono in order to develop my projects. I have Suse to easily get the Mono binaries and I have Ubuntu to experiment, build software from source, and other things. I've been using Gnome for years and I'd like to track KDE as well having a different user experience.
As a gift for myself I've purchased Open Suse from Novell to get a nice box with original stuff, manuals and support. It is my way to contribute to the Mono project too. Hopefully in the future people will pay money for the support, not for the software 🙂
The installation of Open Suse is great, it even resized my Ubuntu ext3 partition turning it to ext2 (although it didn't convert it to ext3 again, I had to do so manually with tune2fs).
Now I must say that the experience has been a bit disappointing. First of all, there is no support contract inside the box (papers) and all the information is in the Novell website. It is not clear what the support covers and they answer the tickets nothing fast in the help desk system. I felt that Open Suse 10.2 wasn't enough tested before the release because there are quite a few updates to download and the system actually gets better once updated.
I mean, it is absolutely reasonable and usual to have a bunch of important updates as the open source community never stalls the ball but when you pay for the software you expect a little bit more, you count on the original cds and dvds you have purchased.
I had a weird incompatibility problem between the firmware version of my laptop BIOS (Acer TravelMate 4202wlmi) and Linux Kernel that caused random freezes during the kernel startup sequence. Fortunately it is working very good after the update.
So, if you get Open Suse 10.2 don't forget to download the lastest updates. Go to the "computer menu", run Yast2, go to "Online Update Configuration" and after that go to "Online Update" in order to get the updates. In addition if you want to get some non-free packages go to "Installation Source" and add the next addresses (mp3, mplayer, and other cool stuff):
Server Name: packman.mirrors.skynet.be
Directory on Server: /pub/packman/suse/10.2

Server Name: download.opensuse.org
Directory on Server: /distribution/10.2/repo/non-oss/suse/

And other cool package sources such as the Mono packages or the Linux kernel:

Server Name: software.opensuse.org
Directory on Server: /download/Mono/openSUSE_10.2/

Server Name: software.opensuse.org
Directory on Server: /download/Kernel:/HEAD/openSUSE_Factory/

Finally I got what I wanted, to have the last Mono packages, including the last MonoDevelop 0.14 which is awesome !!!, because with Suse you are able to go to monodevelop.org, check out the rpm package and install it directly if it is not in any respository yet.

WPF ControlTemplates and other stuff

ControlTemplates are one of the more powerful features of WPF as far as I know. They let you design custom made controls and to control their behaviour, all from XAML. That is very handy. Let's say for example that you have a checkbox and another control beside it and the checked event enables or disables that control. Programmatically you can access the controls in the template using the FindName method wich is very handy.
I've written a sample code for that and put it together with another sample from the internet to make it more complete. There are quite a few documentation on ControlTemplates over the network.
Now I'd like to show you some issues I've faced, some of them are fixed and some of them still issues because of the behaviour of WPF. Again and again the problem for me is that the XAML is not very well connected to the C# API.
In the Zip file you can find the DateControl which is a custom control to set and get dates. It has a DependencyProperty intended to be used from XAML and also a standard property intented to be used from C#. Well, the Get works fine but the if you Set the property through XAML and after that you try to Set the property through C#, it doesn't change. See the line 61 at DateControl.cs.
The other issue with the DateControl is that I'm populating the ItemsSource property on the dropdowns in the XAML which is displayed succesfully but when I try to access the property in C# it turns out that it's null. See the PopulateGui method at DateControl.cs
The last curious thing is the way WPF builds the controls. In the constructor of the class all the children (controls) of the current control are surprisingly null and they become avaiable after the constructor finishes. That could be understable but what is not very understable is that the construction process throw events :-). You can see have a look at the Checked method at Window1.xaml.cs. The checkbox has the Checked event associated and its IsChecked property is set to true in the XAML so the event is fired at construction time and you have to add special treatment in the event handler to avoid NullReference exceptions. It makes no much sense to me.
Here you go the Zip File: ControlTemplatesTest1.zip