Friday, August 3, 2012

Enjoying the Finnish Archipelago

One of my activities this summer has been exploring the Turku archipelago with my kayak. The Finnish archipelago is the largest in the world by some measures. There are 179 584 counted islands in Finland, some of them in the lakes, but most of them in the sea. The largest archipelago area, the Archipelago Sea, is around Turku, where I live, with about 50 000 islands. Most of the islands are tiny, some just ten meters wide, but yet make great places to visit. The archipelago is also really tightly packed, and you could usually throw a rock to the neighbouring islands.

Not amazingly, many people here have a boat. So did my family when I was a child. We had a rather small motorboat, and my family and other kindred would all gather at the Maisaari island. My brother has a motorboat, and many of my friends have had one, or a sailboat. I kind of like sailboats, so I may get myself one some day.

The number of islands is so high that even though thousands of people go out there every summer weekend, everyone can always get their own island to stay in, if they like. Some of the islands are just small treeless rocks, but most have some forest.

Nevertheless, most of us who live here take the archipelago for granted, and rarely even think about it. So have I for most of my life. I kind of rediscovered it last year when I got into paddling. A kayak is really very useful for exploring the archipelago, as you can get everywhere with it. Many parts of the archipelago are unreachable by motorboats or sailboats, as they are too shallow and have too many underwater rocks, but with a kayak or canoe you can get everywhere. It is a bit slow and requires some effort, but on the plus side, it keeps you in shape. Not surprisingly, kayaking and canoeing have become really popular in Finland, and especially so in the Turku area.

I started kayaking mostly last year, and after some trips with rented kayaks, I got myself one. So far, most of my trips have been just daytrips or one-night trips, and one two-night trip for a weekend. But why stay longer, as you can always go next weekend as well.

At Ominainen, the most famous haunted island in Finland. They used to bury criminals and other nasty bastards here.

A private boat is by no way the only way to explore the archipelago. There are many "water buses" that go to some islands daily, and bigger ferries to the more remote islands. Most of these ferries, especially to the most remote islands, are actually totally free of charge. The ferries go also in the winter, pushing through ice. There's also an Archipelago Route, which you can go by car or bicycle, with free ferries between the islands.

Oh, Finland also has 187 888 lakes (larger than an acre). The number of lakes by the land area is also probably the highest or among the highest in the world.

Tuesday, July 17, 2012

Book of Vaadin - Vaadin 7 Draft Edition

I just sent the Book of Vaadin, Vaadin 7 Draft Edition, to print. I've been really busy with it for the last month, as there is so much to do. Some years ago, when we went from IT Mill Toolkit 4 to 5, it took over six months to rewrite it. Now the book is many times bigger and the changes in Vaadin 7 are really radical.


The edition is really a draft, and it says so right in the title and in many places inside the book. Many of the changes in Vaadin 7 require going through the book almost word by word, so I hope to get it done before the end of the year.

Also, the last batch of Vaadin 7 enhancements is yet to be released in the first beta, which should be out at the end of August.

The printed book will be available at JavaOne, and at some other locations. We try not to print this draft in huge numbers, just for the most important conferences in fall of 2012.

Big Changes in Vaadin 7

The first big thing in Vaadin 7 is the renewal of the basic application API. You no longer extend Application to write an application, but a Root (name is subject to change). Root is much what Window used to be, and the Window now means only a sub-window. There's also a separate Page object associated with a Root.



Another big topic is the client-side API, which has been essentially rewritten to use connectors that communicate between a client-side widget and the server-side component. The framework handles state object serialization transparently, and there is also an RPC mechanism. Hence, the client-side development chapter has been rewritten from scratch and it still needs a lot of work.

For most developers, also forms and data conversions are very important. There is no longer a Form component, but a FieldGroup that helps in binding fields and data together. I have written probably a hundred examples that use the old Form, so there's quite a lot work in converting them all to the new model.

And there are dozens of other significant changes.

Vaadin += GWT

Then perhaps the biggest thing in Vaadin 7 is that it now includes GWT. Just putting the GWT classes inside the Vaadin JAR sounds does not itself sound significant, the significance comes from the consequence that as we provide support for Vaadin, which now includes GWT, we also provide support for GWT. Vaadin now also effectively supports two development models: one for the server-side as before, but also for pure client-side applications.

Pure client-side Vaadin applications are of course more restricted, but they have their uses. Not all applications need data from a server, but just work on data input by the user. Also, pure client-side application can work off-line, unlike server-side Vaadin applications (unless you install the server on the client machine). For example, the Vornitologist demo for TouchKit has an off-line mode that displays a pure client-side version of the application when the network is not reachable. It uses HTML5 local storage to store the application itself, as well as the data, until the network is reached again and it can send the data back to the server. Then, the application can revert back to the full-featured server-side application. To try it out, run the demo on either an Android or iOS device.

References

Some links:
Notice again, that the Book and the book examples are really unfinished drafts at this point, and will be in better shape at the end of the year when Vaadin 7 is planned to be released.

Sunday, July 8, 2012

Installing Kubuntu 12.04 LTS on Acer Aspire One D270

I finally bought a new netbook, an Acer Aspire One D270.
  • 10.1" display
  • Dual 1,6 GHz Intel Atom N2600 processor
  • GMA 3600 graphics chip integrated on processor
  • 320 GB hard drive
  • 1 GB RAM, extendable to 2 GB
It appears that the D270 model has many variants. I accidentally purchased a model with a 3-cell battery, as there was another model with the same designation in another shop, but with a 6-cell battery. I read the specs from the other shop, and bought the machine from the shop with the inferior machine. Oh well, can't take it back anymore. On a positive side, it's a bit lighter and smaller with the 3-cell battery. There were a few other alternatives, but this was the cheapest and I thought they were so cheap that I could buy a new one later. There's never enough netbooks lying aroung.

The nasty trade-offs with the D270 are:
  • A glossy screen (oh I hate them)
  • No Bluetooth
  • No built-in 3g
  • The small battery in this model
But it was cheap, so.

The machine came with Windows 7 Starter. It's actually the first Windows I've ever paid for myself, which is kind of shameful. Unfortunately, it's no longer possible to find a netbook/laptop without Windows (Update: Looks like they sell D270 with Linux in Germany). My EeePC 910 was quite great, with almost same performance as this one, but unfortunately they don't sell those any longer. Too bad I managed to soak it in pear juice.

It should be noted that there are no vendor-provided drivers for the GMA 3600 graphics controller in Kubuntu. (Update: Looks like Intel has published a Linux driver last month! But it's only for 32-bit Fedora...)

Some of the configuration given in this article are specific to the Aspire, but perhaps most are quite generic, especially the KDE configuration.

About KDE

I'm a long-standing KDE user and wouldn't really use anything else. The problem is that KDE has been getting worse over the years, not better. I guess it's because KDE imitates Windows a lot, and Windows has gone worse. The problems started with the redesigned KDE 4, which had all sorts of bells and whistles that still don't work some 5 years after the first version. The window manager crashes occasionally, and there are other issues, some of which I will mention later.

One of the most annoying issues is deteriorating keyboard support, some of which issues I mention later. While I initially switched to KDE because of its excellent keyboard support, it has been getting worse. Shortcuts disappear, and no one seems to care about it. I imagine there is nowadays a newer generation of developers who went to school learning to always use mouse for everything. Despite using the keyboard for writing a lot, they nevertheless seem to stick to mouse a lot. Not good.

Mounting the Cow

In any case, Kubuntu, the KDE version of Ubuntu, was my choise. Downloading the ISO image was just a minute. The trouble started with writing the image on USB memory. The instructions give a "normal way" to use "usb-creator-kde" application. The problems started while using it, as it crashed the first time I used it. Trying again, I managed to write the image to the USB drive (or actually an SD card with an adapter). However, trying to boot from it consistently failed and the system dropped to shell prompt. I first feared that it might be a display driver issue, but going through the errors gave me a hint that the USB image might have some issues. It couldn't even mount the system in read-write mode, which caused everything to fail.

The problem was that it couldn't mount a cow. More technically, I got "Can not mount /dev/loop1 on /cow". It has something to do with an overlay filesystem where there is a read-only filesystem on the bottom and a ramdisk read-write filesystem on top of it that takes any modifications. Anyhow, I didn't get the cow error consistently, so it took a bit time to figure out. Well, the installation instructions actually mentioned the issue and adviced to use UNetBootin, another application to create bootable USB disks.

The problems didn't exactly end with UNetBootin, I have no idea why. I managed to boot once, but subsequent attempts didn't work, the boot just got stuck. At this point, I gave up and went to sleep. On the next day, I went to a supermarket and bought a real USB drive instead of the SD+adapter, and tried that. Worked, excellent.

The installer allowed to repartition the 320 GB drive nicely so that it preserved the Windows 7 installation. Not sure what I could use it for, perhaps for some games or something. Not that the machine is fast enough for games. Even basic use with Windows 7 Starter is horribly slow. But I did pay for it! Installing Firefox instead of the IE made browsing much faster though.

Installing Kubuntu was a breeze initially, nothing much to say about that.

The Biggest Task: Basic Configuration

While KDE is great, it unfortunately is not great out of the box. In fact, it appears rather broken in many ways.

Using Regular Desktop

Kubuntu seems to start the "Plasma Netbook" workspace by default. It might be nice for your grandmom or your kids, but for you it isn't. To use a regular desktop, select in the Control Panel "Workspace Appearance and Behavior / Workspace Behavior / Workspace" and select "Desktop" in the Workspace Type. Click Apply and you're much happier.

Tree View in Control Panel

The KDE Control Panel originally had a tree view. In some 3.x version, it was changed to a more "iconic" view, for worse I think. It is still possible to get the tree view simply by clicking Configure in the Control Panel and selecting the Classic Tree View.

With trees or icons, the KDE Control panel is really a huge forest and it can sometimes take ages to find what you want. Sometimes the search functionality helps, sometimes you have to resort to Google to find the settings you want, sometimes it's somewhere else.

Traditional Start Menu

At some point in recent history, KDE wanted to mimick the Vista start menu, which is just as awful in KDE as it is in Windows. To replace it with a traditional start menu, right-click the panel and select Panel Options / Add Widgets. Drag and drop the Application Launcer Menu to the panel. To reposition it in the panel, click the Panel Tool Box at the right end of the panel, select the button, and move it to left. To remove the default launcher, right-click it and select Remove this Application Launcher.

While you're viewing the Panel Tool Box, also select More Settings / Auto Hide. This gives you plenty of more space in the already too small screen.

Desktops and Keyboard Navigation

One of the most important features in KDE is built-in desktop navigation. It has multiple desktops in which you can group windows. These were actually disabled after installation for some reason. To configure them in Control Panel, select Workspace Appearance and Behavior / Workspace Behavior / Virtual Desktops. Often the default is four desktops, I like to use eight. After using same configuration for 15 years, navigation has come pretty easy.

Very importantly, you can navigate between the desktops quickly from keyboard, just like you can navigate between windows with Alt+Tab and Alt+Shift+Tab. The keyboard navigation was actually the reason why I switched to it some 15 years ago from fvwm2 (don't even ask what that is).

The problem is that the proper desktop navigation keys are no longer enabled by default. In fact, because of a bug introduced in Kubuntu 11, they can't be configured from any of the settings at all! The only way to set them is to edit
.kde/share/config/kglobalshortcutsrc and set the following:
Walk Through Desktop List=Meta+Tab,none,Walk Through Desktop List 
Walk Through Desktop List (Reverse)=Meta+Ctrl+Tab,none,Walk Through Desktop List (Reverse)
("Meta" means the "Win" key.) Strangely, the issue was fixed in last October (2011), but the fix was apparently not included in Kubuntu 12.04.

Because of another bug, it's no longer possible to use Win+Shift+Tab in KDE. The keyboard combination simply doesn't work. It was quite annoying to lose that shortcut, as I used it for al-most 15 years, until it was broken in KDE 4.

To get the settings in use, you need to restart KDE by logging out and in again.

Basic Window Management

Unbelievably, KDE windows do not have a "Minimize" button by default! The only way to minimize them is to click the window menu (at the top-left corner) and select Minimize. To enable a Minimize button, you have to customize window buttons. In the Control Panel, select Workspace Appearance and Behavior / Workspace Appearance / Window Decorations, then Configure Buttons. In the dialog, you can drag&drop buttons, such as the Minimize, to the window title bar.

To be able to minimize windows from the keyboard, the shortcut is defined entirely elsewhere in the Control Panel. Select Common Appearance and Behavior / Shortcuts and Gestures / Global Keyboard Shortcuts, and then select KWin in the KDE Component. So, I have to know that this simple shortcut is part of this "KWin" thing, reall obvious. There, set the Minimize Window button to Win+- (Meta+-). While you're at it, you could also set the "Maximize Window" to Win++ or something.

Forcing Windows to Particular Desktops

Normally, when an application opens up a child window, for example a warning, it appears in the current desktop. This is not normally desirable, as it messes up the grouping of windows in desktops. For example, if you have Skype pop up chat windows automatically, you soon have them in every desktop. It becomes a problem.

You can force the windows of a particular application to always open in a fixed desktop. In Control Panel, select Workspace Appearance and Behavior / Window Behavior / Window Rules. The configuration is somewhat complex so I won't go into much details.

You can actually do really many things with the functionality, it's almost like
programming. You can control the desktop, size, positioning, and countless other parameters of windows.

And of course, KDE allows saving the "session", so that after you shutdown the computer and start up and log in again, it restores the session with all the windows. The behaviour can be configured in Control Panel in System Administration / Startup and Shutdown / Session Management. You can choose to save the session automatically when logging out, or just manually, or not at all. Restoring does not restore the applications to the same state though. For some applications, it can save some state parameters, such as the current folder and such, and even which document you were editing. How much state information is restored depends on the application.

Optimizing Performance

It isn't really meaningful to have flashy graphics effects when using a slow netbook. While the basic 2D hardware acceleration seems to work quite well with the GMA 3600 graphics adapter, some effects can be really hard on the poor GPU. In the Workspace Appearance and Behavior / Desktop Effects, disable Enable desktop effects at startup and "Various animations".

You could set the "noatime" option in /etc/fstab. Normally, Linux keeps record of the latest access time for each file and directory. You can see the access times for example with "ls -lu". That recordkeeping requires writing to disk, which takes a bit time, and with flash disks would also consume the prescious rewrite cycles. Just edit the file (with sudo) and add the "noatime" option in the options column, separated with a comma. The setting is used after the next boot.

I am sure there are tons of other optimizations you could do, so the above are just the starters.

Update: The D270 came with just 1 GB of memory, which seemed to fill up pretty fast with KDE 4 and especially when running Java stuff. I got a 2 GB comb and now it works much faster.

Remaining Issues

The remaining problems are:
  • External display (VGA or HDMI) does not work and I have found no mentions how it should work. Apparently it is possible to get it work if they sell the D270 preinstalled with Linux.
  • The keys for changing display brightness do not work. The issue is known with the Aspire One and should be solvable.
  • Kwin has crashed once or twice during a day. This issue is really annoying on my home desktop computer as it can occur several times in an hour. I hope it isn't as bad.

Monday, June 11, 2012

Transit of Venus in Lapland

Last week was the transit of Venus between Earth and the Sun. This is a rare phenomenon that occurs just twice in 120 years. The last time was in 2004, when I was able to observe it in Turku, and the next time is in 2117. While the event has little astronomical significance today, it was quite significant historically, as it was used to determine the scale of the solar system. As I'm a bit interested about the history of astronomy, this was something I didn't want to miss.

So, last Monday I packed my car and headed towards Lapland. Well, actually on Tuesday morning at 2 am, as packing took a bit longer than I had planned. I drove all night and all day, taking just a short nap. The weather was a big question. Most of the Southern Finland was clear, as was Lapland, but the forecasts were changing more quickly than I could drive with my car. I had to make my final decision at Sodankylä and head either towards Utsjoki in the "head" of Finland, or to Kilpisjärvi in the "arm". I chose the arm over the head.

I had never been at Kilpisjärvi before and it was quite beautiful area, in all its barredness. The Kilpisjärvi lake was still almost completely frozen and there were many groups of reindeer on the road.

As was almost expected, it was totally cloudy when I arrived in Kilpisjärvi at Midnight, just an hour before the transit would begin. So, with 1400 kilometers behind in 22 hours, I turned back. If I had not, I would probably have completely missed the event. After driving some 100 km, I got a very short peek of the Sun at around 01:15, just a bit after the transit had begun, but I had to drive yet another 100 km before I found an area free of clouds.

Well, there it was, the Midnight Sun, hovering low behind the hills. It was unfortunate that I had missed the beginning, because measuring the time from the first to fourth or second to third contact was how the scale of the solar system was calculated using the parallax between different latitudes on Earth.

So, I continued driving to East, trying to find even better spot, even one with other amateur astronomers. I knew there was a group in Saariselkä, on top of the Kaunispää fell, some 400 km away, but while driving there I encountered another cloudfront and had to turn back. So, I settled on the top of the Levi fell, where there is a famous skiing center.


I had also my 30-year old RET-45 telescope with me for visual observations. It was a bit unstable and the secondary mirror was a bit loose, so using it wasn't exactly easy. I tried to take some photos through it with my cell phone, but wasn't successful. So, my main instrument was my Canon 40D with a 700-300 mm f/5.6 tube. It wasn't really long enough, but what could I do.

I left the Levi after some hours and observed the third and fourth contacts at a parking place nearby. I stopped there because I had noticed couple of German amateur astronomers there, taking photos of the phenomenon.


Trekking in Lapland

As I was in Lapland, I wanted to see it a bit. Just by coincidence, my brother had rented a cabin there for a few days and I was able to stay there for some nights. I visited mainly the national park around the Ylläs fell. There were quite a few interesting places.

Near the Ylläs fell and the Äkäslompolo village lie two very deep saivo lakes, Äkässaivo and Pakassaivo. The saivo were though to be sort of bottomless lakes that lead to the Underworld. In the other world, there lived some other people. There were also couple of sacred seita stones nearby. I took walks around them on Wednesday, Friday, and Saturday. On Thursday I had to work most of the day - isn't Internet wonderful? I logged four geocaches.

On Saturday evening, I went for a short trip over the Aakenus fell. It was a 17 km nature trail that goes over the fell and through some marshes. On the Eastern side of the fell there were remains of a German Junkers Ju-52 transport plane that had crashed in the fell during the 2nd World War. One of the crew had survived the crash, but was injured and killed himself as rescue proved hopeless. After the rescuers arrived after 2 months, they found a puppy at the site. It had survived by feeding upon the crew...

At the midway of the trail, there was a "Porokämppä", literally "Reindeer Hut", a small wilderness hut, which is free for trekkers. It was quite comfortable and I stayed there overnight. In the Sunday morning, I released Vaadin 6.8.0, as the location was more than convenient for our reindeer-themed product.


I arrived back at my car a bit late in the afternoon and headed back to Turku. The drive 1000 km south took almost 12 hours, so I arrived home at about 6 am. I was quite tired and slept a bit long.


Well, the trip was quite interesting. As I had left everything extra off my car (roof box, rack, bicycle), I managed to squeeze the gas consumption to well under 7 l/100 km. Next time I would probably take my kayak with me, or the roof box, which would raise the consumption a bit. It's usually been around 8 l/100 km with the roof box.

Tuesday, March 20, 2012

New revision of Book of Vaadin is out

Work stuff. We have been getting a new revision of the Book of Vaadin out about every six months and the latest came from print today. This time we didn't increment the edition number, so it is the 1st revision of the 4th Edition. Essentially, one major reason was that we ran out of colors in the Vaadin color palette so the new revision looks just as yellow-orange as the original 4th Edition.

Regardless of the similar appearance, the revision packs almost 100 pages more content. The biggest change is the reorganization into two parts: the core framework and the addons. Some new add-on documentation is included in the core part: Vaadin Control Panel for Liferay, Vaadin IPC, and Vaadin WSRP. The SQLContainer add-on is now part of the core framework.

Of the add-on documentation, the JPAContainer chapter was entirely rewritten couple of months ago and the Calendar chapter was revised more recently.

Unfortunately, there are some outdated parts that went to print. Most notably, there is a really outdated material in the Vaadin embedding section, related to version 5.2. I hope there isn't much Toolkit 4 stuff left, just cleaned some references out at the last minute.

This all applies only to the print edition, which you can pick up for free at some conferences. The web edition is always the latest and it gets all additions on the same day I edit it.

Vaadin 7 is in the works. We hope to get a preview edition of the Vaadin 7 book out in the summer, in July or so. Perhaps it could be red, if we begin the color cycle in the same order we did with Vaadin 6. The color is always a big decision.

Saturday, January 21, 2012

JPA and Vaadin JPAContainer

I've been finalizing the completely rewritten chapter about Vaadin JPAContainer this week. I still need to check that everything really important is included.

I don't have almost any previous experience with JPA, which is kind of good thing when you write documentation about something. That way, you personally know all the questions a beginner would have.

JPA and ORM in general seem pretty important technologies. Whatever your application is, you most probably need some data storage. Using ordinary files is possible, but not near as handy as proper databases. However, stuffing complex class structures through the square holes of database tables was a hell before the ORM technologies emerged. XML databases and NoSQL were much nicer for structured storage.

Some years ago I did some experiments with related technologies, such as JAXB and Hibernate, but using them was a bit too much effort at that time. Using Hibernate with Vaadin really required a Container implementation, but there wasn't one at that time. Well, JPA is quite close to Hibernate, and Hibernate is currently one of the JPA implementations.

Vaadin JPAContainer makes things really easy.
// Create a persistent person container
JPAContainer<Person> persons =
JPAContainerFactory.make(Person.class, "book-examples");

// You can add entities to the container as well
persons.addEntity(new Person("Marie-Louise Meilleur", 117));

// Bind it to a component
Table personTable = new Table("The Persistent People", persons);
personTable.setVisibleColumns(new String[]{"id","name","age"});
layout.addComponent(personTable);
So, just one command to get a container bound to data in a database table. JPAContainer is, however, just for binding user interface components directly to data. You can use it to add or edit the data, but using pure JPA is much nicer, easier, and more flexible for that.
EntityManager em = JPAContainerFactory.
createEntityManagerForPersistenceUnit("book-examples");
em.getTransaction().begin();
em.createQuery("DELETE FROM Person p").executeUpdate();
em.persist(new Person("Jeanne Calment", 122));
em.persist(new Person("Sarah Knauss", 119));
em.persist(new Person("Lucy Hannah", 117));
em.getTransaction().commit();
Well ok, here we got the entity manager from the JPAContainerFactory, which makes that a bit easier than normally.

JPAContainer is a commercial product. That shouldn't be a problem if you're coding for a company that can pay the license. For free software, you can use the AGPL license. I've always felt that this sort of dual-licensing scheme is most difficult for "potential startups" where you experiment with a business idea, but do not yet have a company to back it up financially. You do not normally have the money to invest in licenses at that point, and a company might not want to invest much in such experiments either.

There are of course alternatives for JPAContainer. Using pure JPA is quite OK approach as well, combined with BeanItemContainer in Vaadin. There's also SQLContainer. It is also something I don't know about, as I didn't write the chapter myself. I would need to review and reorganize it in next weeks though, and possibly rewrite at some point.

Well, I did make a couple of mistakes while writing the JPAContainer chapter. The first one was trying to just update a really complex design documentation written by someone else, in a topic I knew nothing about. Writing is always a learning experience and it's not sensible to try to write about something very complex that you don't have a clue about. Sometimes, it's best to start from scratch. Unfortunately, I didn't do that when I started, but just over a week before the release.

Another issue is learning by doing. I usually start writing documentation by experimenting how it works, making some example code. This time, as I was in a hurry, I tried to skip that phase. I only started it as the last effort when I was totally stuck, some 4 weeks of struggle behind and 2 work days before the release date. Just in those couple of days, all pieces fell into place and I finally understood how everything works.

Wednesday, January 18, 2012

Wikipedia and Antipiracy Laws

So, if you have noticed, we've had a Wikipedia blackout. I normally use Wikipedia to look up dozens of articles daily, so I'd be pissed if their protest wasn't really valid.

As innocent they sound, the "Intellectual Property" laws are a big threat, really. They are somehow understandable, which is the reason why they exist, but at the same time, they may be a big threat to modern civilization.

You might think that they are not a problem to you, as they only prevent criminals from making crimes. You might even think that you want your intellectual properties be protected.

Their aim is to prevent illegal copying. Artists and others work so that they would get paid, and illegal copying is kind-of stealing from them. So, forbidding illegal copying is rather understandable.

So what's the fuzz about?

Let's consider the problem with DVDs. They use the "CSS" encryption mechanism to prevent unauthorized copying. Fine, excellent, evil pirates suffer, right?

Unfortunately, watching CSS-encrypted movies requires special software that holds a special decryption key. The software is usually free-of-charge, but it's only for Windows, and perhaps for Mac as well. For Linux, which I use, there is no such authorized software for watching DVDs.

Fortunately, some Norwegian guy cracked the CSS key and wrote a decryption algorithm some 10 years ago and now there's "DeCSS", an algorithm to play (and copy) any DVDs.

So, over the years I've bought some 200 DVD movies and I've always watched them with Linux and nothing else. I've never copied a DVD that I've bought, only watched them.

However, using the DeCSS algorithm for any purpose is illegal in Finland. It's been tried in court.

The fact is that, once cracked, CSS became totally obsolete forever. The laws will never have any effect on unauthorized copying. But they will continue to prevent morally right use of your property.

So, pirates who operate illegally of course use the DeCSS decryption to make one copy which they then copy to millions. But people like myself, who buy DVD movies legally, are criminals. Trying to stop a few criminals, they incriminate perhaps millions of Linux-users around the world.

So why should you care? Linux users are somewhat rare, and you're probably not one of them (except if you use any of the 60% of the web or 55% of smartphones or a TV).

Oh, but it also affects Windows users. There's free DVD watching software for Windows as well, such as VLC, which is actually quite popular as it's very good. But it's illegal, as it has to use DeCSS. The laws prevent writing and distributing any free software that you could use to watch DVDs.

Obviously, preventing the use of free software to watch legal DVDs was not the purpose of the laws. It's just a consequence.

It's a good example of a case where somewhat understandable reasons lead to absurd results. Even so, the vast majority of the Finnish parliament supported the law. And there is a lot more IP legistlation on the way.

Oh, did I mention that Finnish consumers can legally copy movies and music for their own use and to friends. We even pay a tax for that when we buy DVD-Rs. But copying by circumventing CSS is illegal.

Given the absurd criminalization and heavy anti-"piracy" lobbying to take away your rights, you should have no sympathy for the movie industry. O'hoy pirates! Go and board them!

So, to SOPA or PIPA...

I'm not personally familiar with the new legistlation initiatives in the USA. As far as I've understood, it's something similar as the recent Finnish laws that allow blocking child porn and peer-to-peer download sites. The laws already have a sad history of abuse. For example, the laws do not allow blocking websites inside Finland, but they've nevertheless done so as there's no possibility to legally challenge the decisions.

The pattern is that "reasonable requirements" can have devastating effects. The current laws are largely based on the assumption that you are responsible for your own publications. The suggested laws place the responsibility on the owners of web servers and internet providers. So, if me or you were to publish the DeCSS code here in the blog, the Blogspot would be considered the "publisher" that is responsible for our writings. To protect itself, Blogspot would need to have editorial review for everything any one of the millions of bloggers write.

This would quickly kill almost all blogs, discussion forums, and websites in the Internet. Also Youtube and such. It would kill the basic freedoms that we take for granted, and most of the Internet.

Part of the Finnish goverment already has plans to expand the blocking further. Some want to block information about drugs and weapons. Then racism of course, blasphemy, information about bombs, porn, denying the Holocaust, undemocratic thought, ... anything to protect the children, leaders, gods, and corporate owners.

Even though basic IP laws may be necessary, the recent development upholds corporate ownership rights over consumer ownership rights. They are used to buttress dentrimental monopolies and force you to pay vastly overcharged prices, even for basic necessities. They distinguish diversity and freedom, which are the life forces of the modern technological and scientific ecosystem.

So when you see the blackout screen at Wikipedia, just imagine the day when it could be blacked out by your government.