Skip to content
Feb 15 10

Server Migration: Doing it the Wrong™ Way

by Lasse Havelund

I recently migrated my server to a Linode 520 setup, which, so far, is working fantastically. Great support (professional and community), fantastic features, and amazing uptime (I haven’t been on it that long, but I’ve no downtime since this was first setup). Deploying Ubuntu 9.10 was a matter of a couple of clicks, and after a couple of hours, I’d already migrated my MySQL database, copied my Apache vhosts over (well, I’ve migrated to lighttpd in the process), and everything was setup perfectly.

I was postponing moving stuff like my blog and websites over until a later point, which turned out to be a very bad idea.

Firstly, you’ll see I have no images included in my post. I doubt I’ll fix this, as most of those files are deleted off my local hard drive the moment I upload them. Various caches reveal nothing, and frankly, I don’t care that much about them.

Moral of the story: If you’re planning on migrating, dig out your data early, and take notes if you change anything along the way.

Jan 20 10

OpenOffice.org is “a piece of crap”–or is it?

by Lasse Havelund

Recently, a report (PDF) on a number of students opinions on OpenOffice.org Writer vs. Microsoft Office 2007 Word and OpenOffice .org Impress vs. Microsoft Office 2007 Powerpoint, whose conclusion is down-right depressing to those of us, who would prefer to see open source software introduced into education. I sought out to attempt to see if I could confirm–or debunk–the comments made by the students, and from that, provide some feedback to the OpenOffice.org developers on how we can create an even better office suite, which would help us introduce it to educational and academic institutions.

The students, aged 14–16, who had previously only worked with Microsoft Office 2003, were given two tasks. The first one was to do with creating a presentation, the second to do with writing a document, which used mathematical typesetting.

Impress vs. PowerPoint

The students were given an introduction to Impress first, given two hours to work with it. The students then received instructions on how to use PowerPoint 2007, and, again, given two hours to work with that. The students were given free reign to do as they pleased with the presentation, but urged to include audio, video, images, animations and so on in their presentations.

When evaluated, the students noted that importing sound into Impress was difficult, that the application was slow and crashed often, that changing slide backgrounds and designs was difficult–all said with a healthy dose of expletives. PowerPoint received little to no criticism–only praise. Bummer.

Word vs. Writer

The students were given the task to transcribe a number of mathematical equations from a paper. They were, as with the Impress/PowerPoint test, given a quick introduction, and a time frame to work with the two applications. The students reported issues with simple symbols like “+” and “-” not showing up (the report says this is likely due to an ‘install error’; I’m thinking charset or font-related), and this ruins the impression for a lot of the students.

My Go: Which is Better?

In some ways, I love OpenOffice.org. I don’t use word processors or spreadsheets. I tend to use LaTeX for anything I write which has to look even the slightest bit nice, be that a letter or a report, so I haven’t used Office 2007 or OpenOffice.org much over the last few years.

I decided to look at the different problems the students faced, and give my own opinion of the applications.

For these tests, I used OpenOffice.org 3.1.1 and Microsoft Office 2007 on a Windows 7 system, due to some nasty problems with Wine.

Impress vs. PowerPoint

I figured I’d do the test by creating a quick presentation with images, charts, text, lists, audio and so on from a pre-made template available in the application on first launch. It didn’t take me long to create one in either of the applications, but I was amazed with the ease of use and quality of the templates made available in PowerPoint. The product I got from each of the applications, having spent maybe 10 minutes with each, is visible below on a sample page.

That's PowerPoint at the front.

There’s no question that the PowerPoint presentation looks much slicker, much more professional and much more appealing. Well done, Microsoft. Well done.

I did notice a lot of problems adding sound to an Impress presentation, something which was easily done with a couple of clicks in PowerPoint. I never managed to add a sound that worked in Impress.

Both performed reasonably well at inserting charts and images, but positioning and styling was much better in PowerPoint.

In this test, I’d say PowerPoint wins hands-down; there’s still a lot to be done in Impress to make it just as useful as PowerPoint is today. If I were to pick between these two programs, I would choose PowerPoint (good thing I use beamer).

Word vs. Writer

One of the great advantages of using LaTeX, like I do, is how incredibly easy it is to typeset mathematical equations and formulae. I’ve always been skeptical of using word processors for mathematical typesetting, but I felt like I should try to repeat the test they did by typesetting a number of simple bits of math, like expressions using square root, playing with superscript, fractions, etc.

Like the students, I started with Word, and quickly got comfortable (well, semi-comfortable) with Word’s built-in equation editor. The typeset results are beautiful and clear, automatically centered, x^2 is automatically translated to $latex x^2$, etc. It just felt right somehow, with the only point of criticism I could find was the inability I had to type multi-line equations (again, I’m spoiled by LaTeX).

Pretty, and functional.

I started on my document in Writer, but I found the mathematical input to be lacking and annoying. Wanting to use the input panel supplied instead of fancy keyboard shortcuts, I found myself incredibly handicapped.

What? Seriously?

I gave up half-way through and went back to Word. Yes, I said it. I went back to Word.

Conclusion

The study was ignored, and OpenOffice.org was implemented anyway. Yay, some would say. I’m not sure what to think. Microsoft licenses are incredibly expensive–imagine the hardware that could be purchased with the amount of money it would cost to equip a school with Office 2007–but isn’t good education, particularly in computing, priceless? I value OpenOffice.org greatly. I think it’s a great product, but some things do need ironing out, as both my personal experience and this study outline.

OpenOffice.org was not up to par with Microsoft Office 2007. I will not, personally, use Office–be it open or not–but I can definitely say which one I would be using if I were: Microsoft Office.

To any OpenOffice.org developers reading this: Keep up the good work. You’ve come far. You’ve created a great product, used by millions of people every day. But continue to improve. I don’t necessarily want you to give me a pretty ribbon interface, but work on accessbility. Changing backgrounds and designing themes is hard in Impress. Work on the mathematics input in Writer/Math. It needs it.

Jan 11 10

How to Make a Pipe Bomb

by Lasse Havelund

The Internet as we know it is changing. Recently, several cases of Internet censorship, something I am heavily opposed to (and you should be, too!), have sprung up online.

Recently, the Socialist People’s Party of Denmark, with the support of three other major parties, suggested to outlaw online search queries for how to make a bomb, downloading “bomb manuals” and whatnot. It seems like it’s only going to be a matter of time before it’s enacted into law, because the four parties in question form a majority in the Danish parliament. So, without further ado, I here bring you a small recipe for how to create a pipe bomb.

Introduction

A pipe bomb is a very powerful type of explosive, due to its small size, and its ability to send dangerous shrapnel flying everywhere, with the potential of killing dosens ruining that new painting in your living room. You’ll need the following:

  • A solid, sealable metal pipe. Make sure it looks nice. You want to make a good impression with this bomb, so at least find a nice canister (you may paint it if you wish).
  • Gunpowder. A lot of gunpowder. Enough to fill up your little pink, dotted tube.
  • A drill.
  • A fuse.

Building your bomb

Assuming you’ve already painted the exterior shell of your pipe bomb, drill a hole in the cap of it. Fill the pipe with explosives, close it, ensuring it’s shut completely, and insert the fuse in the hole. Congrats, you have a working pipe bomb!

On a more serious note…

This whole internet censorship business has to stop. How long is it going to be before everything we do in the internet is regulated completely by what our governments think we should be seeing?

Jan 2 10

GRUB: A Usability Hurdle (pt. 2)

by Lasse Havelund

I posted my thoughts on GRUB’s visual appearance yesterday, and received quite a lot of useful comments and feedback, most of which were positive and supportive of my argument that GRUB isn’t particularly user-friendly, and needs work. I worked on some of the ideas, specifically incorporating a current idea, drafted by the (Ubuntu?) design team, as supplied by MadsRH. Here it is:

This proposal is simple, easy on the eye, and generally very easy to work out. The pop-out menu is only shown when the “custom boot” key is invoked, so that clutter is nothing your average end user will see.

More comments, please — I love comments.

Jan 1 10

GRUB: A Usability Hurdle

by Lasse Havelund

While GRUB is an excellent boot loader, but even with the introduction of GRUB2 in Karmic, it’s still an eyesore, and frankly, highly confusing for most users. For example, when my system is booted, I get cold, black menu, giving me the following options:

  • Ubuntu, Linux 2.6.31-17-generic
  • Ubuntu, Linux 2.6.31-17-generic (recovery mode)
  • Ubuntu, Linux 2.6.31-16-generic
  • Ubuntu, Linux 2.6.31-16-generic (recovery mode)
  • Ubuntu, Linux 2.6.31-15-generic
  • Ubuntu, Linux 2.6.31-15-generic (recovery mode)
  • Ubuntu, Linux 2.6.31-14-generic
  • Ubuntu, Linux 2.6.31-14-generic (recovery mode)
  • Ubuntu, Linux 2.6.31-11-generic
  • Ubuntu, Linux 2.6.31-11-generic (recovery mode)
  • Memory test (memtest86+)
  • Windows 7 (loader) (on /dev/sda1)

For people like me, who’ve used Linux for a long time, it’s easy to see that each Ubuntu entry uses a different kernel, and I know the recovery ones have different boot settings (I’ve never needed them, so I wouldn’t know what is different). Additionally, I’ll know running memtest86+ can be useful for diagnosing any problems you might have with your memory, and I know that “Windows 7 (loader)” is my Microsoft Windows 7 Professional partition. However, I don’t think it’s fair to assume everyone understands this.

Instead, I propose a new boot loader layout, borrowing on the concept from Apple’s Boot Camp:

If F12 (or another keyboard shortcut) is pressed, the user is presented with different startup options (and kernels) available for each operating system (in the case of free systems, Windows, for example, probably couldn’t be manipulated like this).

What do you guys think?

Update: I posted more about this here.

Dec 26 09

Idea: Input Analyser

by Lasse Havelund

As much as I would love to call myself a programmer, I’m not. In any way. I have had several ideas for applications I’d love to write, but my skill set does not match my expectations or goals in programming, and every time I’ve tried getting up there, I’ve failed.

Instead, I feel I should vent this idea for a bash input analyser I’ve thought up. My rationale for it is this:

  • From having observed #ubuntu for a long time, I know that people often suggest command-line approaches to solve problems. This isn’t necessarily a bad thing, but a lot of people blindly execute them, and have their problem solved with no idea what they actually did.
  • Often, malicious commands are posted on forums, IRC (we have a zero-tolerance policy for this on the #ubuntu IRC namespace) or other places, and people will run them out of curiosity.
  • It might make the terminal a slightly less scary thing to approach for a lot of users.

Walkthrough

For the sake of simplicity, let’s call the program blarg. It’s not very descriptive (I was thinking of something like identit), but it’ll work fine in this particular case.

Mark is new to Ubuntu. He has issues with opening a file, and upon asking in #ubuntu, the problem is identified to be a permissions issue. The file is owned by root, and permissions are set to 700. He is instructed to run sudo chown mark:mark foobar && chmod 755 foobar to resolve his issue. He runs the command, he can now open the file fine, but what exactly just happened?

Enter blarg

Mark is still wondering what on earth went on with those two lines. He could open the manpages for chmod and chown, but he’d have to trawl through two long, cryptic manpages (they are long, and cryptic) to find the information he’d be interested in. Instead, Mark runs blarg "sudo chown mark:mark foobar && chmod 755 foobar" and, magically, he gets the following output:

~/ $ blarg “sudo chown mark:mark foobar && chmod 755 foobar”
1. sudo chown mark:mark foobar &&
   Changes the owner of the file foobar to user: mark and
   group: mark with root permissions, and then continues
   unless an error is encountered.

2. chmod 755 foobar
   Changes the permissions of file to foobar to owner:
   read/write/execute
, group: read/write, and others:
   read/write

For more information, see the following man files: chmod, chown

Apologies to you Planet Ubuntu users out there–you’ll have to read this entry directly to see the above in its full, painful glory.

Possible issues

This is a bit of a maintenance-heavy beast. It’s also pretty difficult to decide where the line between whether it should be included or not should be drawn. Commands such as rm, df and so on are pretty much a given (including documentation of all the flags they provide), but what about commands like dd, gpg, or git?

In addition to that, I don’t see this as being a very heavy task in terms of programming, but the library of commands/arguments/definitions would be huge. Perhaps if some sort of community-provided additions could exist?

What about stuff like forkbombs and other “known” mailicious commands, like rm -<recursive flag><force flag> <mounted location of root filesystem> (we all know what I’m talking about)?

Tell me what you think–and if you like it, get hacking! :)

Edit: Updated links to manpages. As João Pinto rightly pointed out, I simply linked to the first two Google results I found. My apologies.

Update: Tom is having a look at doing just this over here! Kudos to him :)

Dec 22 09

Congratulations to the new Ubuntu IRC Council!

by Lasse Havelund

I love the Ubuntu IRC-sphere, which is probably one of the communities in which I spend the most time online.

The Ubuntu IRC namespace is governed by the Ubuntu IRC Council, which has just had three new appointments, out of the total five members.

  • Juha, who I’ve had the pleasure of working together with in #ubuntu-offtopic, and whom I’ve always respected greatly for his calm, down-to-earth nature, and his efficiency in dealing with issues. And who can stand for his happy summer face?!
  • Terence, probably the person who knows the most about the bots used in the various Ubuntu channels, who I’ve worked procrastinated with over the past few months (I’m supposed to be doing ubuntu-bots documentation), and who is an excellent operator with a calm temper, and a great ability to diffuse problematic situations.
  • Nathan, who I’ve admittedly not worked together with, but who earned a lot of respect with me after a certain controversial ubuntu-irc mailing list issue, where he proved to be the most to-the-point and productive one throughout the entire thread. Many kudos from here, Nathan.

All in all, I think the Community Council excelled in picking the optimal people for the IRC Council. Yes, there were plenty of other good candidates, but I highly appreciate the CC’s choice to allow new people to join the ranks of the IRC Council. Truth be told, a breath of fresh air has been needed.

Again, congratulations topyli, tsimpson, and nhandler!

Dec 21 09

On the Mathematics of Pizza…

by Lasse Havelund

As most geeks, I enjoy pizza sometimes. In fact, I enjoy pizza all the time, and most people would probably say I enjoy it a wee bit too much.

I discovered something interesting today, I thought I’d share: the Mathematics of Pizza. This calls for a bit of basic geometric knowledge, but I think I can muster that despite my general lack of mathematical skills.

A pizza

Your everyday pepperoni pizza.

Presumably, most people will know what a pizza looks like. That’s one right up there. Your average cheese and pepperoni pizza (I know my Inkscape skills aren’t fantastic, but I assume you get the idea anyway).

What we’ll notice about the pizza is its shape. It’s round. It’s a circle. Or, technically, it’s a cylinder, because it has a height (normally written as h). The formula we’re normally given to calculate the volume of such a cylinder—or pizza—is $latex v = \pi \cdot r^2 \cdot h$, where v is the volume of the pizza, r is the radius of the pizza, and h is the height of the pizza. Pretty straightforward. However, think a different formula would be more appropriate:

$latex v = (pi) zza$

In this case, the variables used are z is the radius, and a; is the height of the pizza. Of course the pi is in place of $latex \pi$. Simple. I’ll finish off with a practical example:

A pizza has the radius (z) 20cm. Its height (a) is 2cm. Its volume can be found like so:

$latex v = \pi zza \\ v = \pi (2\cdot 20\text{cm}) \cdot 2\text{cm} \\ v = \pi \cdot 80\text{cm}^2 \\ v \approx 251.327412 \text{cm}^2$

Simple, and lovely!

Note: I’m not a big enough of a genius to realise this. Source is here. It was also to check if WP-LaTeX would play nice with my setup. ;)

Dec 16 09

Free and Proprietary Software, Pragmatism, FSF, Stallman, and de Icaza

by Lasse Havelund

Back in the day, Richard Stallman started what could be considered a revolution, working to promote Free Software. Today, Stallman is still president of the Free Software Foundation (FSF), founded by him back in 1985. And, while software development has changed dramatically (particularly over the past 5–10 years), the position and views of the FSF and Stallman himself have not.

What I’m specifically talking about is the rabid puritanism displayed by Stallman—on his own website, as well as the FSF website.

Take, for instance, the FSF Windows 7 Sins campaign website. The campaign “make[s] the case against Microsoft and proprietary software.” The way I read this, the FSF is suggesting that all proprietary (i.e. non-free) software is evil, and should be avoided at all costs, regardless of its function or replaceability.

However, I can still understand this to a certain degree. The FSF want people to use, support and work on Free Software replacements instead of supporting proprietary ones. Right? Sensible, but that’s still not exactly the message I get from the above statement. Oh well, nothing out of the ordinary coming from the FSF camp.

Personal Insults

Miguel de Icaza, the founder of the GNOME and Mono projects, has my deepest respect. Not only has he been the main catalyst of several projects, whose products I utilise every day, but he’s also a pragmatic. Mono, a project developing a number of programs, which allow the use of the C# programming language on other platforms than Microsoft Windows (hint: C# is designed by Microsoft), has given software authors a new tool to write Free Software. De Icaza has often been the target of Stallman’s rants, which are way below any standard I’ve come across (except, of course, Stallman’s).

"Proprietary Software? Not on my watch!"

What struck me, most recently, is this thread on the GNOME foundation-list mailing list. To most of you, it’ll be nothing new. In short; members of GNOME community complain about irrelevant and “offensive” content on Planet GNOME, Stallman responds by saying that if it’s not free, it shouldn’t be on the Planet at all. He goes on to support this by suggesting that because of GNOME’s ties to the GNU Project and, thus, to the FSF, it should not attempt to circumvent the FSF’s goal and aim in any way—“that is, to avoid presenting proprietary software as legitimate.”. Right, the RMS-crazies, we’ve heard of those before.

This prompted the important question: is it time for the GNU and GNOME projects to part ways?

Personally, I would welcome such a split. The GNOME project doesn’t need GNU; on the contrary, with this sort of aggressive policy, I think it’s a counter-productive approach, which only forces people away from the GNOME desktop—a desktop environment I, myself, love and adore.

Conclusion

Stallman was a reformer back in the day. I really appreciate his work with the GNU project. Along with the Linux kernel, it’s what keeps my computer running, after all. I do, however, think the time for zealotry is this kind is history. Stallman has succeeded unprecedentedly, with Free Software being found all around us—Firefox and OpenOffice.org are both widespread desktop applications, used by millions around the world. Routers and other devices ship with Linux. Or maybe the company they work for has a number of webservers in the basement running Apache.

It’s time to realise that we, despite supporting free and open source software, can work together with Microsoft and other corporations developing proprietary software today. I love large-scale (and small-scale) free software projects, and I find the way that several thousand people can work together on the same project, because they want to. And often, it produces amazing software; I’m on my Ubuntu desktop, writing a post on my WordPress blog with Chromium. All three of which are open source projects! Wow! Just wow!

Dec 15 09

Hello, Planet Ubuntu!

by Lasse Havelund

After having gone through the long, complicated quick and simple process of adding my blog to Planet Ubuntu, a blog aggregator for Ubuntu Members, developers, enthusiasts and the like.

So hi, all you Planet readers! My name is Lasse, I’m 18, and mostly active in the Danish LoCo team and the IRC-sphere of Ubuntu. You may already know me as MenZa in #ubuntu-offtopic on irc.freenode.net.

I’m a technology enthusiast and Free Software advocate, but I can’t say I’m a hardcore programmer or script wiz—I’m a translator, scribe, and sociable person, who loves the Ubuntu community.

This was mostly meant as an introductory post to all of you who read the Planet on a regular basis. I’ll be blogging about Linux, Ubuntu, Free Software, Technology, and whatever else comes to mind.