2009-07-23

KDE 4.3 RC3


You may already know that KDE 4.3 RC3 released, and release delayed for a week. I can't stand that news, I thought that is will be released this Monday, but another 2 weeks... And of course I want to try it without harming my every day system with KDE 4.2.4 and only stable packages. In that moment I remembered about kde4live CDs, that I used some time before SUSE 11.1 released. And of course I found it fast enought using Google. And there are good news - on top of the page there is message that KDE 4.3 RC3 already packed to LiveCD and can be downloaded from SUSE's repositories. Well, Kubuntu users, don't you feel betrayed that your favourite "KDE-oriented" distro is far behind great and green OpenSUSE?

2009-07-09

Kompare - the only valuable diff for M$Windows


I used KDE and Linux for many years, and of course I was shocked when I had to switch to Windows in new office and I didn't found all those little but important tools KDE guys made for us all. Today I will tell you about Kompare.

My history as Kompare user
While being developer from time to time you need to diff between two files. Of course almost any IDE and other development-oriented tool have own diff UI. Of course I used many of them, some are more useful than others. For example older Eclipse diffs were so ugly that it was hard to look at, IDEA had horizontal 3-way comparison, older NetBeans versions - vertical 3-was comparison, KDiff3 showed too much of not required data and also was ugly enought. Only SmartSVN and Kompare used two-way clean and informative diff, but while SmartSVN was written in Swing - Kompare used all possible KDE features including font antialiasing, user's colouring and icon theme and of course smooth comparison blocks. While being feature-rich it was only comparison tool with great UI, so I stuck with it.

Switching to Windows
Of course after I got used with pretty tool like this - it's hard to move to something ugly and not so usable. When on the new job I had use Windows - I went to wikipedia to search for another file comparison tool. And what do you think, I downloaded every free-to-download tool and tried it - and it failed. Some of them took 3-4 steps before show you actual diff, others were overloaded with features, others had ugly UIs. I couldn't make myself use them. I've been lucky and by that time NetBeans team swithed to 2-way diff, and I used NetBeans for even smallest comparison operations.

kde4win salvation
I was lucky enought not to die before kde4win project released with Kompare ported to Windows. Of course few first releases didn't helped me also, but starting with 4.2.0 release Kompare was fully functional. And not with kde4win you can use this great tool if file comparison operations is critical for you.

installing
It's not hard. You don't even have to compile something. Only few steps:

  1. Go to gnuwin32 diffutils, download and install.

  2. Download kdewin installer and launch it.

  3. After installing kde4win - start kompare and in "Diff" section show him where your diff.exe (from gnuwin32 diffutils) is located.

  4. Restart Kompare and it's ready to use!

Now you can enjoy your life without feeling the pain of uncompared files on your system.

PS: Kompare can be used even for folders comparison - and it's much more powerfull than you can expect from simple file manager!


2009-07-06

Yet another opinion in Mono case


There were many Mono debates on Tuxmachines for last few weeks. Of course I have my own opinion on this topic. I will not blame Mono right now, just my thoughts about distributing it with Linuxes.

Default distribution
As far as I know, all those debates started when Debian guys thought about including Mono into default installation. But what it default installation? Isn't it related to target users? It's obvious that when you installing Ubuntu - you target home desktops, SLED or Mandrake - office, SLES or Slackware - servers. Depending on that choice "defaults" are very subjective. But is there any distribution problem? I don't see it. Being SUSE user I have my distribution on DVD media, lots of stuff could be fitted there, why not include Mono? If you're single CD distribution - you should think twice and count all Mono-based software you'd like to install. If it's just single application - it will be funny to install mono because of it.

Next, most of Mono apps are made for GNOME. I see no reasons to install it with KDE-based distribution, or console installations.

Thinking about users
In perfect world user should never bother with technology used in his favourite apps. Application should just do it's job, not promote or blame something. To mono or not to mono should depend on those user apps, but should not be some politics or religion choice. As for me I hate beagle, banshee and f-spot. Mono should not be installed for me. And vice-versa. If user will notice any Mono application he will run - it will look like there is some problem with Mono, don't you think so?

System core
While it's completely OK to depend some desktop apps on Mono or other interpreted stuff - it's totally wrong to use it for system parts. Every next level of abstraction and interpretation adds additional level of possible problems, removes some part of integration and requires more resources to work. Can you imagine our world if HAL will be written in ruby or python or something like that? System must not be related on interpretator vendor or on subjective solutions. You may already see some bad examples like ZEN in SUSE 10.0, pulseaudio in current distributions, gcj instead of Sun JRE in fedoras and many more.

From my perspective
It's strange to see, but all mono-based apps I know makes me sick. Beagle that starts and scans event without any GUI installed. ZEN that made me think about switching away from SUSE. Banshee with it's crippled playlists. F-spot with it's lack of features. MonoDevelop with it's lame possibilities totally unexpected in any IDE. I think that the day I will not be able to set "taboo" on Mono in my SUSE installation will be the last day of me as SUSE user.

Java things that make you go "hmm"


I am preparing myself to SCJP exam, and while reading preparation book I found "feature" I didn't knew about. Take a look at the following code:

public class Main {

 public static void main(String[] args) {
  new B();
 }

 static class A {
  public A() {
   System.out.println("A constructor");
  }
 }
 static class B extends A {
  {
   System.out.println("B init");
  }
  public B() {
   System.out.println("B constructor");
  }
 }
}


How do you think, what output will it generate?

2009-07-02

Java single inheritance questions


There are few structures in Java that are not so intuitive as others. Take a look:
public class InnerInvocation {

 String getValue() {
  return "Outer Value";
 }

 private class InnerClass {
  String getValue() {
   return "Inner Value";
  }

  void work() {
   // insert code here
  }
 }
}

What code do you need to invoke getValue() method from outer class?

Here is the answer:
  void work() {
   InnerInvocation.this.getValue();
  }

And now the question of the day: there is syntax that possibly can allow multiple inheritance in Java, so why is it forbidden? Because you as developer can make lots of mistakes? Why then they allowed reflections?