Monday, December 28, 2009

Offline Javadoc for SWT

SWT is currently my favorite Java GUI library. It uses GTK2 as its native backend, is pretty stable and has a (rather) nice API.

It is part of the Eclipse Project. Unfortunately that means (as with all other Eclipse parts) that the documentation is not really accessible. If you need the Javadocs you have two possibilities:

1) Use the online version. There are two problem with this: a) you need an internet connection all the time and b) the Javadoc is embedded in a useless Eclipse Help frameset that eats up most of the screen making no space left for the actual content of the Javadoc:


2) Use the Eclipse help - this is basicly same as 1) but shown in an internal Eclipse browser. Plus you must install the right Eclipse components.

Sometimes you just want the Javadocs stored on you computer and browse them offline in your favorite browser. Most libraries (e.g. all Apache Foundation projects) simply offer a ZIP archive containing the documentation for offline usage. In case of SWT you have to generate them yourself. It takes only few moments if you follow this guide:

1) Download the desired version of SWT (whatever architecture you need - the Java part is same for everyone).
2) Extract the package. Besides the swt.jar and swt-debug.jar you will find the src.zip which contains the source code of the SWT library. Exctract it somewhere.
3) In the source code directory execute:
javadoc -d <your-target-dir> -sourcepath . -subpackages org.eclipse.swt -exclude org.eclipse.swt.internal

And voila - you have your offline Javadoc for SWT.

Saturday, December 12, 2009

I've made a new panorama after a long long time:

This one is from Abisko Canyon in Lapland in the north of Sweden.

Tuesday, December 8, 2009

Ice climbing in Abisko

We returned from our trip to north of Sweden almost a week ago but there are still a few things worth writing about.


One of the fun activities we did in Abisko was ice climbing. Our climbing instructor Klaus explained us everything and after putting on all necessary equipment we were ready to go.


We climbed on a frozen waterfall in a canyon in the Abisko national park. The scenery was really amazing. I have some photographic material for making a 360 degree panorama which I will hopefully publish soon.


Climbing on ice not very difficult. Some of us didn't have any prior climbing experience (indoor or outdoor) but that was not really a problem. According to our instructor we did quiet well for tourists/beginners.


I was huge fun although pretty exhausting. It was getting dark very soon (around 2pm) so had to climb with headlamps at the end.

You can find some more photos at nuolja.se. Thanks Benny!

Thursday, December 3, 2009

Aurora borealis

One of the things that we really wanted to see in Lapland was Aurora borealis. Fortunately we were lucky and saw the beautiful green lights on our first evening after arriving in Abisko.


Whether you can see the aurora borealis or not depends on several factors. First of all you have to be pretty up north (or south) - preferably behind the polar circle. In Europe this means that you have to go to north of Sweden, Norway or Finland. You can also see the lights on southern parts of Sweden (such as Stockholm) but this is very rare.


Second you need a clear sky because the lights originate from upper atmosphere (about 80km above ground) and clouds can cover it completely thus spoil the beautiful show. This is usually not a problem in Abisko because this is the place with least clouds in Sweden.


And of course you need the right solar activity. This depends on the current state of the sun (its 12 year cycle) and also the part of the year (the angle between the earth magnetic poles and the solar winds).


We did not choose the perfect timing for our trip. September/October or March/April would be probably much better. But still it was really amazing and beautiful! For someone from central Europe this is a once in a lifetime experience.

Sunday, November 29, 2009

Train from Abisko to Narvik

Today we took the train from Abisko to Narvik. This is one of the most beautiful railways in the world. Unfortunately our train was running more than an hour too late which made taking photos difficult because it was getting dark (not that we had any direct daylight here ;)).

First the railway goes along the south cost of the Tometräsk lake.


Towards the Norwegian border the mountains become higher and there was more snow.




I think this photo is already in Norway. There is no visible border and there are no passport controls (Norway signed the Schengen treaty although no EU member).


This valley is actually the beginning of a fjord.



One of many fjords in Norway:




Almost in Narvik:

Dog sledge tour

When we were in Abisko we decided to make a dog sledge tour.


Each one of us got a sledge and four dogs. They really enjoy the running. The dogs know where to go and you only have steer the sledge and make sure you stay on the path.


The tour was only a few kilometers but it was very exhausting. We were riding on a small path in the forest. There were some downhill parts where you have to break the sledge and some uphill parts where you have push the sledge because four dogs are not enough to pull the sledge and one person up the hill. There were also few narrow bridges over brooks - some with railings and some without.


It was really fun. None of us had any serious crashes although there were few exiting and maybe also a bit dangerous moments. But the adrenalin is part of the fun.


Also none of us was bitten or attacked by the dogs. Although they are not kept as house pets they were very nice. In fact this is a great therapy if you are afraid of dogs.

Saturday, November 28, 2009

X2000

For the part of our journey from Altvesta to Stockholm we used the swedish high speed train X2000. The distance between these two cities is 410km and the train covers it in 3 hours and 5 minutes. That means an average speed of 130kph, something which swedish car drivers can only dream of.

The swedish railway company SJ offers some nice services on board of the X2000 such as a restaurant car and electric plugs for notebooks. But one particuar service which I really like is the wireless network on board. Each car is equiped with an access point that can be used to access the train internet portal. It offers information about the timetables, current position of the train on the map and the possibility to book additional train tickets, a hotel or rent a car at the train destination.

Map showing the current position of the train

The wireless network can be also used to access the internet. This services is free in the first class and can be purchased as an additional extra when traveling with the second class. The internet connection is established through various technologies (GSM, UMTS, satellite) and the train router always chooses the fastest available connection.

Our X2000 after its arrival in Stockholm

Journey to Lapland

Sweden is part of the Skandinavian penisula. (Un)forunately Växjö lies in the very south of Sweden. Because of this the winter hasn't arrived in Växjö yet. It is raining all the time which is quiet disappointing.
It would be a shame to make Erasmus in Sweden without experiencing the real north. Therfor me and few friends decided to make a one week trip to Lapland. Our journey takes us up north behind the polar circle.

Original map by Boris Chomenko

First we traveled to Abisko - the train ride took over 23 hours (1920km). This wasn't as bad as it might sound. We spent the longest part of the journey in a night train. It was very comfortable (at least for those of us who booked a bed instead of normal seat). Abisko is a national park near the norwegian border. We hoped to see some northern lights and maybe take a ride with a dog sledge.
We did both! (to be continued...)

Thursday, October 29, 2009

Ubuntu 9.10 is out

The new Ubuntu 9.10 Karmic Koala has been released today and can be downloaded from your favorite local mirror.

And while you are waiting for the installer/update to finish you might try some of the Ubuntu Fair Trade cola!

Tuesday, September 29, 2009

Gotland

Last weekend I went to Gotland. It is a beautiful island with breathtaking nature and many interesting historical buildings in the old town of Visby. We had so much fun thanks to the great organisation by VIS.

Wednesday, September 9, 2009

Convert rectilinear panoramas to cubic with erect2cubic

When creating panoramatical images most programs will probably output a rectilinear or cylindrical projection as a result. Unfortunately some viewers only accept a cubic projection (6 different images of the sides of a cube).

There is a simple way how to convert a rectilinear panorama to a cubic one with use of free software. The following instructions were tested on (K)ubuntu 9.04, but should also work on other Linux distributions. Note that must be connected to the internet during these installations steps.

1) Install nona - in Ubuntu is is part of the hugin-tools package
2) Install the libgraphviz-perl package
3) Start CPAN as root: open a terminal (e.g. Konsole, xterm, Terminal) and start "sudo cpan". If it is the first time you start CPAN you will be asked whether you want to use the automatic configuration. In that case just say yes (press Enter).
4) Once in CPAN, execute the command "install Panotools::Script" (without the quotes). If you get any warnings about YAML, just ignore them.

Now we have the necessary software tools to do the conversion. Now you can do the conversion. Open a terminal and go to the directory where you rectilinear panorama file is. Suppose it is called rect.tiff then execute:

erect2cubic --erect=rect.tif --ptofile=cubic.pto

This will generate the file cubic.pto which we need to generate the 6 images of the cubic projection:

nona -v -o cubic cubic.pto

This might take some time (~few minutes). After that you will see cubic0000.tif, cubic0001.tif ... cubic0005.tif in your directory. These are the six sides of the cubic projection.

Sunday, August 30, 2009

Bicycles in Växjö

You really need a bicycle in Växjö. Especially if you live on the campus and need to go to the city which is about 3-4km away. But it's not just the students who ride bikes. I Växjö everybody has a bicycle and there are special paths for bikes everywhere. It's almost like in the Netherlands.

I bought myself a used bike for 500kr (=50€). It's good enough to go from A to B but that's about it ;-)

Thursday, August 27, 2009

The campus of the Växjö university

The campus is outside the city. I like it because all the university buildings and the housing for students are within walking distance. Another nice thing is that there is almost no traffic at the campus. Most of the people walk or ride a bike. Bicycles are an essential part of Växjö but I'll write more about that later on.


This is the building where my room is. It's not very nice but it's quiet ok on the inside.

There are some green areas between the buildings.

Some more green. In the background you can see the building of the student union (similar to ÖH in Austria)

This is the main building of the university:
Another building with class rooms:

Sivans - one of the student pubs on the campus:

The library:

Wednesday, August 26, 2009

First impressions at Växjö

I want to share my first impressions of Växjö university with you. I really like it here. The organisation is really great. The international office of the Växjö University made a good job. There was a pick-up service at the train station where we arrived and then they brought us to the university campus where we got some basic information and the keys to our rooms.
I live at a dorm room on the campus. I have a small room with one bed and a bathroom and I share the kitchen with other students on the corridor.
Hopefully I'll have some time to make some photos and post them here tomorrow.

Wednesday, August 19, 2009

Long exposure photos at Traunsee

I've been experimenting with long exposure photography at Traunsee. I found a place that was dark enough to actually see the Milky Way.

7min


17min 30s


The same picture as above but de-fished and cropped.

Thursday, August 6, 2009

Google Chrome 3 Beta

Google has released a new version of their browser Chrome. The new beta version adds support for HTML5 >video< tag. This feature is also included in the somewhat unstable Linux build. If you have the Chrome repository in your software sources list then you can try it out. Just install it / run the update using your favorite software package manager.

You can try the feature at Youtube HTML5 demo page. The video rendering is working but some other features still don't:

  • Full screen playback

  • Seeking

  • Right click -> open video in new tab - crashes the browser

  • Sometimes the sound is missing




I hope that Google will target all these issues for the stable release. Maybe one day I can ditch the crappy flashplayer once for all.

Wednesday, July 8, 2009

Google announces Chrome OS

Google made an announcement we've been expecting for quiet some time now. They will be releasing their own operating system. It is called Chrome OS according to the official Google blog post, but I wouldn't be surprised if they release it under a more attractive market name.

The architecture is pretty simple: Google Chrome web browser running in a lightweight window manager on a Linux kernel. Both x86 and ARM architectures should be supported and the whole thing will be released as open source.

This step is consistent with Google's long term strategy of making the web the new platform and thus making current operating systems irrelevant. The Chrome version for major desktop systems such as Windows or Linux makes a smooth transition from classic operating systems to web based systems possible.

According to Google the Chrome OS is aimed primarily at netbooks but I'm sure this is just yet another step in their long term plans and many other strategic products for the desktop-to-web transition will follow.

Friday, July 3, 2009

VirtualBox 3.0 stable is here!

Last week I wrote about the new beta version of VirtualBox 3.0 with support for SMP. It wasn't really stable. And neither was the second beta.

This week the VirtualBox 3.0 was finally released. It seems to be stable, I haven't seen any bugs or crashes so far.



Unfortunately if your are using Windows XP as guest system you have to reinstall it. Existing installations of Windows XP that you have created using VirtualBox 1.x or 2.x will show only one CPU no matter how you configure your virtual machine. I guess this is rather a problem with Windows than VirtualBox. Windows always have problems if you move your installed system to a different hardware (virtual or real). The linux kernel or any other sane operating system should detect the change from one to two CPUs without any problems.

Wednesday, June 24, 2009

Unpacking my new T400

Today my new notebook finally arrived:

I bought it at lapstars.de, a small online shop in Germany which offers discounts for students.

Inside the outer box was the original Lenovo box, the receipt and surprisingly a small package of gummi bears! I order electronics from various online stores pretty often but I've never seen this kind of customer care ;-)



The notebook itself is really great. It's always exiting to have a new piece of hardware in your hands.


The first thing I had to do was to wipe the hard drive clean and install a sane operating system. But I will write about it in one of my next posts.

The next step is removing the vista-sticker in the lower left corner. It's not that easy because it's more stable than the operating system itself and I don't want to scratch my new notebook with some tools.

Tuesday, June 23, 2009

PHP - from bad to worse

Everyone who has ever programmed something in PHP knows that it a) is easy to learn in the beginning and b) will produce totally unmaintainable code in the end. The problem with PHP is that it encourages bad programming patterns. Mixing logic and HTML code is a common practice among many web developers. The lack of debugging and testing tools in combination with constructs such as $$var, global variables and arrays of arrays of arrays make bugfixing extremely painful.

Unfortunately these "features" are also the reason why PHP is so popular among beginners. They might be useful for tools and scripts but they are deadly for larger applications.

The PHP folks decided to add yet another feature that makes coding easier and maintaining harder: the GOTO statement! The evil keyword has finally arrived!

Friday, June 19, 2009

Chain of Lights in Vienna

The results of recent elections in Austria were very disappointing. More and more people are lured by the dark side. Right wing populists are gaining more power using fear and hate as their main weapons. It's always someone else's fault. Blaming the foreigners, homosexuals and the EU for unemployment, crime and the "decline of the society" has worked pretty well in the past few decades in Austria.

Fortunately the situation is not as bad as it might seem. There are still many people who want to live in a tolerant society who appreciate diversity. Even though the right wing populists are supported by about 25% of the voters the number of people who would never ever vote for them in an election is still bigger and is expected to grow after the recent events in the Austrian politics.

Last night there was a demonstration at the parliament building in Vienna. Thousands protested against current developments in Austria. Many think that the right wing extremists overstepped the line.

Thursday, June 18, 2009

VirtualBox supports SMP

I've been using VirtualBox for quiet a while now. It's really nice virtualisation software if you occasionally need Windows inside your Linux box but don't want to reboot. It has one big advantage when compared to VMWare Workstation, it's free (either free as in "free beer" or free as in "free speach" depending on the version you choose).

The only drawback of using VirtualBox is that it doesn't support multiple CPUs inside the guest system. That has changed now. The new Beta of VirtualBox 3.0 supports SMP in guest systems.

There are still a few issues. The biggest one is that it doesn't work. At least my existing XP virtual machine is unstable when if I configure it to use more than one CPU. And there are some performance problems.

I really hope Sun will fix these problem in the stable release of 3.0.

Tuesday, June 16, 2009

MuseumsQuartier protests

In my last post I asked myself whether Facebook activism does make any difference in the real world. Obviously it does!

About two weeks ago the MuseumsQuartier, a complex of museums and other cultural institutions in Vienna, changed its "security policy". This place is very popular among young people who come here to chat, have a beer, make some music or just hang around in this amazing centre of modern culture. According to the new policy I was forbidden to bring your own beer or other alcohol.

Within few days a protest group with over 10.000 people was formed on Facebook. After several other online protests and a "real" demonstration last Saturday the ban of alcohol was more or less lifted.

Mobilising people and organising protests online obviously does make a difference, at least when it comes to drinking.

Thursday, June 11, 2009

Facebook activism - does it really work?

Everyone who has a Facebook profile has been invited to one of those activists groups who are trying to make our planet a better place to live. Stop polluting the air, fight racism, legalise marijuana... etc., there are groups of people who want to achieve some (more or less) moral goal.

Most of these groups are pretty naive and look like they're never going to achieve anything. How can few hundred people connected through the internet stop whale hunting? Why should anyone even bother and join one of these groups? It doesn't make any difference anyway... or does it?

Sunday, June 7, 2009

YAUT (yet another ugly toolkit)

During my computer science studies at the Technical University of Vienna I have come across many software development tools and platforms. Some of them were quiet clever and useful. And some of them were not.

This week I had to develop a small application using the Globus Toolkit. It is a platform designed for grid computing - applications that require a lot of resources are ran on a grid of powerful computers. It uses something called web service resource framework (WSRF). It's an attempt to create stateful web services. During each call to the web service you not only specify the function you want to execute and its parameters but also some resources (stored on the server) that should be used during the execution of the function. The idea seems pretty nice, unfortunately the implementation is just terrible.

The specification, the API and the configuration seem to be designed by someone who hasn't written a line of code for many years. In an ideal software development platform you can write simple application easily while still allowing the user to create complex and scalable applications. Unfortunately with Globus Toolkit this is not the case. The tutorial which explains how to create a small grid-calculator (allowing addition and subtraction of integers) takes few hours. If you actually manage to get it running at all thanks to the configuration hell.

Globus Toolkit might be good when it comes to complex grid applications. But from developer's perspective it is a complete failure. I can't imagine that some would voluntarily start to create applications with Globus Toolkit, just for fun. And that's all that matters. If nobody wants to develop using your tools you're bust.

Wednesday, June 3, 2009

Tetris - 25th anniversary


This legendary game celebrates its 25th anniversary this week. If you feel nostalgic there are many free implementations of this marvelous game. For example you can try KBlocks from the new KDE4.

Tuesday, June 2, 2009

New wave of censorship in China

I haven't made any new posts in the last few weeks. I could make up some good excuses for stopping blogging but the truth is I was probably just lazy.

So why did I decide to give my blog a second try? Well one reason is that there is always something to write about. Writing down your thoughts and sharing your experiences makes your head feel lighter.

But the main reason for reactivating my blog is that I want to celebrate the fact that I am free to actually have an uncensored blog. It might not be the most interesting thing to read but to me it is important that I free to express myself through my blog and other people are free to read it.

Many people on this planet are not so fortunate. In preparation of the 20th anniversary of nothing happening at the Tiananmen Square the chinese government decided to block the access to Twitter, Flick, bing.com, YouTube and many more.

The communist regime is obviously afraid of revolution 2.0.

Wednesday, February 4, 2009

Windows recovery console - it works!

Today I have successfully used the Windows recovery console from the Windows XP install CD for the first time in my life. Until now I thought it was just a cruel joke on all sysadmins by evil Microsoft programmers. The list of available commands hardly fills a single screen so there isn't much one can do which can be very frustrating for a long term Linux user.

I was installing some drivers and got a BSOD during the process. After a restart the system was unbootable, not even in safe mode, complaining about a corrupted driver file in system32/drivers. Naturally I tried the "last working" configuration from the boot menu. Unfortunately that didn't help either.

So using the recovery console I was able to copy the correct file from lastgood/system32/drivers to the system32/drivers which fixed the system. In other words the "last working" configuration contained the right files. Unfortunately this obviously isn't enough and some more secret magic is required.

So if the "last working" configuration feature was working I wouldn't have to use the crappy console in the first place. It scares me that most people on this planet use a system that
1) can break during installation of hardware drivers and result in an unbootable state
2) has totally useless restore capabilities
3) and an even more useless recovery console!

And the fact that I got paid for repairing the computer didn't make me much happier (just a little bit).

Monday, February 2, 2009

MuseumsQuartier

Last week I went to MuseumsQuartier in Vienna to shoot a new panorama. It didn't turn out as good as I expected. I arrived to late and the sun was already too low. And it would have been much nicer if the trees were green. Well I guess I'll have to wait till spring!

Sunday, February 1, 2009

Is GNOME really better?

I've always been KDE user. I love kwin, kicker, kate and all the other power features and utils that come with it. In my eyes Konqueror is the best file manager ever. I've been using Kubuntu for the last 3 years but I'm starting to wonder whether I should switch to something else.

I've been working with GNOME quiet often recently, especially on Ubuntu. And it's pretty good. I actually works where KDE fail terribly. For example file associations - which file types are opened by which programs. They are a horror in KDE. Sometimes I have the feeling that if I double click a file in the Konqueror it will be opened with a program chosen by a random generator. Some video files are opened by Kaffeine, some by MPlayer and some don't work at all (like flv videos) although they could be opened by MPlayer or Xine. So every time a install a new system or create a new user I have to fix the settings because the defaults just don't work! And if you're using Firefox (because Konqueror sucks as a browser) then you should prepare for even more trouble because it's file associations are completely different from KDE's.

Is it really so difficult to get these simple things right? You can't expect an normal user to work with a system with such fundamental problems.

And there are many more use cases where Ubuntu is clearly superior to Kubuntu which I'm planning to cover in the future.

I really hope that KDE4 will get this fixed.

Saturday, January 31, 2009

Google says Google is malware


A strage bug appeared on the google search engine this afternoon. All results were marked as potential malware. Including google itself.