Sign Håvard Rast Blok

Blog

Fuel crisis...

  • Apr. 28th, 2008 at 10:27 PM
...or just a price peek?

Here are some of today's headlines from The Guardian, as the crude oil price almost hits $120/barrel:

Cost of fuelling aircraft has soared
Gas flow to Britain slows despite high prices
Opec warns of $200 oil as price hits new high

Ubuntu 8.04 released

  • Apr. 25th, 2008 at 9:38 AM
Ubuntu 8.04 was released yesterday, and Wired has a small writeup. You can download here, or go right to the torrent files.


Back references in Java regexp

  • Apr. 2nd, 2008 at 10:44 AM
The Java API documentation for regular expressions says that:

Back references
\n Whatever the nth capturing group matched

This seems to be difficult to get working though. Here's an example of a work-around:
str.replaceAll("user(.*)", "$1")

Example:
"username" => name

Too many layers, too many features

  • Mar. 30th, 2008 at 6:02 PM
It's already old news that the opening of the 5th terminal at Heathrow airport was a disaster. However, was it such a big surprise. I mean, what could possibly go wrong:

"40 years in the planning. It was a 4.3bn [GBP] project boasting an IT system that could make Nasa envious"

"11 miles of conveyor belts controlled by an integrated network of 140 computer servers able to process 12,000 bags an hour"

"built on the back of 400,000 man-hours of software engineering"

"'We believe it to be the most advanced baggage system in the world.'"



View PDF graphic of the new baggage system.


It seems, just about everything that could go wrong did. A classic example of a system set up for cascading failure.


- Staff turning up for work could not park their cars.
- Then they struggled to find transfers into the terminal.
- Shortage of security staff meant baggage personnel had to wait in increasingly long queues to be vetted.
- People were having difficulty finding out where they were supposed to go [to work].

- Failure to get personnel into place on time in the cargo areas became manifest.
- Baggage backed up on the conveyor-belt system.

- Along with angry passengers, staff were becoming increasingly demoralised.
- 'There are 16 lifts and only one is working...'
- Drinking water was shipped in for the overstretched baggage teams, but the security staff refused to allow the bottles in.

- 68 flights had been grounded.
- [Passengers forced to] fly without their luggage as 5,000 bags lay stacked up on the underground conveyor belt system.
- BA had promised delays would be reduced to only 30 to 40 minutes.


In the glory of hindsight, I cannot resist the temptation to quote Antoine de Saint-Exupery:
"Perfection is achieved, not when there is nothing left to add, but when there is nothing left to remove."

Cost of a CD

  • Mar. 26th, 2008 at 8:56 AM

This breakdown of the cost of a typical major-label release by the independent market-research firm Almighty Institute of Music Retail shows where the money goes for a new album with a list price of $15.99.

$0.17 Musicians' unions
$0.80 Packaging/manufacturing
$0.82 Publishing royalties
$0.80 Retail profit
$0.90 Distribution
$1.60 Artists' royalties
$1.70 Label profit
$2.40 Marketing/promotion
$2.91 Label overhead
$3.89 Retail overhead


Taken from Wal-Mart Wants $10 CDs.

See also Slashdot:
http://news.slashdot.org/news/08/03/25/1856245.shtml

Tux droid

  • Mar. 16th, 2008 at 8:57 AM
"An electronics company called Kysoh aims to bring the Linux mascot to life with a unique programmable toy. The Kysoh Tux Droid is a robot that wirelessly connects to a Linux computer (no Windows or Mac OS X support yet) and performs actions in response to preprogrammed events. It can flap its wings, turn around in circles, blink, detect light levels, record audio, and even speak."



http://www.tuxisalive.com/

http://arstechnica.com/reviews/hardware/tux-droid-review.ars

http://hardware.slashdot.org/hardware/08/03/15/2244250.shtml

http://www.youtube.com/watch?v=cbzyBEeShEk
After the last yum update I had problems starting up Pidgin today. Every time I got the message in the terminal: "The name org.freedesktop.NetworkManager was not provided by any .service files", and a segfault: "Pidgin has segfaulted and attempted to dump a core file.".

Then I tried the suggested gdb pidgin, however I did not have enough of the *-debuginfo packages installed to get any meaningful output. So, I tried to install that, however, at some point it seem yum was ready to give me the whole of FC9 beta, so I stopped there.

What did work in the end, was the following:
yum --enablerepo='*-debuginfo' --enablerepo=development install nss-debuginfo

After that, Pidgin started up normally again! Great! :D

I guess I should include some version details for the records. This is what I now have:

[root@localhost ~]# yum list pidgin* nss*
Installed Packages
nss.i386 3.11.99.4-1.fc9 installed
nss-debuginfo.i386 3.11.99.4-1.fc9 installed
nss-devel.i386 3.11.99.4-1.fc9 installed
nss-tools.i386 3.11.99.4-1.fc9 installed
nss_compat_ossl.i386 0.9.2-3.fc8 installed
nss_db.i386 2.2-38 installed
nss_ldap.i386 257-4.fc8 installed
pidgin.i386 2.4.0-1.fc8 installed
pidgin-debuginfo.i386 2.2.2-1.fc8 installed
pidgin-otr.i386 3.1.0-2.fc8 installed

[root@localhost ~]# cat /proc/version
Linux version 2.6.24.3-12.fc8 (mockbuild@xenbuilder2.fedora.redhat.com) (gcc version 4.1.2 20070925 (Red Hat 4.1.2-33)) #1 SMP Tue Feb 26 14:58:29 EST 2008

BPM beat counter

  • Mar. 8th, 2008 at 11:51 AM
Simple is beautiful! Who needs fragile BPM software when you can do the counting yourself!? Here's two online BPM (beats per minute) counters where you hit a key for each beat. The form will give you the average BPM.

For the mouse:
http://www.b-boys.com/classic/beatcounter.html

For the space bar:
http://web.forret.com/tools/bpm_count.asp
This also comes with a "tempo calculator" if you hit Submit.

...even more buttons

  • Mar. 4th, 2008 at 11:53 AM
For completeness, here is the default mappings when the trackball is seen with 11 buttons:
1 - Left Big (LB)
2 - Left Big + Right Big (M) at the same time
3 - Right Big (RB)
4 - Not used
5 - Not used
6 - Left Small (LS)
7 - Right Small (RS)
8 - Not used
9 - Not used
10 - Not used
11 - Not used

To get paste on LS here, the command will then be:
xmodmap -e "pointer = 1 6 3 4 5 2 7 8 9 10 11"

More Marble Mouse buttons

  • Mar. 4th, 2008 at 9:31 AM
After the reinstall, my Logitech Marble Mouse (which is a trackball), has gotten new keymappings.

Using xev, I get the following default mappings (btw. it has "only" nine buttons, as opposed to 11 at work).
1 - Left Big (LB)
2 - Left Big + Right Big (M) at the same time
3- Right Big (RB)
4 - Not used
5 - Not used
6 - Not used
7 - Not used
8 - Left Small (LS)
9 - Right Small (RS)

Now, what I want, is to have paste on LS, so I do:
xmodmap -e "pointer = 1 8 3 4 5 6 7 2 9"

Again, the mapping can be seen with xmodmap -pp

The last bits: Skype

  • Mar. 3rd, 2008 at 8:37 PM
Just a little bit more to get in.
yum install qt4-x11
wget http://www.skype.com/go/getskype-linux-beta-fc7
rpm -ivh /tmp/skype-2.0.0.43-fc5.i586.rpm
This version now includes web cam chat also for Linux. Better get a web cam then. :)

Personal Fedora 8 Installation Guide

  • Mar. 3rd, 2008 at 9:00 AM
This morning I was just putting in the last bits after the reinstall of Fedora 8. Installing has really become a breeze with all the repositories around. For a guide to some of the steps, see this helpful guide:

"Personal Fedora 8 Installation Guide" by Mauriat Miranda
(http://www.mjmwired.net/resources/mjm-fedora-f8.html)

For the quick version:

rpm -ivh http://rpm.livna.org/livna-release-8.rpm
rpm -ivh http://linuxdownload.adobe.com/adobe-release/adobe-release-i386-1.0-1.noarch.rpm

yum -y install gqview glipper gstreamer-plugins-ugly vcdimager dvdauthor mjpegtools mencoder gnome-mplayer mplayer-fonts kino xine libdvdcss amarok xmms-mp3 kdemultimedia-extras k3b-extras-nonfree kover libcddb azureus bittorrent-gui mozplugger gtkpod hugin digikam enblend easytag pidgin-otr bash-completion obexfs flash-plugin AdobeReader_enu amarok-extras-nonfree vlc

wget -O /tmp/all-20071007.tar.bz2 http://www.mplayerhq.hu/MPlayer/releases/codecs/all-20071007.tar.bz2
mkdir -p /usr/lib/codecs
tar -jxvf /tmp/all-20071007.tar.bz2 --strip-components 1 -C /usr/lib/codecs/


This should take care of most media players, flash and pdf plugins and iPod support through gtkpod, plus a few other goodies.

How to mount inactive LVM partitions

  • Mar. 2nd, 2008 at 12:06 AM
I finally got a new 750 GB disk, so I'm now reinstalling and coping things across from the old disk. One of my old disks also used LVM (Logical Volume Manager), so how to mount those on the new Fedora install? The following did the trick:

modprobe dm-mod
vgchange -ay
mount /dev/VolGroup00/LogVol03 /mnt/old/home

For more, see
http://www.fedoraforum.org/forum/archive/index.php/t-64964.html
http://pissedoffadmins.com/index.php?entry=entry070507-105201

Straight from the Horse's Mouth

  • Feb. 29th, 2008 at 12:18 AM
"You are right that people did not trust us   have you checked windows
update   I assume you found no drivers there either??  Thanks"

- Steve Ballmer, CEO of Microsoft


February 18, 2007 11:40 AM (page 4)
http://blog.seattlepi.nwsource.com/microsoft/library/vistaone3046.pdf

How much does a $20 flight cost?

  • Feb. 26th, 2008 at 8:11 AM
A typical Ryanair flight is advertised for about 10 GBP (or 20 USD), but how much do you pay? Wired claims about 3.5 times as much.



Furthermore, if you have goon for their Mexican version, Viva Aerobus, expect hours of hassle, and flight times for your paid ticket changing each week before you travel. How much is 8 hours of your time worth?

World subway systems

  • Feb. 15th, 2008 at 7:15 AM
Subway systems of the world, presented on the same scale

http://www.fakeisthenewreal.org/subway/

Storage prices in Zurich

  • Feb. 12th, 2008 at 6:27 PM
The informal storage media list is back, this time based on prices from Digitec.ch in Zurich. The prices are in Swiss Franc, but converted to Euros with a rate of 1 Euro = 1.59987545 Swiss francs. There are some interesting changes since the last list from Komplett.dk in Germany.

Media typeProductCapacityPrice CHFPrice EurosEuros / GB
DVD-R Verbatim 16x DVD-R 100 @ 4,7GB 470 GB 101.00 63.13 0.13
Harddisk Western Digital Caviar GP 500GB 500 GB 143.00 83.38 0.18
Harddisk Western Digital Caviar GP 750GB 750 GB 217.00 135.64 0.18
Harddisk Western Digital Caviar RE2 750GB 750 GB 228.00 142.51 0.19
Harddisk Western Digital Caviar GP 1TB 1000 GB 316.00 197.52 0.20
DVD+R DL Verbatim 2,4x DVD+R DL 25 @ 8,5GB 212.5 GB 101.00 63.13 0.30
Blu-ray Verbatim BD-R 5 @ 25GB 125 GB 77.00 48.13 0.39
CD-R Verbatim CD-R 100 @ 700MB 70 GB 45.00 28.13 0.40
HD-DVD Verbatim HD-DVD 5 @ 30GB 150 GB 123.00 76.88 0.51
Compact Flash Sandisk CF Card 16GB Extreme III 16 GB 199.00 124.38 7.77
Compact Flash Sandisk CF Card 4GB Extreme III 4 GB 66.00 41.25 10.31

Creeping featurism

  • Jan. 31st, 2008 at 7:37 PM
"Featuritis, creeping featurism, or the spoonerism feeping creaturism is a term used to describe software which over-emphasizes new features to the detriment of other design goals, such as simplicity, compactness, stability, or bug reduction."

- Wikipedia, the free encyclopedia

http://en.wikipedia.org/wiki/Creeping_featurism

Format war?

  • Jan. 25th, 2008 at 8:36 PM
Large parts of the tech world have been in a heavy discussion over which media format should be the next high definition format for home video. Some also refer to it as a "format war", making it sound like huge masses of consumers, movie studios and tech names are fighting it out. As it stands, the chart below gives an idea of market penetration.



Credit to Dennis Forbes for that one. Another good point from his article:


"[T]o most consumers, DVD is more than adequate for their movie viewing needs. Not only is DVD adequate, it's generally the high-point of their visual experience. An experience that is dominated by pixelated overcompressed online videos and cable companies that hyper-compress hundreds of channels onto too thin of a pipe (...)"

April the 1st comes early this year

  • Jan. 18th, 2008 at 7:56 AM
Looking at the news headlines from yesterday, it seems 1 April arrived a bit too early, however, nobody has called the bluff just yet. Others reported on flying pigs and cold weather in hell.

Of the most puzzling news, was probably the one about Microsoft setting up an Open Source project on SourceForge to create a free parser for their old binary Office formats. As expected, Slashdot readers were slightly critical, comparing the free gift with a certain horse in Troy, and commenting on the two way firewalls between microsoft.com and sourceforge.org.

Here's the headlines at Slashdot:
Microsoft Releases Specs for Binary Formats
Trial Set To Determine What SCO Owes Novell
Class Action Suit Against RIAA Can Proceed