Sunday, July 1, 2012

CDs all gone? Give the children what belongs to the children

Some years ago I ripped all the cd's we had and listened to music mostly off my computers. Later I got children, a squeezebox duet and the kids started listening to  stuff in the car off .mp3 cd's. At home their music only existed on a server disc in the basement. I sometimes played their stuff on the s'box but they never requested anything. They are pretty proficient at finding their dvds and asking to see them though. Their musics lack of physical existence seemed to be a barrier from it  being played.

I'm not always the best home project worker but it occurred to me that a s'box radio would give their music physical existence. Just a year after this occurred to me I got around to ordering one. I set up a separate squeezeserver just for their music so they won't have to browse the whole family collection to find their stuff. While I wish the radio had a march of covers so the kids can recognize their stuff by cover art tlit also works to browse by album. The art is just big enough to make out. And now they play stuff almost every day. One of the most used and enjoyed gifts 'til now.

Sunday, May 6, 2012

New car, supposedly very safe turns out to be dangerous

We got a new car. Our previous car was humble, reliable, no-frills, comfortable, but ultimately too small for a growing family.


The new car is the most basic model of a 2012 SUV class family car. We bought it for the size of the luggage compartment, the general reliability of the cars of that make, the high security ranking given by NCAP, the 4 wheel drive so we don't have to worry (much) about getting stuck in snow, and the petrol engine. (Somehow most 4WD cars in Norway have diesel engines. And there seems to he very high risk connected with getting a diesel right now as that particular kind of fuel might be hit by new taxes to make it more expensive than petrol. And also diesel powered cars have higher fault rates than petrol powered cars.)

I spent some time with the instruction manual. It has hundreds of pages just for the displays in the dashboard. Since people ridicule me for reading instruction manuals I can only conclude that most people don't know what their car's computer can do. Not that it is very exiting. But people must not be using or even paying anything for that.

The manual was in quite good Norwegian (nowhere near flawless, even to someone dyslexic like me, but nothing like the bad examples of engrish seen around the net. Luckily I trust the makes engineers more than their translation and documentation service. It also repeated everything a lot. I think they almost managed to make it into easy reading material for those less used to reading that someone that attended college.

The most important take-away from manual though, came from the hundreds of pages about the security of the vehicle. Air bags: they're dangerous! Don't fall asleep leaning towards the door! If the side air-bags or the curtain air bags that sit in the ceiling over the windows deploy your head will be literally smashed. From at least two sides. Seriously. I was especially impressed by the repeated insistence that people sit as far away from the air bags as possible. They are clearly dangerous. I really hope that statistics show that people are safer with them than without them. I'm not sure. I wonder if I can get all of them disabled. I'd feel safer for me and my wife - at least the kids sit in seats that will keep them safely away from the air bags. I guess.

Or it could be that the wording was intended to make it clear to U.S. users that the air bags may or may not save you, and may or may not kill you while doing so. So as not to make the makers liable for any outcome what so ever.

It could be that the air bags are good then, and U.S. lawyers are bad.

When I was little I climbed around in the back as I wanted. At speed. I never felt unsafe in any way.

Oh the angst of modern living.

Wednesday, February 29, 2012

Perl module of the day

I'm working on getting some legacy code to run on a new platform.  One of the weaknesses is that the two daemons are not daemonizing themselves - they're staying in the foreground.

Today's find is the perl module App::Daemon, which is way easy to use and gives me "start", "stop" and "status"  methods in the programmes at once.

Happy.

Monday, January 23, 2012

Configuring svnweb for apache

I'm currently looking for a suitable web interface to a svn repository. There are several available in Ubuntu so that makes the job a bit easier, but it was not a totally smooth experience.


svnweb looks pretty promising with the right functions easily available. But it wasn't all that trivial to install. The first try:

  apt-get install libsvn-web-perl

I need to make a server root and populate it:

  mkdir /var/www-svnweb
  cd /var/www-svnweb
  svnweb-install

then edit config.yaml in the obvious ways.  But it fails, /usr/bin/svnweb-server throws errors about format.number and somesuch.  Some googeling reveals this to be needed:

  apt-get install libnumber-format-perl libtemplate-plugin-number-format-perl

Then I quickly got tired of running the server as a standalone process, I'd rather have it in the apache server on the machine.  The Ubuntu package does not contain any configuration templates or examples, so I found the origin package and had a look in the tar.gz distribution.  It did have a template. I want the service as a separate virtual server so I have to adapt some:

 
             ServerName rancid.noc.ventelo.net
             DocumentRoot /var/www-svnweb

             ErrorLog /var/log/apache2/rancid-svnweb-error.log

             LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\"" combined
             LogFormat "%h %l %u %t \"%r\" %>s %b" common
             LogFormat "%{Referer}i -> %U" referer
             LogFormat "%{User-agent}i" agent

             CustomLog /var/log/apache2/rancid-svnweb.log common

             
                        AllowOverride None
                        Options None
                        SetHandler perl-script
                        PerlHandler SVN::Web
             

             
                        SetHandler default-handler
             
 

From the template I can see that mod_perl is needed.

  apt-get install libapache2-mod-perl

Trying to view the site did not render any useful results, and no log messages in the error log. So I had to go to the "root" apache error log and found messages about missing Apache2/Request.pm.

  apt-file search Apache2/Request.pm

reveals the package containing that.  And a small test shows that the package must also be enabled in apache.

  apt-get install libapache2-request-perl
  a2enmod apreq

And then it's working.