Hva er så galt med «selfie stick»?

Et av ny-ordene i 2014 var «Selfie stick» (kan vi finne et norsk ord, takk?). Dette er en type produkt som egentlig har eksistert ganske lenge, men som har virkelig tatt av det siste året. Det er en stokk eller pinne du kan bruke til å ta bilder av deg selv med selvutløser, eller med en knapp på pinnen, slik at du får med både deg selv og omgivelsene.

CC:BY: Travis Wise on Flickr

«Selfie Stick» CC:BY: Travis Wise on Flickr

I det siste har også mange lagt mye energi ned i å gjøre narr av dem som kjøper det og bruker det. Hver dag dukker The Oatmeal sin «Should you buy a selfie stick» opp i feeden min på Facebook. Ja, det er noe narsisistisk over å eie et objekt hvis eneste formål er å ta bilder av seg selv, men det må da vel likevel være mye bedre å ta bilde av stedet du er, med deg i bildet, når du er på ferie, enn å ta bilde av deg selv der du så vidt kan skimte Big Ben i bakgrunnen.

CC:BY-NC-SA: Viking KARWUR on Flickr

CC:BY-NC-SA: Viking KARWUR on Flickr

Jeg har ikke en selfiestokk, men er ikke helt fremmed for tanken.

Jeg liker å ta bilder, men når jeg er ute og reiser, og ser på typiske turistattraksjoner gidder jeg som regel ikke å ta bilder. Hvorfor skulle jeg det? Andre har garantert tatt det samme bildet, tusen ganger bedre allerede, og jeg kan kjøpe postkortet. Hva er da poenget?

Hvis jeg derimot selv hadde vært med i bildet, hadde bildet handlet om min opplevelse, og dermed inneholdt noe unikt. Om ikke annet, så for meg. Det ville gitt bildene i albumet mye større verdi, og gjort minnene mye sterkere.

Package managers

Photo: Lachlan Fearnley (cc:sa)

Photo: Lachlan Fearnley (cc:sa)

Okay, so I was going to check out polymer, another component framework for web development. Naturally, I went right away, and clicked “get polymer”. It took me to a page giving me several options for retreiving the source code.

The recommended way was to download and install it using the bower package manager. So i carried on to the bower site. Bower is appearantly «A package manager for the web».

So, how do I get bower? – bower.io tells me “Bower is a command line utility. Install it with npm.”. npm is, as you may know, the package manager for node.js

So, how do I get npm? – By using the package manager for my Linux distro of course. apt-get install npm.

That is no less than three layers of package managers!

Making eclipse Kepler and Luna work on Ubuntu

This is a «note to self and to anyone that could need it» post.

I’ve had troubles with Eclipse with some Ubuntu installations for some time. I even have had switched to other IDEs, but now I «needed» some plugins that exists for eclipse, so I decided to try to make it work.

The problem has been that it either just hangs (OpenJDK 7) or crashes (Oracle JDK 7) after 4 seconds. Before this problem I’ve also experienced mediocre to bad performance out of Eclipse on Linux.

Some Googling lead me to this post on Stack Overflow. And the accepted answer worked for me to get around the freeze/crash problem. It seems that it fails to detect which html/js rendering toolkit to use, and crashes when it tries to load HTML widgets.

So, the solution was to append


to eclipse.ini

Also, according to some discussion on Google+, removing the Memory limits and bumping MaxPermSize to atleast 512m should improve the performance.
Screenshot - 01. juli 2014 - kl. 12.39 +0200

And it seemed to do so on my system.

Scale the 1024×768 laptop display to something more reasonable

My laptop has a 1024×768 px display, but most software and webpages these days assumes that you have larger screens, with base font sizes of 16px and up. That’s great, but it makes my laptop display very cramped.

Luckily xrandr in Linux lets you scale your display by some factor. By experimenting a bit, i found that a factor of 1.2 gives me lots of more space on the screen, while everyting is still looks fine.





Cisco releases free and libre H.264 code for browsers


«Cisco, actively involved in the development of WebRTC, has stepped forward with a possible solution. The company is releasing an open source, BSD-licensed implementation of the H.264 specification. It’s also releasing a compiled, freely downloadable binary version of that same source code. Cisco will pay the license fees for that binary module, and won’t pass that fee on to end users.» Ars Technica.

Sounds great yeah? – Then why aren’t I celebrating?

Because it makes harder for truly free and open codecs to get traction, and even survive.

This just makes the problems with H.264 even bigger. We have yet one less reason not to use it, which means that it’s use will be even more widespread, over the truly free and libre¹ video codec VP8, but the license fee problems actually remains the same.

«Cisco will pay the license fees for that binary module». And they offer the source code under a BSD license. But – if you compile this source code, and distributes it yourself, you’re still breaking the codec license, and Cisco won’t pay your fees. So the only thing you can use this source code for is to check that it’s not malicious, and hopefully, when you build it, the binary gets a signature that matches the signature for Ciscos provided binaries, so you can verify that it’s been built from the same source code. But that’s actually pretty unlikely, too.

This is one of the many hollow victories for FLOSS, that actually down the road will hurt free software pretty badly. Rather than going for a truly free and libre alternative, the pill gets just sugared enough for a lot of us to swallow, so we’ll throw our principals over board, and go for the less free alternative, because it’s easy.

We already have open and free implementations of H.264, and have had so for long. It’s called x264, and is the best H.264 encoder/decoder, and have been so for quite some time. The problems with H.264 lies not in the license on the implementation, but the license on the patents and the technology.

Then, why is Mozilla going for the Cisco codec?

Well, that’s the point. Firefox has been unable to use x264, because that makes them a distributor of the H.264 implementation, which means that they’d have to pay licensing fees to MPEG LA, for every download. With this codec from Cisco, they can, if they treat it as a plugin, let Cisco distribute it, and then Cisco will pay the fees.
For the user this is a great solution, and Mozillas focus is on user experience. But it still means that Mozilla can’t tweak the implementation, or make it available to users on platforms that Cisco hasn’t made binaries for. The article only mentiones Windows XP as the platform this would help (Vista and later has H.264 support from the OS). I assume that Cisco also makes binaries for Linux, but I haven’t verified that yet

¹) I know the Ars Technica refers to VP8 as «Google’s proprietary—but zero cost—VP8 codec». But that’s just plain wrong.


  • Gratulerer, Høyre, med valgseieren og en formidabel framgang
  • Gratulerer, FrP, med regjeringsutsikter
  • Gratulerer, Venstre, med mange nye mandater
  • Gratulerer, KrF, dere unngikk ytterligere nedgang
  • Gratulerer, MDG, med gjennombrudd og en representant på tinget
  • Gratulerer, SP, med status quo
  • Gratulerer, AP, med å være Norges største parti
  • Gratulerer, SV, med å komme over sperregrensen


Installing Java in 20 easy steps

So, I want to get Java, for some reason. Here’s the process:


  1. Go to oracle.com, and look for the java downloads
  2. give up, and in a desperate attempt go to java.sun.com. There you’ll find the download
  3. choose the version you want
  4. choose the version you want again
  5. choose the package version you want
  6. accept the dialog that tells you that in order to download, you need to accept the license first
  7. accept the license
  8. choose the package version you want again
  9. register for Oracle Technology Network
  10. discover that Oracle doesn’t read RFC’s, and rejects your email address
  11. enter another email address, and re-type your password
  12. verify your email by clicking the link they sent you
  13. (step 2 of verifying your email) log in to OTN
  14. Find the tab you had the download waiting in, and try to log in there
  15. Discover that Oracle forgot that you just accepted the license.
  16. Try the back button to go back and accept the license again, only to discover that they have broken the back button.
  17. do over steps 2, 3, 4, 7 and 8.
  18. unpack the bin file containing the rpm
  19. accept the license again
  20. install the rpm.

I can relate…

The Raspberry Pi as a print server for HP Color LaserJet 1600

Short story: fail.

I recently acquired a Raspberry Pi from Farnell/Element14. One of the uses I could see for this little device was to serve as a print server for my HP Color LaserJet 1600.

HP has good support on Linux, and Open Source drivers, through the hplip project. This printer is also supported through the hplip project. However, it requires some propietary firmware (plugin) to work.

The Raspberry Pi is an ARM device. Most consumer PCs are x86 or a deviation thereof. So the drivers and the firmware is made for an x86 architecture. This is not a problem with the driver, as it is Open Source. But the firmware is closed, and not available for ARM.

The end of the story is that the HP Color LaserJet 1600 does not work on the Raspberry Pi, though some other HP printers does.

Open Source for the win! Close Source FAIL!

Development SMTP server in Python

Sometimes, when you’re developing services that send email, you need a SMTP server that doesn’t actually send the email, but just lets your service connect, and send it’s message to the SMTP server.

This SMTP server implemented using the smtpd library in the Python Standard Library, logs every message sent to it to standard out, AND shows you a notification using dbus and Freedesktop notifications (GNOME, Unity, KDE, XFCE, etc…)

CodeWTF: Exception handling

Let us catch that exception for you, and give you a generic exception back. With no information about the original cause.

CodeWTF: If value is null, return null, else return value