KDE 4's ultra-sexy text editor control

I like simple editors and use Kate a lot. It’s like Kdevelop, but without all the additional baggage. It does syntax highlighting and indentation just fine, and it has code folding and can comment and uncomment entire text blocks. If an editor has all of that, it’s already making me very happy.


I was curious to see what will change with Kate in KDE 4, so I installed the KDE 4 version today on Ubuntu 8.04 (Hardy Heron), since it’s nicely packaged there. The screenshot above is from that version. Just wow. Text display is crisp and look at those code folding depth indicators (the gradually greener line on the side). When I took the screenshot, I was hovering my mouse over the greenest part, which highlights the block at this depth. The triangles let you fold code, of course.

Beautiful, isn’t it? And they must have done something to text rendering in Qt4, because the text elsewhere in the window looks sharp enough to cut entire horses in half. I can’t wait for KDE 4.1: maybe that’ll be a reason to switch the whole desktop like Shane is currently trying. The least I will do is switch to the KDE 4 version of Kate already 🙂

Popcorn Hour A-100: A proper media player box

popcorn-hour-a-100.jpgI’ve tried the Xbox Media Center, I’ve tried hooking up a full PC to my TV, but nothing beats the tiny little Popcorn Hour A-100 I just received. It’s silent, only wants 12V of voltage, has a BitTorrent downloader built-in and can access an internal hard drive if you mount one. It plays Full HD 1080p video smooth as butter in XviD, H.264 (even in Matroska containers), WMV — whatever you toss at it. And it costs less than USD 200.

I have no computer that is fast enough to play 1080p video properly when it’s high-bitrate H.264, but this thing chews through anything without the slightest trouble. It has HDMI, component, composite and S-Video outputs, and you can solder an RGB SCART output to it. You can play data off NFS or SMB shares in your network, off YouTube directly, from Flickr and Picasa and from any attached USB storage device. All my external hard drives are ext3 formatted, and it reads ext3 just fine; it’s the native format of the machine. Hell, it even plays DVD ISO images, with menu support, and you can hook up any external USB DVD drive and use that for DVD playback. Even has an eject button for the external drive.

Need a perfect media player device for the GNU/Linux user (and extended family)? It’s this.

French court forces dealer to refund Windows price

This is the third time that a French court had to force a PC dealer to return the money for an unwanted copy of Windows. The Slashdot article has some more information in English. The refunds were between 100 and 300 Euros, depending on version of Windows etc.

Do the math. Laptops nowadays often cost under 700 Euros. Laptop makers still bundle Windows and force it down customer’s throats, but if you don’t want that software, return it! It can shave up to a quarter off the price of your laptop, as you can also get a refund for MS Works or other software that was included without asking you. You can then use some other operating system on the machine, or if you want to keep using Windows, you can use your existing license. Tying a license you’ve already bought to a specific laptop you bought it for is also not legal in many countries. If this happens to you, check what the situation is for your country and perhaps sue the company.

Chairman of Norwegian ISO mirror committee reveals whole story

The chairman of the Norwegian standard body’s SC34 (K185) group has resigned after 13 years, in protest of the recent acceptance of MS-OOXML by Standard Norway. He now reveals details on the entire (farcical) voting process:


The Swiss working group may have gone through some of these things as well.

Norwegians protest against OOXML

While Switzerland’s people can see nothing wrong with the scandalous acceptance of MSOOXML as an ISO standard, Norway sees it differently. Perhaps that’s because Norway is more successful in the international software business (Opera, Funcom, Trolltech etc.) and therefore has something to lose, while Switzerland has a very passive and consumerist attitude.

But never mind the reasons, Norwegian people were smart enough to gather in front of the ISO SC34 meeting for a demonstration to kick OOXML out of ISO. One sign even asks Neelie Kroes to intervene. Seeing that the EC has started an investigation into the irregularities encountered during the OOXML voting process, it looks like she read the sign.

Yes, throw IS 29500 out. It’s a broken specification, and there is proof. If any other company had submitted this spec, they would have been sent back to the drawing board to fix all the defects. But Microsoft has the power and the money to manipulate and to bribe, so they can undermine ISO’s integrity and force steaming piles like this through an erstwhile respectable standardization process.

The general idea being tossed around by leaders of the Swiss standardization body is now “let’s all be happy and hug each other, and start to fix IS 29500 together”. Come again? Why should we waste our time and money to fix a broken product that we do not even control, because of the patents on it and because of the proprietary extensions that are at any point possible? Why shouldn’t we instead invest this time into making the existing ODF standard even more interoperable and accessible? It’s not impossible that IS 29500 at some point is mature enough, but the problem is that it should have been mature enough to begin with. Microsoft should not have submitted such a broken spec and come through with it. That they have shows that the standardization process has failed.

Link via noooxml.org.

ISO approves broken standard amidst massive irregularities

The whole voting process for fast tracking DIS 29500 (i.e. MS-OOXML, Microsoft Corp’s broken new format for office documents) was full of irregularities. Votes that were not counted or counted wrongly, Microsoft Gold partners that were bribed into joining national standards bodies to swing their opinion around in the last minute, meeting rooms for discussing these issues that were deliberately too small for people who could point out the flaws in the formats, but not too small for its supporters.

I read the news reports as all of this was happening and couldn’t help but be reminded of fake elections in a corrupt country. I also had to laugh. I believed that ISO was on top of all this, would not stand for such corruption and would use their own processes to find the people responsible, punish them appropriately and bring the voting process back to a reasonably democratic shape. I was so naive. ISO has failed. Failed in their mission to jointly introduce new standards for and with its members, failed at assessing a technical standard objectively, failed at taking the voices and concerns of their members seriously, failed at being a neutral body without bias.

There are ways within ISO to disapprove a standard, but if they are governed by the same people, I see no hope of getting this severely broken standard to a place where it belongs.

Today is a black day for freedom. And if you like democratic process, it’s a black day for that too.

Update: Mark Shuttleworth (founder of Canonical, maker of Ubuntu) is sad too: “It’s sad that the ISO was not willing to admit that its process was failing horribly.” He offers a few more details. I’m not willing to risk talking about things I am not allowed to talk about, so I’ll leave uncovering the internal failings to the real news sources for now. Shuttleworth provides a good summary.

Update 2: The European Commission is investigating the irregularities encountered during the standards approval process. Maybe there is still hope to get rid of some of the corruption and hopefully get the standard revoked, so that its vendor can apply for standardization again and do it properly this time.

Gbarcode Support for Ruby FPDF

I was going mad fixing a bug in a very convoluted barcode printing feature in the equipment management system we’re developing. After a while I gave up — we must have triggered something deep within Rails or Ruby, and it wasn’t going to go away soon. The details are complicated and boring, and I ended up rewriting our barcode handling. As a side effect developed an extension for Ruby FPDF to support Gbarcode 🙂

Please give it a try if you need barcode support in your PDFs and let me know what you want to improve and what fails horribly for you.

Our OpenVZ Virtualization Experience

We are currently finalizing the server consolidation in our department. The product we chose for virtualization is OpenVZ, because it sports creepy Russians.

All in all, it was a bit of a roller coaster ride, but once we figured out that most of the problems came from our own incompetence, we quickly stopped pointing fingers and shaking fists and instead read some documentation. Then all was good. We went from 12 servers to 5, killing 7 physical servers and saving roughly 1500W of power consumption. The new virtualization servers we used were actually the old database server and the old main web server, both overpowered. A change in the mentality and the technical competence level required from our students in the last few years has made the extra power for these boxes unneccessary. Now we’re using them much more efficiently because each of them runs several virtual servers.


We wasted a lot of time learned a lot by going the opposite route when it comes to OpenVZ configuration. Most people are advised to start with a BIG configuration for each virtual private server (VPS), we started with a tiny one. This meant that memory parameters were at a bare minimum, normally mimicking the specs of the hardware machine we were virtualizing. In the same go, we grouped services differently so that we could reduce the number of servers, again making better use of the available hardware. For servers that are created from scratch (not based on an existing physical machine), we also started from a minimal config file and went up from there.

This approach not only made me grow at least six new white hairs in my beard, but it also taught me about the importance of KMEMSIZE. KMEMSIZE is your friend. KMEMSIZE loves you. KMEMSIZE is soft and fluffy. Trust KMEMSIZE.

The problem with KMEMSIZE was that while we did assign enough memory in the main UBC memory categories (vmguarpages, oomguarpages, privvmpages), we didn’t have enough KMEMSIZE for our NUMPROCS. Just picture this! The poor NUMPROCS! The net result was that the server couldn’t fork new processes once its amount of KMEMSIZE was eaten up. So after multiplying our expected NUMPROCS with the estimated unswappable memory consumption per process, things worked perfectly.

Now our OpenVZ environment is very, very stable and very, very efficient. We’re very, very happy. This is a very, very success story.

From Zero to Virtualization: Linux-Vserver vs. OpenVZ

We’re currently evaluating solutions for virtualizing GNU/Linux servers at the HGKZ in order to replace seriously aging hardware (700 MHz P3’s!). At the same time, we can be hip like you and use important-sounding words such as “machine consolidation”, “hypervisor” and “cuttlefish”.

Gino is evaluating OpenVZ while I’m looking at Linux-Vserver. Both solutions have a similar approach: Don’t create virtual machines. Instead, create virtual servers that are sealed away from each other, but running on the same kernel. This has its own set of advantages and disadvantages, but I won’t go into that, you can read about it elsewhere.

Here’s a handy comparison table of what we found out so far:

Linux-Vserver OpenVZ
Kernel Pre-patched kernel included with Debian Need to patch your own or rely on outside sources for binaries
Networking Networking for guests works out of the box Needs IP forwarding on the host, custom network config on the guest
Developers Funny Austrians Creepy Russians
Documentation Horrible mess in six different states of rebuild and decay Well-structured, organized and maintained
Affiliation Snuggles a bit with RPM-based systems sometimes Spends entire weekends in RPM-based systems’ beds and refuses to leave come Monday
Debian Is treated like a leper, but a very friendly one Is the enemy
Guest configuration Implicit but convoluted Explicit but straightforward

There, that’s hard scientific facts for you.

After all of this probing, compiling, tickling, testing and general mayhem, we have decided to go with OpenVZ. To reach that decision, we of course evaluated both solutions on many levels (don’t let that table fool you). There are clear philosophical and architectural differences between the two solutions, but one key factor in our decision was that for the administrator, both systems are almost too similar.

Yes, OpenVZ takes a more complicated approach to networking, but Linux-Vserver takes a more complicated approach to configuration. Yes, a Linux-Vserver host’s default config is mostly what you want and just seems to work out of the box, but this lowers your motivation for learning the details of the resource management system. And details, as you surely know, are nearly always ugly.

With OpenVZ, you are forced to learn these things up front, which presents a steeper learning curve but gifts you with a more solid grasp of the technology. You get to flex your math muscle to fit virtual servers into your actual hardware’s limitations without creating an impossible physical paradoxon that rips a hole into space-time, and that’s quite handy. With Linux-Vserver, these things might come back to haunt you later, when you’re trying to put vserver no. 22 onto your machine and discover your 16 GB of memory are already spent, and that’s when details bite a tasty chunk right out of your lower backside. The decrepit state of Linux-Vserver’s documentation does nothing to ease your fears in this department. Convoluted configuration would otherwise be okay, as long as it’s well-documented convoluted configuration.

Now what if we are wrong, and within the next 8 months someone writes The Linux-Vserver Bible (Illustrated Swimsuit Edition) and SWSoft decides to pull the plug on support for OpenVZ, leaving us without any burly Russian engineers to take care of the code? That may seem sad, but it paves the way for such a beautiful pink-colored fluffy thought that it nearly makes my skull burst: We would still be fine. Both of the solutions are open. No proprietary formats. No secrets. We can migrate from one to the other at any time.

Dell Germany Refunds Vista/Works Price to Swiss Customer

Hurrah! “mad” from TheAlternative.ch created a fantastic precedent for us silly Swiss people: He sent one e-mail to Dell and immediately got a refund for both the unwanted Vista and the copy of MS Works included with his new laptop. He saved 15% on the laptop’s price this way, as well as getting rid of software he doesn’t use. Read his story in English or German.