<?xml version="1.0"?>
<!-- name="generator" content="blosxom/2.0" -->
<!DOCTYPE rss PUBLIC "-//Netscape Communications//DTD RSS 0.91//EN" "http://my.netscape.com/publish/formats/rss-0.91.dtd">

<rss version="0.91">
  <channel>
    <title>sjh - mountain biking linux geek spice   </title>
    <link>http://allan.svana.org/sjh/diary</link>
    <description>mtb / linux / canberra / cycling / etc</description>
    <language>en</language>

  <item>
    <title>[comp/linux] Connection limiting in Apache2</title>
    <pubDate>Wed, 06 Apr 2011 16:01:00 </pubDate>
    <link>http://allan.svana.org/sjh/diary/2011/04/06#2011-04-06_02</link>
    <description>&lt;!-- 2011-04-06 16:01:46 --&gt;

Yesterday I noticed a machine I look after had been getting some form of
DOS or similar against it. There are iso images (700 MB files) on the
server and there had been a few hundred thousand download requests from
different ip addresses to it via the web server.

&lt;p&gt;

Looking at the logs it was interesting to note the User-Agent was
identical for each request even though it was coming from so many
different ip addresses. So I had the situation of needing to limit
connections to a certain type of file or an area on disk via apache so as
not to have resource starvation and no download blow outs.

&lt;p&gt;

Looking around for ways to do this in apache2 there was not a whole lot
of options already implemented, some per ip connection limits in one
module, some rate limiting in another module, but no way to limit
connections to a given Directory, Vhost or Location immediately turned
up. Fortunately a few different searches eventually turned up the
libapache2-mod-bw package in Debian.

&lt;p&gt;

As it says in the package description

&lt;pre&gt;
This module allows you to limit bandwidth usage on every virtual host
or directory or to restrict the number of simultaneous connections.
&lt;/pre&gt;

This was the solution it seemed, so I read the documentation in the text
file in the package, enabled it on the server and got it working.

&lt;p&gt;

To get it working pay attention to the bit that says ExtendedStatus
needs to be enabled before the LoadModule line. Then you can simply
place it in a Directory section in your main config file for a given
vhost.

&lt;p&gt;

I configured it with the following section

&lt;pre&gt;
ForceBandWidthModule On
BandWidthModule On

&amp;lt;Directory &quot;/on/disk/location&quot;&amp;gt;
	BandWidth &quot;u:BLAHBLAH&quot; 200
	BandWidth all 2000000
	MaxConnection &quot;u:BLAHBLAH&quot; 1
	MaxConnection all 10
&amp;lt;/Directory&amp;gt;
&lt;/pre&gt;

Which says if the user agent has the string &quot;BLAHBLAH&quot; in it anywhere
limit to 200 bytes per second and later 1 connection allowed from that
user agent to this directory. I thought it worth while to put in a limit
on all connections to the directory of 10 just in case the user agent
changes and it will not starve the machine or max out the link.

&lt;p&gt;

Initially I had the limit of 10 without limiting the user agent more and
the DOS was simply using up all 10 and thus no one else could connect to
and download these items. Fortunately so far this seems to be working
and I can monitor it for a few days to see the resultant behaviour of
the attack.

&lt;p&gt;

Thanks to the module author this seems to work fairly well and was
easier than writing a mechanism inside apache2 myself to limit the
connections in the manner required.</description>
  </item>
  <item>
    <title>[comp/hardware] New toy - A netbook with great battery life</title>
    <pubDate>Sat, 05 Feb 2011 15:43:00 </pubDate>
    <link>http://allan.svana.org/sjh/diary/2011/02/05#2011-02-05_01</link>
    <description>&lt;!-- 2011-02-05 15:43:45 --&gt;

Before heading up to linux.conf.au a few weeks ago I was thinking
about the need to be able to keep using my laptop all day at the
conference. The battery in my XPS M1330 simply does not last that
long. Also commuting in the Brisbane heat carrying that, and a power
adapter along with the other stuff needed into the conference every
day seemed like overkill.

&lt;p&gt;

I have been reading about various netbooks for a while, and finally I
realised I have a good laptop for the things I need a laptop for
provided by work. However when travelling it is handy to have
something less important and expensive, with better battery
life. Everything else can be easily dealt with. The Samsung series of
netbooks regularly had the best battery life mentioned in reviews, so
looking at the models in stock at JB Hifi the NF 210 was claimed (by
Samsung) to have 14 hours. Most Linux reviewers of it seemed to
suggest 8 to 10 hours was the norm. So I headed over to buy one.

&lt;p&gt;

For AUD $437 I got a 1 GB RAM, 250 GB hdd, Atom N445 dual thread (I
think) netbook with a 1024x600 screen and a huge battery life with the
6 cell battery it came with. At lca I was able to leave the (rather
minimalist) power adapter where I was staying and just take the
netbook, it easily lasted the whole day open during all talks and
using wireless the whole time plus some other usage.

&lt;p&gt;

Gnome power battery status suggests 12 hours from 100% charge with the
screen on minimum brightness, right now I am typing this outdoors with
the screen at 50% the battery is at 50% and the report suggests 5
hours remaining. I installed a standard Debian Squeeze netinst install
off a usb stick and downloaded an identical set of packages (almost)
to those on my laptop, no need for a restricted environment as it is a
fairly powerful computer anyway. Pretty much everything has worked
well under Linux, the only slight complication was the need for a ppa
samsung-backlight deb to control the backlight from the keyboard. The
backlight seems to go dim on no use even when those options are not
selected in gnome power manager so also something that could be
investigated.

&lt;p&gt;

Also Paulus bought one and had a few problems with it freezing due to
the closed wireless firmware on resume from suspend it seemed. I have
had one lockup (possibly related) but it has not been a problem. The
wireless driver does need to be reloaded on resume from suspend before
it works (easy to do) but that is something I may be keen to look into
at some point. I should not be surprised though how easy it was to
have a capable working Linux system, that is often the norm with
hardware these days (especially with much better/broader driver
support than any other operating system). 

&lt;p&gt;

For getting around the place some light work (compiling, interpreters,
emacs, web browser, etc) it is a capable system and not lacking. I am
a happy purchaser, even though my first one had to be returned within
three hours of purchase due to a failed hard disk, since then it has
been excellent.
</description>
  </item>
  <item>
    <title>[comp/software] Today's strangely named Debian package</title>
    <pubDate>Fri, 16 Jul 2010 16:25:00 </pubDate>
    <link>http://allan.svana.org/sjh/diary/2010/07/16#2010-07-16_01</link>
    <description>&lt;!-- 2010-07-16 16:25:35 --&gt;

I was looking through Debian packages that have something to do with image
analysis and see what code there was out there for working out meta
information about images. One that showed up when looking at python itk
bindings was perlprimer.

&lt;p&gt;

This definitely sounded odd as the package name suggests it is some sort of
perl instruction package. When I looked at the output of apt-cache show
perlprimer I thought it even stranger. In the description is the following
&quot;open-source GUI application written in Perl that designs primers for standard
Polymerase Chain Reaction (PCR), bisulphite PCR, real-time PCR (QPCR) and
sequencing.&quot;.

&lt;p&gt;

So this is in fact a genetic research related package, with the name
perlprimer (it is admittedly written in perl). I know Debian packages tend to
be named on a first in first named basis, however this definitely strikes me
as deceptive/strange. Obviously all mad gene scientists are out there trying
to hide their work with deceptive package names... or something.</description>
  </item>
  <item>
    <title>[comp/hardware] USB key destruction, Game On!</title>
    <pubDate>Fri, 02 Jul 2010 11:15:00 </pubDate>
    <link>http://allan.svana.org/sjh/diary/2010/07/02#2010-07-02_01</link>
    <description>&lt;!-- 2010-07-02 11:15:05 --&gt;

Back in 2008 I 
&lt;a href=&quot;http://svana.org/sjh/diary/2008/04/10#2008-04-10_01&quot;&gt;lost and then
destroyed&lt;/a&gt; some cute tiny pink metallic usb keys, I decided if I buy
another usb key it should be one of the water proof, shock proof, dust proof
variety. Today I bought an 8GB PNY Lovely Attache stick in pink (easy to find
for sale with a google search), though the image etched into it is a bit sex
and the cityish (especially with the pink cover) it does claim to be water
proof, dust proof and shock proof. Game On!
</description>
  </item>
  <item>
    <title>[comp] More on the google search mechanism</title>
    <pubDate>Wed, 24 Feb 2010 16:32:00 </pubDate>
    <link>http://allan.svana.org/sjh/diary/2010/02/24#2010-02-24_02</link>
    <description>&lt;!-- 2010-02-24 16:32:50 --&gt;

An interesting article (I think linked from BoingBoing) today on Wired by
Steven Levy. This is about some more insights into 
&lt;a href=&quot;http://www.wired.com/magazine/2010/02/ff_google_algorithm&quot;&gt;how Google
refines its search algorithms&lt;/a&gt; all the time. A lot of this makes sense,
things like improving it so changes are easier to incorporate, there are some
interesting insights about research into sentence structure and trying to work
out what people searching want (computers are bad at this).

&lt;p&gt;

I liked the story about dog and puppy searches and people looking for hot
dogs, someone should make a t-shirt, Google: No longer boiling puppies since
2002. Or something. It is also interesting to think they use all incoming
searches as some form of testing or control for other tests. The scale of the
operation and being able to respond fast is still the most impressive thing
about it I think. Also the internal best of search ideas conference and
meetings sound like an interesting way to get ideas working. Also everything
has to be backed up with results to show it improves things.

&lt;p&gt;

On a side note, &lt;a href=&quot;http://www.kateandruth.com/&quot;&gt;Kate and Ruth&lt;/a&gt; are
awesome, listening to their cover of the Dylan song 
&lt;a href=&quot;http://en.wikipedia.org/wiki/Let_Me_Die_In_My_Footsteps&quot;&gt;Let Me Die
In My Footsteps&lt;/a&gt; and I am reminded how good they are together singing.
</description>
  </item>
  <item>
    <title>[comp/software] Rockbox freezes on ogg files fix</title>
    <pubDate>Wed, 30 Sep 2009 17:41:00 </pubDate>
    <link>http://allan.svana.org/sjh/diary/2009/09/30#2009-09-30_02</link>
    <description>&lt;!-- 2009-09-30 17:41:57 --&gt;

After messing around with my ipod for a while upgrading it to rockbox v3.4 to
see if it would play some ogg files it was freezing on I discovered a simple
fix at last. If an ogg file has id3 or id3v2 tags it appears rock box will
refuse to play the file. I had been wondering for a year or so why my violent
femmes albums I ripped onto the ipod would not play, however was not to fussed
as I was not listening to them overly much. However I ripped a new album I
bought and was most annoyed to find I could not play it.

&lt;p&gt;

Happily now I have discovered this problem I have easily removed all the id3
and id3v2 tags form ogg files on the device with &quot;find -name '*.ogg' -print0 |
xargs -0 id3v2 -D&quot; and hey presto I can now play all these files again easily.
The ogg/vorbis tag remains intact, for some reason I had add id3 tags ticked
in grip without restricting it to files ending in .mp3.</description>
  </item>
  <item>
    <title>[comp/hardware] dc++ or new digital camera</title>
    <pubDate>Mon, 17 Aug 2009 14:43:00 </pubDate>
    <link>http://allan.svana.org/sjh/diary/2009/08/17#2009-08-17_01</link>
    <description>&lt;!-- 2009-08-17 14:43:27 --&gt;

&lt;table&gt;
&lt;tr&gt;
&lt;td valign=&quot;top&quot;&gt;
&lt;a href=&quot;http://svana.org/sjh/images/various/panasonic_dmc-ft1_med.jpg&quot;&gt;&lt;img src=&quot;http://svana.org/sjh/images/various/panasonic_dmc-ft1_small.jpg&quot;&gt;&lt;/a&gt;&lt;br&gt;
New Panasonic DMC-FT1 (&lt;a href=&quot;http://svana.org/sjh/images/various/panasonic_dmc-ft1.jpg&quot;&gt;fullsize&lt;/a&gt;)
&lt;p&gt;
&lt;a href=&quot;http://svana.org/sjh/images/various/panasonic_dmc-lz5_med.jpg&quot;&gt;&lt;img src=&quot;http://svana.org/sjh/images/various/panasonic_dmc-lz5_small.jpg&quot;&gt;&lt;/a&gt;&lt;br&gt;
Old Panasonic DMC-LZ5 (&lt;a href=&quot;http://svana.org/sjh/images/various/panasonic_dmc-lz5.jpg&quot;&gt;fullsize&lt;/a&gt;)
&lt;/td&gt;
&lt;td valign=&quot;top&quot;&gt;

So I bought myself a 6MP, 6x optical zoom, 
&lt;a href=&quot;http://www.svana.org/sjh/diary/2007/01/19#2007-01-19_01&quot;&gt;panasonic
dmc-lz5&lt;/a&gt; in January 2007. It has been a good camera and has worked well for
2.5 years now. I guess one thing I found a little bit jarring is it seemed to
have more sensor induced noise (it looked like a painting up close) in many
photos. However on the whole I liked it.

&lt;p&gt;

When I have it with me in an event I tend to carry it in my jersey pocket, in a
padded bag inside a dry bag. This makes the camera quite bulky (and heavier),
it also makes it a lot harder to whip it out for a photo (have to undo the
bags, get it out, put it back etc). At geoquest this year one of my team mates
had a Panasonic DMC-FT1 (called the TS1 in US and possibly Europe) which is
waterproof to 3 metres and shock proof to 1.5 metre drop. He was swimming with
it in his pocket and getting it out to take shots in the ocean and simply kept
it there where it could easily get banged up.

&lt;p&gt;

One of my housemates already had an Olympus camera she uses in races that is
similar (waterproof and shock proof), this Panasonic one I was looking at came
out this year and has some nice features, as I am still somewhat partial to
Panasonic cameras (&lt;a href=&quot;http://michaelcarden.net/blog/&quot;&gt;Crash's&lt;/a&gt;
influence) I decided this is the one I wanted. 4.8 optical zoom, 12 MP, AVCHD
(1080p) video recording, no moving parts externally. So I ordered it last
Wednesday night and it came on Friday morning. 

&lt;p&gt;

When water used to get into the drybag/camera bag while racing the camera
would fog up and be useless for taking photos, this camera I can now keep in a
pocket or neoprene pouch and let it get wet and it will still work fine. Also
My test photos so far do not have the painted looking noise as the LZ5 did and
the photos appear crisper. I like it, I also think Jane may like the purchase
as I will give her the old camera as I no longer need it.

&lt;p&gt;

Of the photos on the left, the photo of the new camera was taken with the LZ5
and the photo of the LZ5 was taken with the new camera. A few other 
&lt;a href=&quot;http://svana.org/sjh/images/2009-08-15/&quot;&gt;photos taken this
weekend&lt;/a&gt; (3 paddling on Saturday afternoon and one at the Gravity XC race
at Stromlo yesterday also turned out well). The new camera is effectively the
same size as the old one, however as I do not need the camera bag or dry bag
it will be more compact and easier to deal with.

&lt;/td&gt;
&lt;/tr&gt;
&lt;/table&gt;</description>
  </item>
  <item>
    <title>[comp/linux] Tracking down disk accesses</title>
    <pubDate>Fri, 07 Aug 2009 14:02:00 </pubDate>
    <link>http://allan.svana.org/sjh/diary/2009/08/07#2009-08-07_01</link>
    <description>&lt;!-- 2009-08-07 14:02:23 --&gt;

In the last few days since a recent reboot (I normally simply put my laptop to
sleep) of my laptop I have noticed a lot of disk access noise. One obvious one
was approximately every 5 seconds I heard an access. Others were likely to be
occurring also.

&lt;p&gt;

I started looking around to see how to track down the problem. I have used
iostat in the past to give me some details about activity happening. However
the problem with that is it does not tell you which process is doing
things. Running top also is not any good as it does not identify io and it
also does not show cumulative use/hits as iostat and similar tools do.

&lt;p&gt;

There is a python program called iotop I have not tried yet, also there are
files in /proc now days you can laboriously work your way through to track
down some of this information. However while looking around and reading some
of the man pages I discovered the existence of pidstat. This program is
fantastic. It can display accumulated disk,vm,cpu,thread information on a per
process basis. This is a program I have wished I had for years.

&lt;p&gt;

So I ran pidstat -d 5 and watched to see what was writing to the disk so
often. First I noticed the predictable kjournald. Rather than messing around
trying to change commit interval for this I found there is a laptop-mode-tools
package I should have had installed on my laptop. I have now installed it and
enabled it to operate even when AC power is plugged in and now kjournald seems
to be able to go for minutes at a time without needing to write to disk.

&lt;p&gt;

Next I noticed xulrunner-stub was writing often and causing the disk to spin
up now it was spun down due to laptop_mode. This is firefox (or iceweasel in
the debian case). I found 
&lt;a href=&quot;http://shaver.off.net/diary/2008/05/25/fsyncers-and-curveballs/&quot;&gt;details&lt;/a&gt;
suggesting firefox 3.0.1 onward had an option to decrease the save/fsync
regularity and that 3.5 and up should be even better. I installed 3.5.1 from
debian experimental and found another 
&lt;a href=&quot;http://maketecheasier.com/28-coolest-firefox-aboutconfig-tricks/2008/08/21&quot;&gt;page
with 28 good firefox tips&lt;/a&gt;, one of which actually told me which
about:config option to change to decrease the save/sync interval.

&lt;p&gt;

So the disk is not always spinning up or constantly accessing now, though
there still appear to be a few culprits I could track down more information on
in the pidstat output. Also I may want to play around with more proc settings
such as /proc/sys/vm/dirty_expire_centisecs which can change how often pdflush
sends stuff to disk and there are other suggestions 
&lt;a href=&quot;http://bbs.archlinux.org/viewtopic.php?pid=244453&quot;&gt;around&lt;/a&gt; which
if I think about may help too. Update: I also have since first writing this
found a good &lt;a href=&quot;http://www.linuxjournal.com/article/7539&quot;&gt;Linux Journal
article on what laptop mode does&lt;/a&gt;. 

&lt;p&gt;

One of the reasons I am so excited about pidstat is it helps with my work a
lot, if there is a problem with a mail server, or student login server or any
number of other machines. Getting a read out of this information by process
accumulated over time is really useful to work out what is causing issues and
thus work on controlling and preventing problems.
</description>
  </item>
  <item>
    <title>[comp/hardware] An easy to use cheap DVB-T USB dongle</title>
    <pubDate>Fri, 10 Jul 2009 11:35:00 </pubDate>
    <link>http://allan.svana.org/sjh/diary/2009/07/10#2009-07-10_01</link>
    <description>&lt;!-- 2009-07-10 11:35:05 --&gt;

The other night at home we realised that the tv did not have digital tuning
capability, thus with the Ashes starting we could not watch the tour
coverage. As I am not at home at 6pm much I could not even watch the
highlights package easily (repeated at 9:30pm on SBS2). Although my mythtv box
at work can record this stuff, it had been playing up and not making scheduled
recordings, and I had not fixed it yet. (finally started an upgrade yesterday,
have not had time to see how it went)

&lt;p&gt;

Anyway I did not have time to go into town and buy a digital tuner to go with
the tv, however the on campus computer shop has USB DVB-T dongles. One they
had for sale (rather cheap at $68) is the Leadtek Winfast DTV Dongle Gold,
which according to this 
&lt;a href=&quot;http://www.mythtv.org/wiki/Winfast_DTV_Dongle_Gold&quot;&gt;page at the
mythtv&lt;/a&gt; wiki works well on Linux. So I bought one, plugged it in,
discovered that the driver is already in the 2.6.30 kernel I am running, the
firmware linked to on that page first however was buggy, some forum posts
suggested running the latest 4.95.0 firmware rather than 4.65.0 and it would
work (it did).

&lt;p&gt;

After playing around with a few tv programs I settled on simply using xine
which can tune into all the channels I scanned for Canberra. I am happy to say
this works a treat and only took about 5 minutes to make it work. Of course if
I make it to swimming tonight I may try to come back past the shops in Civic
and buy a tuner box for the tv in the lounge room so everyone can enjoy the
tour at home.

&lt;p&gt;

Though I do not watch tv much I have to say it is sort of exciting to have a
tuner that only takes up a really small amount of space (the dongle, antenna
and short usb cable extension are about the size of a small USB hard drive all
up) in my laptop bag and works fine in most places like this.</description>
  </item>
  <item>
    <title>[comp/linux] Success with WPA2</title>
    <pubDate>Wed, 08 Jul 2009 17:58:00 </pubDate>
    <link>http://allan.svana.org/sjh/diary/2009/07/08#2009-07-08_01</link>
    <description>&lt;!-- 2009-07-08 17:58:09 --&gt;

After spending far more time than I should have I have finally found a working
configuration for the ANU WPA2 secure wireless on Linux. I spent a lot of time
reading seemingly endless Ubuntu forum posts going on about problems that
could be wpa supplicant, network-manager or kernel driver based issues. Bugs
concerning various complaints were being assigned to any one of those three
things.

&lt;p&gt;

Due to concerns that my driver for the iwlagn driver could be bad I upgraded
my laptop kernel to the Debian sid 2.6.30 packages, I also then downloaded the
latest &lt;a href=&quot;http://wireless.kernel.org/en/users/Download/stable&quot;&gt;wireless
kernel drivers&lt;/a&gt; and installed them. Also the three programs mentioned, iw
(new interface to wireless stack in Linux), crda and wireless-regdb.

&lt;p&gt;

Eventually I am not entirely convinced those things helped, many forum
complaints for Ubuntu and other systems said network-manager had issues and to
try wicd. My initial efforts with wicd failed. Eventually while reading some
efforts someone else had made to work out what was happening on their system I
saw someone using the rather simple iwlist tool to scan for the capabilities
of the secure access points.

&lt;p&gt;

When I did this I notice the ANU-Secure access points all advertised the
following.

&lt;p&gt;

&lt;pre&gt;
IE: IEEE 802.11i/WPA2 Version 1
    Group Cipher : CCMP
    Pairwise Ciphers (1) : CCMP
    Authentication Suites (1) : 802.1x
&lt;/pre&gt;

&lt;p&gt;

I had previously been trying TKIP and WPA2 when I tried wpa_supplicant alone
without a manager on top. WPA2 and RSN are aliases for each other in this
instance. Anyway with the new drivers and the sid wpa_supplicant I was able to
get a wpa_supplicant.conf with the following to work on ANU-Secure.

&lt;p&gt;

&lt;pre&gt;
ctrl_interface=/var/run/wpa_supplicant
ctrl_interface_group=root

network={
   ssid=&quot;ANU-Secure&quot;
   scan_ssid=0
   proto=RSN
   key_mgmt=WPA-EAP
   eap=PEAP
   pairwise=CCMP
   group=CCMP
   identity=&quot;u9999999&quot;
   password=&quot;PASSWORD&quot;
   phase1=&quot;peaplabel=0&quot;
   phase2=&quot;auth=MSCHAPV2&quot;
#   priority=1
}
&lt;/pre&gt;

&lt;p&gt;

Then I looked through the wicd templates for one that had the minimum needed
and noticed the wicd PEAP-GTC template had the desired fields set. So now in
wicd I can access ANU-Secure from the desktop with no problems. I really
should test out older drivers and some other configurations, also try out
network manager again I think. Works for now though, I can finally stop
wasting so much time on this.</description>
  </item>
  <item>
    <title>[comp/linux] A regression for WPA2</title>
    <pubDate>Thu, 02 Jul 2009 18:20:00 </pubDate>
    <link>http://allan.svana.org/sjh/diary/2009/07/02#2009-07-02_01</link>
    <description>&lt;!-- 2009-07-02 18:20:45 --&gt;

So for a while I was wondering why I could not use the ANU's WPA2 secure
network from my laptop. I had heard reports that some Ubuntu hardy machines
had worked. I run Debian unstable and a kernel.org 2.6.29.3 on this laptop.

&lt;p&gt;

I thought maybe there was some problem with my laptop hardware and maybe the
iwl4965 chipset simply would not do it under Linux. However searching online
suggested I should be able to make it do WPA2.

&lt;p&gt;

Thinking maybe the Ubuntu people had done it right and Debian was missing
something I tried booting a Jaunty live cd. I also discovered the rather neat
feature of suspend to disk (hibernate) in that you can hibernate your
computer, boot off a live cd, use it, reboot and have your existing session
come right back up normally on the next boot.

&lt;p&gt;

Anyway I booted up Jaunty and tried to authenticate, still failed in a similar
manner to my Debian installation. Out of curiosity as I had heard of hardy
working I booted my laptop on a hardy live cd. So network manager and iwlagn
driver combined on either Debian sid or Ubuntu jaunty had failed to
authenticate. Ubuntu hardy on the other hand, using an older version of
network manager and the iwl4965 driver in the kernel worked fine. WPA2
authentication and use on the ANU Secure wireless network.

&lt;p&gt;

So now I need to find out where the regression has happened that means WPA2 is
broken in more recent releases of the software (kernel drivers, wpa
supplicant, network manager) on either Debian or Ubuntu.</description>
  </item>
  <item>
    <title>[comp/prog] An interesting languages comparison</title>
    <pubDate>Mon, 01 Jun 2009 15:45:00 </pubDate>
    <link>http://allan.svana.org/sjh/diary/2009/06/01#2009-06-01_01</link>
    <description>&lt;!-- 2009-06-01 15:45:07 --&gt;

I got the link to this from 
&lt;a href=&quot;http://bakeyournoodle.com/~tony/diary/&quot;&gt;Tony&lt;/a&gt; and it is interesting
to see the results of these tests. 
&lt;a href=&quot;http://gmarceau.qc.ca/blog/2009/05/speed-size-and-dependability-of.html&quot;&gt;The
speed, size and dependability of programming languages&lt;/a&gt; uses code from the
Computer Language Benchmarks Game to generate some information comparing many
(72) different languages.

&lt;p&gt;

Back in 1999 and 2000 I put a pretty trivial example of a single problem being
solved in multiple languages online. In this case scanning html for 
&lt;a href=&quot;http://svana.org/sjh/entity/&quot;&gt;entities&lt;/a&gt;, largely because I was
mildly interested in how different languages and the different implementations
of them may solve the same problem and the time it would take. I say mildly
interested because it is such a trivial example and because I did not put much
effort in. (I was amazed a few weeks ago to get an email from someone
rerunning these to see if recent Java implementations had caught up to c yet).

&lt;p&gt;

The person who wrote this speed, size and dependability post put a lot more
effort in and actually was able to draw some interesting conclusions about
languages and how they work and develop over time. For the geeks out there I
recommend having a look.</description>
  </item>
  <item>
    <title>[comp/ip] More open source required in government</title>
    <pubDate>Thu, 14 May 2009 12:36:00 </pubDate>
    <link>http://allan.svana.org/sjh/diary/2009/05/14#2009-05-14_01</link>
    <description>&lt;!-- 2009-05-14 12:36:59 --&gt;

With the Diebold voting software fiascos in the US and other areas the past
few years there has been a lot of proof that any voting systems on computers
should be open source (even though governments around the world have not yet
cottoned on to this). A few years ago (June 2005) I 
&lt;a href=&quot;http://svana.org/sjh/diary/2005/06/07#2005-06-07_03&quot;&gt;commented on
some&lt;/a&gt; DUI charges being tossed out of a Florida court due to the lack of
open source code available for the breathalysers. I followed on with mention
of problems with speed cameras in Australia playing up also.

&lt;p&gt;

Today Schneier had some 
&lt;a href=&quot;http://www.schneier.com/blog/archives/2009/05/software_proble.html&quot;&gt;information
on breathalysers&lt;/a&gt; that due to court orders finally had the source made
available for some analysis. This is not the same breath test system as used
in the Florida case from what I can tell at a glance (this was a New Jersey
case), however it definitely opens your eyes once more on how crap closed
source software can be (and yes I admit lots of open source software can also
be crap) and you will have no idea, and no way to fix it. Any software used in
law enforcement in such a way that it could be so incorrect or wrong and yet
still cause someone to lose their licence or gain a criminal record really
should be opened up, at least to the agency/government/force using the
software, if not open to all people.
</description>
  </item>
  <item>
    <title>[comp] Reminders and bugs</title>
    <pubDate>Wed, 06 May 2009 17:16:00 </pubDate>
    <link>http://allan.svana.org/sjh/diary/2009/05/06#2009-05-06_01</link>
    <description>&lt;!-- 2009-05-06 17:16:26 --&gt;

It is probably a bad thing, but while working on a Solaris system a fair bit
recently I am reminded how much my head does not grok Solaris. I am so used to
Linux and the Linux ways of finding information out about how to make it go
that when I try to do things in Solaris it feels very foreign.

&lt;p&gt;

As for the bugs thing, I think there is a bug in the Ubuntu 9.04 libnss-ldap,
I found a problem where it was not reading something configured by the install
from ldap.conf and I need to do a little bit more testing before submitting a
bug report.</description>
  </item>
  <item>
    <title>[comp/blosxom] Another change to cache_timestamps for perl 5.10</title>
    <pubDate>Tue, 21 Apr 2009 11:28:00 </pubDate>
    <link>http://allan.svana.org/sjh/diary/2009/04/21#2009-04-21_01</link>
    <description>&lt;!-- 2009-04-21 11:28:27 --&gt;

Upgrading this server to lenny I finally have perl 5.10 on the system, this
caused a problem with my blosxom plugin cache_timestamps. Using File::Find I
previously had a sub routine wanted defined inside a scope with some variables
available in that scope. However on upgrading to 5.10 this no longer worked.

&lt;p&gt;

It used to be something like this

&lt;p&gt;

&lt;pre&gt;
{
   my (%h1,%h2);
   sub wanted {
      $h1{$File::Find::name} = &quot;someval&quot;;
   }
   find (&amp;wanted, &quot;topdir&quot;);
}
&lt;/pre&gt;

&lt;p&gt;

However when I changed to perl 5.10 though the assignment seemed to work
(blosxom runs without -w or use strict enabled) if I tried to display %h1
inside wanted or tried to use it like a hash I got a weird error &quot;Bizarre copy
of HASH in refgen&quot; at the line of code I tried to use the variable as a
hash. Looking at other uses of File::Find it seems everyone used anonymous
subroutines from the call to find. I have changed the code to do the
following.

&lt;p&gt;

&lt;pre&gt;
{
   my (%h1,%h2);
   find (sub {
      $h1{$File::Find::name} = &quot;someval&quot;;
   }, &quot;topdir&quot;);
}
&lt;/pre&gt;

&lt;p&gt;

And now the hashes are in scope and not some so called Bizarre copy any
more. The code for the cache_timestamps plugin can be found 
&lt;a href=&quot;http://svana.org/sjh/various/&quot;&gt;here&lt;/a&gt; and details about
cache_timestamps are in my 
&lt;a href=&quot;http://svana.org/sjh/diary/comp/blosxom&quot;&gt;comp/blosxom&lt;/a&gt; category.

&lt;p&gt;

Update: found some details, rather than searching for the error message I
started searching for variable scope changes in 5.10. Found 
&lt;a href=&quot;http://www.perlmonks.org/?node_id=659342&quot;&gt;this page&lt;/a&gt; talking about
state variables being available in 5.10 as my variables are not persistent
across scope changes.</description>
  </item>
  <item>
    <title>[comp/hardware] Hamster out of focus</title>
    <pubDate>Fri, 19 Dec 2008 12:51:00 </pubDate>
    <link>http://allan.svana.org/sjh/diary/2008/12/19#2008-12-19_01</link>
    <description>&lt;!-- 2008-12-19 12:51:46 --&gt;

&lt;table&gt;
&lt;tr&gt;
&lt;td valign=&quot;top&quot;&gt;
&lt;a href=&quot;http://svana.org/sjh/images/various/broken_hardware_label_med.jpg&quot;&gt;&lt;img src=&quot;http://svana.org/sjh/images/various/broken_hardware_label_small.jpg&quot;&gt;&lt;/a&gt;&lt;br&gt;
Broken Hardware Label (&lt;a href=&quot;http://svana.org/sjh/images/various/broken_hardware_label.jpg&quot;&gt;fullsize&lt;/a&gt;)
&lt;/td&gt;
&lt;td valign=&quot;top&quot;&gt;

I noticed a hard drive on a bench here with the label affixed to it written by
one of us &quot;Broken Harddisk - username - May 2005&quot;. Thinking about it I
considered the fact that there was excessive information on the label, to
anyone here it is fairly obvious that this is a hard drive.

&lt;p&gt;

We always ensure broken hardware has a label like this attached with the name
of who noted it was broken and the date on which we noted this. However
thinking about this excessive information I began wondering if we could
instead try messing with people's heads. Instead of saying broken hard disk we
could instead say Broken rabbit.

&lt;p&gt;

This of course led me to take the photo to the left, after all is that not
what you consider and accurate and useful statement about the hamster in the
photo?

&lt;/td&gt;
&lt;/tr&gt;
&lt;/table&gt;</description>
  </item>
  <item>
    <title>[comp/hardware] Easy Dell HSDPA SIM access</title>
    <pubDate>Thu, 27 Nov 2008 12:15:00 </pubDate>
    <link>http://allan.svana.org/sjh/diary/2008/11/27#2008-11-27_01</link>
    <description>&lt;!-- 2008-11-27 12:15:45 --&gt;

So &lt;a href=&quot;http://svana.org/sjh/diary/2008/05/26#2008-05-26_01&quot;&gt;my Dell XPS
M1330&lt;/a&gt; came with a built in Dell 5520 WWAN HSDPA card. This shows up on the
USB bus and appears to work in Linux using usbserial (with vendor= and
product= arguments to modprobe) with ttyUSB0 appearing correctly in /dev.

&lt;p&gt;

Originally I had no intention to use it, and the laptop came with it specced
for Vodafone usage. Recently however Telstra and Optus have both started
offering prepaid wireless broadband. I was wondering how easy it would be to
change the SIM to one of those networks. After all lsusb currently outputs

&lt;p&gt;

Bus 002 Device 019: ID 413c:8138 Dell Computer Corp. Wireless 5520 Voda I Mobile Broadband (3G HSDPA) Minicard EAP-SIM Port

&lt;p&gt;

The book that came with the laptop has good instructions on how to pull it
apart and access various parts of the hardware. So I had a glance at the WWAN
instructions and was easily able to open it up and look at the device. However
when I did this I discovered that the SIM was not attached to the device at
all.

&lt;p&gt;

At this point I googled more accurately for details about the location of the
SIM in Dell laptops with HSDPA devices. It was at this point I discovered an
&lt;a href=&quot;http://www.reghardware.co.uk/2006/06/20/dell_hsdpa_laptops_not_tied_to_vodafone/&quot;&gt;article
on the Register&lt;/a&gt; that said Dell's are not tied to Vodafone and quite
plainly pointed out to me the location of the SIM is in the Battery bay.

&lt;p&gt;

And hey presto an easily accessed Vodafone SIM is indeed sitting right there,
it should be no problem to put a Telstra or Optus SIM in on a prepaid
plan. Telstra appears to have better coverage by far, their USB devices may or
may not work with Linux, however I know from experience the Optus USB device
does work with Linux. However I do not need either for this laptop, Optus
offer a SIM only prepaid kit for AUD $30, Telstra do not mention offering it,
however forums suggest you can walk into a Telstra shop and ask for a 3G
prepaid kit and request that it be wireless broadband enabled for around AUD
$30 also.

&lt;p&gt;

The other nice thing I would like to note from this experience is how good
the book that came with the laptop from Dell is, that it has good detail about
accessing most of the hardware in the laptop is very useful and means you are
less likely to break things if you want to look inside.</description>
  </item>
  <item>
    <title>[comp] Doing it backwards or unlink returning ENOSPC</title>
    <pubDate>Thu, 25 Sep 2008 16:28:00 </pubDate>
    <link>http://allan.svana.org/sjh/diary/2008/09/25#2008-09-25_01</link>
    <description>&lt;!-- 2008-09-25 16:28:42 --&gt;

So this is not directly Linux related, however it is kind of
entertaining/strange. I have been mucking about with Solaris Logical Domains a
bit this week at work, as part of this I was reading up on how ZFS works. This
may well apply with LVM snap shots in Linux now also. However when reading
about out of space behaviour on ZFS with snapshots I was somewhat entertained
to see one specific point.

&lt;p&gt;

Due to the way snapshots work on ZFS there is a possibility you will get an
ENOSPC returned when trying to unlink (rm) a file. This is of course
completely reversed from the intuition most people will have, to free up space
remove some files. Out of curiosity I looked in the unlink man page on Linux
and in the rm source code on Linux, at a cursory glance neither of them will
deal with ENOSPC (unlink does not mention it as an error).

&lt;p&gt;

Without testing my guess is that in such a case unlink (2) would return EIO.</description>
  </item>
  <item>
    <title>[comp] Obscurity, P=NP etc, Hash Visualisation</title>
    <pubDate>Fri, 18 Jul 2008 16:00:00 </pubDate>
    <link>http://allan.svana.org/sjh/diary/2008/07/18#2008-07-18_01</link>
    <description>&lt;!-- 2008-07-18 --&gt;

Three things I saw online today I feel like mentioning, first linked from 
&lt;a href=&quot;http://www.schneier.com/blog/&quot;&gt;Schneier's blog&lt;/a&gt; was an article
about how lock making companies are still very much in the security through
obscurity world and how lock geeks getting together online and at (computer)
security conferences are breaking their obscure secrets open. 
&lt;a href=&quot;http://www.theglobeandmail.com/servlet/story/RTGAM.20080711.wlpicking11/EmailBNStory/lifeMain/&quot;&gt;An 
interesting read&lt;/a&gt;.

&lt;p&gt;

It is interesting to see some companies such as Kryptonite eventually
reacted, others seem intent on denying public information, or trying to shut
down people who know about it. In computing it is a well known fact (although
still ignored by too many people/companies) that security through obscurity
will not work, public design and analysis by experts in the field however does
work and should be used for things that need to be secure. Although one aspect
that comes to mind here is that in the case of locks you may not want to make
them impossible as other attack vectors are then used. As the article mentions
crooks seem to prefer using a hammer (or maybe explosives) over opening the
locks through lock exploits. There were some discussions about this in the
car that were I think linked to by Schneier a few years back.

&lt;p&gt;

Next was an interesting wikipedia page linked to by kottke, 
&lt;a href=&quot;http://en.wikipedia.org/wiki/List_of_unsolved_problems&quot;&gt;a list of
unsolved problems from a number of different field&lt;/a&gt;, those listed in
Computing are familiar, however looking through the collected information on
those in other fields is pretty fascinating. Mmmmmm wikipedia goodness.

&lt;p&gt;

Catching up on some &lt;a href=&quot;http://lwn.net/&quot;&gt;LWN&lt;/a&gt; reading and I see the 
&lt;a href=&quot;http://lwn.net/Articles/288512/&quot;&gt;mention&lt;/a&gt; of a new OpenSSH version
approaching, in the list of new features is &quot;Experimental SSH fingerprint
visualisation&quot; with a 
&lt;a href=&quot;http://sparrow.ece.cmu.edu/~adrian/projects/validation/validation.pdf&quot;&gt;paper&lt;/a&gt;
(pdf) linked. So I download and had a read of the paper, largely to see what
sort of images they generate. It is good to see some work on what is one of
the biggest security weaknesses out there, the humans using secure systems.</description>
  </item>
  <item>
    <title>[comp/software] How to capture one image from a v4l2 device</title>
    <pubDate>Tue, 08 Jul 2008 17:22:00 </pubDate>
    <link>http://allan.svana.org/sjh/diary/2008/07/08#2008-07-08_01</link>
    <description>&lt;!-- 2008-07-08 17:22:12 --&gt;

So after seeing Mikal wondering about it again yesterday, I had a look at some
source code, decided that it could be done but it would be nicer to do it with
existing software. I recalled seeing ffmpeg or mplayer commands that may in
theory be able to do a capture of a single image. Then I stumbled upon a way
to do this with gstreamer filters and sinks.

&lt;p&gt;

&quot;gst-launch-0.10 v4l2src ! video/x-raw-yuv,width=640,height=480 ! ffmpegcolorspace ! pngenc ! filesink location=foo.png&quot;

&lt;p&gt;

As one command captures the image at that resolution into a file foo.png. This
is on my laptop, however I tested this with the QuickCam 9000 on my desktop
with a resolution of 1600x1200 and it worked, the focus meant it took a while
but it popped out a good image. Gstreamer really is cool, I still remember
seeing Federico talk about GMF (Gnome Media Framework, which is what became
GStreamer) at CALU in 1999 and being excited by it.

</description>
  </item>
  <item>
    <title>[comp/email] Interest in data from an email spike</title>
    <pubDate>Fri, 13 Jun 2008 13:56:00 </pubDate>
    <link>http://allan.svana.org/sjh/diary/2008/06/13#2008-06-13_01</link>
    <description>&lt;!-- 2008-06-13 13:56:20 --&gt;

A few minutes ago in my work email I saw an email appear from the 
&lt;a href=&quot;http://www.nteu.org.au/bd/act&quot;&gt;ACT NTEU&lt;/a&gt; division. The surprising
thing about this email was they attached a 47 MB file to the email (they
really should have put a link to it and said it was a large download). Sure
if you are at work the size does not take long to download, however it is
rather bone-headed for any members to be given an email that size at any other
location. (once expanded with the attachment encoding it becomes a fair bit
larger anyway).

&lt;p&gt;

I can not find the department NTEU person to learn if there are any numbers on
how many staff on campus are actually union members, nor can I get hold of the
campus wide email system admin people so I can not predict how much this hit
storage and network load on the email systems campus wide. I could do some
analysis on the department email server, though I am not sure if that would
provide much insight. As I suspect there are a fairly large number of union
members on campus and they all will have received this email as it is valid
email and will have come in through the spam filters.
</description>
  </item>
  <item>
    <title>[comp/linux] Some system config updates</title>
    <pubDate>Thu, 29 May 2008 15:39:00 </pubDate>
    <link>http://allan.svana.org/sjh/diary/2008/05/29#2008-05-29_01</link>
    <description>&lt;!-- 2008-05-29 15:39:33 --&gt;

So I have been using xterm as my default terminal for years, however on
Wednesday morning when 
&lt;a href=&quot;http://bakeyournoodle.com/~tony/diary/&quot;&gt;Tony&lt;/a&gt; noticed this he
suggested I should look at gnome-terminal as it has some advantages such as
ctrl click url loading. I could not however get my font (the default system
fixed size 10) to look right or be sized correctly in gnome-terminal, even
though in xterms it looked fine.

&lt;p&gt;

After lots of mucking around with fontconfig and other things trying to track
down the issue, Tony suggested I look at the resolution for fonts in GNOME
System -&gt; Preferences -&gt; Appearance :: Fonts :: Details wondering what my DPI
for fonts was set to. His was set to 96, mine however was at 112. So I changed
this and all of a sudden the font in gnome-terminal could look identical to my
xterm fixed font. Rock on, something I should share with the world here in
case it comes up for others. Getting the font size right in the terminal
application is important as my brain is so used to a certain look there.

&lt;p&gt;

On another note I should probably stop bagging the nvidia setup 
&lt;a href=&quot;http://svana.org/sjh/diary/2008/05/28#2008-05-28_01&quot;&gt;as much&lt;/a&gt; as
&lt;a href=&quot;http://svana.org/sjh/diary/2008/05/26#2008-05-26_01&quot;&gt;I have been&lt;/a&gt;,
sure it is a pain I can not use xrandr commands to automatically do funky
stuff in a scripted environment, however I can at least use the gooey tool
nvidia-settings to do the stuff I want, even if it is not as nice as doing
things automatically. Still it sure would be nice if nvidia opened up and
allowed open source development with full specs to the hardware. If this
laptop had been available with the Intel chipset I would have specced it with
that for sure.</description>
  </item>
  <item>
    <title>[comp/hardware] Yet another sign I may work with computers</title>
    <pubDate>Wed, 28 May 2008 18:26:00 </pubDate>
    <link>http://allan.svana.org/sjh/diary/2008/05/28#2008-05-28_01</link>
    <description>&lt;!-- 2008-05-28 18:26:22 --&gt;

&lt;table&gt;
&lt;tr&gt;
&lt;td valign=&quot;top&quot;&gt;

&lt;a href=&quot;http://svana.org/sjh/images/various/five_lcds_med.jpg&quot;&gt;&lt;img src=&quot;http://svana.org/sjh/images/various/five_lcds_small.jpg&quot; alt=&quot;how many lcds is too many?&quot;&gt;&lt;/a&gt;&lt;br&gt;
How many lcds is too many? (&lt;a href=&quot;http://svana.org/sjh/images/various/five_lcds.jpg&quot;&gt;Full Size&lt;/a&gt;)

&lt;/td&gt;
&lt;td valign=&quot;top&quot;&gt;

I noticed this is likely a sure sign I work with computers or am a geek today,
in my office I had 5 lcds displaying something. Admittedly the two on the
right are showing the same thing on a dual head computer doing an install
without configuring the dual heads.

&lt;p&gt;

Sort of reminiscent of &lt;a href=&quot;http://jon.oxer.com.au/blog/id/55&quot;&gt;Jon's
experiment&lt;/a&gt; in the office a while back (though not as cool). On a side
note I am writing this post on the new laptop, the first time I have written a
post on it. I must say the keyboard is awfully nice to type on.

&lt;p&gt;

On the whole most things work really well, which is impressive, not much
configuring or mucking around and things just work, Linux really is improving
all the time toward a better desktop experience. I am trialling using a normal
default Gnome environment and so far it seems to be going well. 

&lt;p&gt;

My biggest annoyance is probably the nvidia graphics card, that I can not yet
use xrandr 1.2 stuff to do funky things with x output from within X and a few
other problems (apart from the most basic problem of it being closed source
crap). Next I need to work out how to enable vga output to projectors to be
on all the time and a 1600x1050 output to a screen at home to watch dvds and
such on.

&lt;p&gt;

When I tried to set up a 32 bit chroot yesterday debootstrap failed so I need
to hunt down the reason for that if I want to be able to see flash (more
closed source crap) videos. Still I like this new toy, infact I will be
leaving my old laptop at work when I go home in a few minutes as this seems
capable of doing everything I need in a laptop configuration wise already.

&lt;/td&gt;
&lt;/tr&gt;
&lt;/table&gt;</description>
  </item>
  <item>
    <title>[comp/hardware] It arrived</title>
    <pubDate>Mon, 26 May 2008 15:09:00 </pubDate>
    <link>http://allan.svana.org/sjh/diary/2008/05/26#2008-05-26_01</link>
    <description>&lt;!-- 2008-05-26 15:09:00 --&gt;

&lt;table&gt;
&lt;tr&gt;
&lt;td valign=&quot;top&quot;&gt;

&lt;a href=&quot;http://svana.org/sjh/images/xpslaptop/two_laptops_closed_med.jpg&quot;&gt;&lt;img src=&quot;http://svana.org/sjh/images/xpslaptop/two_laptops_closed_small.jpg&quot; alt=&quot;two laptops, new and old&quot;&gt;&lt;/a&gt;&lt;br&gt;
Two laptops, old oneiros left, new shiva right (&lt;a href=&quot;http://svana.org/sjh/images/xpslaptop/two_laptops_closed.jpg&quot;&gt;Full Size&lt;/a&gt;)

&lt;br&gt;

&lt;a href=&quot;http://svana.org/sjh/images/xpslaptop/two_laptops_open_med.jpg&quot;&gt;&lt;img src=&quot;http://svana.org/sjh/images/xpslaptop/two_laptops_open_small.jpg&quot; alt=&quot;two laptops, new and old&quot;&gt;&lt;/a&gt;&lt;br&gt;
Lids open (&lt;a href=&quot;http://svana.org/sjh/images/xpslaptop/two_laptops_open.jpg&quot;&gt;Full Size&lt;/a&gt;)

&lt;/td&gt;
&lt;td valign=&quot;top&quot;&gt;

So the new laptop I 
&lt;a href=&quot;http://svana.org/sjh/diary/2008/05/19#2008-05-19_03&quot;&gt;mentioned&lt;/a&gt;
arrived this morning, I took the photos you can see on the left before I had
even turned it on. Though I had already scratched the palm rest area slightly
getting the vista sticker off and then I put a penguin sticker on the lid. The
colour is really spot on, a metallic pink very similar to my 
&lt;a href=&quot;http://svana.org/photos/painted_mtb/&quot;&gt;mountain bike&lt;/a&gt;, I can sort
of, in my head justify this as being race related gear as I download my GPS
and HR training data to my laptop, and also do some CORC or Bilbys stuff on
my laptop.

&lt;p&gt;

Anyway I have booted into a Debian Lenny daily amd64 build iso and installed
Debian from that, still pretty bog standard. I will probably have to use the
Nvidia closed source drivers as the NV driver though it is driving the screen
nicely and appears to handle xrandr for using a projector nicely will not to
DRI yet.

&lt;p&gt;

As choosing the name of the new machine is 
&lt;a href=&quot;http://svana.org/sjh/diary/2005/02/06#2005-02-06_01&quot;&gt;important&lt;/a&gt; I
was a little worried about what to call the new laptop. However as I no longer
had the machine shiva I was able to reuse that as a laptop name.

&lt;/td&gt;
&lt;/tr&gt;
&lt;/table&gt;</description>
  </item>
  <item>
    <title>[comp/hardware] Little laptops that can</title>
    <pubDate>Mon, 19 May 2008 18:15:00 </pubDate>
    <link>http://allan.svana.org/sjh/diary/2008/05/19#2008-05-19_03</link>
    <description>&lt;!-- 2008-05-19 18:15:44 --&gt;

With apologies to 
&lt;a href=&quot;http://en.wikipedia.org/wiki/The_Little_Engine_That_Could&quot;&gt;Walty
Piper&lt;/a&gt; I must say the power available in modern laptops is staggering. I am
getting a new work laptop sometime this week (or maybe next). The laptop I
have been using since August 2004 is a lovely Dell X300, a small, light
portable laptop that I still find remarkably powerful and useful. Specs are
&quot;Intel(R) Pentium(R) M processor 1.40GHz, 640 MB RAM, 60 GB HDD&quot;. The laptop I
chose to replace this is a Dell XPS M1330 (they come with pink lids, how could
I pass that up). This will have a T9300 CPU (Dual core 2.5 GHZ, 6 MB of L2
Cache), 4 GB of RAM, 320 GB HDD, built in dvd burner, a host of other things,
a pink lid (I may have already mentioned this, but I am excited about that)
and still only weigh around 1.8 KG (thus still be portable).

&lt;p&gt;

All this in such a small package is mind boggling to pretty much anyone who
has been around computers since 486 or earlier model chips powered most PCs. I
doubt I will be getting any 
&lt;a href=&quot;http://svana.org/sjh/diary/2008/04/18#2008-04-18_01&quot;&gt;Heidelberg&lt;/a&gt;
&lt;a href=&quot;http://svana.org/sjh/diary/2008/05/19#2008-05-19_02&quot;&gt;Scars&lt;/a&gt; now.</description>
  </item>
  <item>
    <title>[comp/prog] Move a little thing to python</title>
    <pubDate>Thu, 08 May 2008 13:44:00 </pubDate>
    <link>http://allan.svana.org/sjh/diary/2008/05/08#2008-05-08_01</link>
    <description>&lt;!-- 2008-05-08 13:44:01 --&gt;

At ANU there is an online (web page) searchable phone database for all ANU
phone numbers. A few years ago (July 2002, according to the version control
dates) I spent an hour or two writing a command line program in perl that
queries this and prints the results. I find it much easier to use a command
line application than open a tab in a web browser and find the appropriate
page and enter a query when all I want is a simple bit of information back. I
suspect most of the staff in this department are similar (Computer Science).

&lt;p&gt;

Sometime last year I realised that though the URL I was using on the ANU
Internal Web still worked it seemed not to interface with the latest phone
database for the uni so it sometimes did not match people I knew worked on
campus, other times it contained out of date numbers for people. However there
were other important uses for my time so I did not bother looking too closely
into updating it when most of the time the old results were still good enough.

&lt;p&gt;

Finally this week Bob noticed there were no matches coming back, it seems the
old interface no longer connected to the database correctly. Thus I opened the
program and had a look at updating it. The old program used LWP to fetch the
page with a GET request. The newer interface now on ANU Web works properly
with a POST request. Also the result page is more complex to parse than the
old one (more complex regular expressions, or maybe a small state machine
needed). Still it did not look too hard to spend an hour or so fixing the old
perl code up to get the new page and parse it properly for the desired
results.

&lt;p&gt;

However I hit a snag when for some reason LWP did not fetch the entire result
from the web server that was returning the data in chunks. A tcpdump session
showed it simply closed the request rather then fetch all the data. At this
point I could have debugged the perl code and fixed, after all there is no
good reason LWP should not work. However I thought to myself, I have been keen
to write python a bit for a while. Bob bought the Mark Lutz Programming Python
book for my office and I read through about half of it. So why not rewrite the
program in python. See how a perl hacker can transfer to using python at least
for a small program.

&lt;p&gt;

I am happy to say that the page fetching in python even made perl look
complex, the code that did the job (and worked, doing a post request fine) was

&lt;p&gt;

&lt;pre&gt;
   name = ' '.join(sys.argv[1:])
   params = urllib.urlencode({'stype': 'Staff Directory', 'button': 'Search', 'querytext': name})
   f = urllib.urlopen(searchuri, params)
   r = f.read()
&lt;/pre&gt;

&lt;p&gt;

Cool I thought, this is hell easy, what a fantastic language, I will forever
give up my perl ways if everything is this easy and obvious. Obviously this
was not going to last, I guess partly because my brain meshes with perl well
after so many years, and I am used to perl associative arrays, classes,
modules, and regular expressions. Anyway I now had my result from the search
and all I had to do was parse it and extract a form that can be printed on a
terminal nicely.

&lt;p&gt;

First I tried using the python regular expression matching and needed to
create some hideous regexp to match the data returned. I also discovered that
when a search matches more than about 2 people the data is returned in a
different format. Fortunately in this second case the format is really easy to
match against with a regexp. Even though the regexp language is
similar/identical to perl I was still getting my head around the documentation
for all of what I was doing and could not at first construct a regexp that
made sense to parse the first sort of data. So I decided to get a HTMLParser
and extract the data I wanted without the crap in the tags.

&lt;p&gt;

My first attempt was to use the 
&lt;a href=&quot;http://docs.python.org/lib/module-HTMLParser.html&quot;&gt;HTMLParser&lt;/a&gt;
module, however I soon found that this threw an exception when ever I fed it
the page from the uni with the matches in it. I tried except: pass in the
hopes it would keep on going, however it stopped there and did not process the
rest of the page. So I had to change to using the 
&lt;a href=&quot;http://docs.python.org/lib/module-HTMLParser.html&quot;&gt;htmllib.HTMLParser&lt;/a&gt; 
which was almost identically easy to use and managed to process the entire
page.

&lt;p&gt;

Next I wanted to store the data until all matches were found, in perl this
would be trivial using a multiple level hash or an array of hashes. Of course
the most obvious way to do this in python now I think about it is using a list
of dicts. However I had my brain stuck on using a multi level hash. I found
this was most difficult in python as you need to initialise dict entries and
can not simply assign arbitrarily into them when you need. I needed to use the
following construct.

&lt;p&gt;

&lt;pre&gt;
if (D.has_key (key1) == 0):
   (D[key1]) = {}

if ((D[key1]).has_key (key2) == 0):
   D[key1][key2] = ''

s = D[key1][key2]
D[key1][key2] = s + data
&lt;/pre&gt;

&lt;p&gt;

Which is obviously a bit more verbose than the perl vernacular of
$H{key1}{key2} = $s; I think that dicts do not yet work this easily is a
problem, however &lt;a href=&quot;http://davyd.livejournal.com/&quot;&gt;someone&lt;/a&gt; has
assured me that future python releases will have dicts that can work as
easily as a perl hacker would expect. Anyway rather than next go on to the now
obvious that I thought about it list of dicts I was still stuck on the idea of
using a pair of keys to access some value, thus a tuple seemed obvious to
store the data in a dict still. However this meant that when I extract the
values from the dict I can not simply use len on the dict collection as it
does not accurately reflect the number of records.

&lt;p&gt;

Which of course was the perfect chance to go and learn how to use map and
lambda in python, after all I use map in perl often and it really is lovely to
have functional capabilities in a language you program in. Using a number as
one of the record keys I was then able to have constructs such as (after
refactoring to list of dicts I did not need the high = expression and modified
the second expression slightly)

&lt;p&gt;

&lt;pre&gt;
high = max (map (lambda k: k[0], D.keys()))
&lt;/pre&gt;

and

&lt;pre&gt;
name, phone, address = map (lambda k: D[(i,k)],['Name', 'Phone', 'Address'])
&lt;/pre&gt;

&lt;p&gt;

The first to find the number of records from the numeric key and the second to
extract the information I was interested in printing. The second especially is
often used in perl to extract matches with a [0..N] or range(N) sort of thing
when you get things with multiple function calls into a list. Such as the perl
expression 

&lt;pre&gt;
my @emails = map { $res-&gt;getvalue ($_,0); } (0..$res-&gt;ntuples-1);
&lt;/pre&gt;

&lt;p&gt;

The final problem I had was when printing the data, in perl and c I can do

&lt;pre&gt;
printf (&quot;%-20s %-12s %46s&quot;, name, phone, address)
&lt;/pre&gt;

However in python the string formatting in print did not justify or cut off
arguments as expected. Also string.rjust and string.ljust did not limit the
size of strings if they were larger than the field size. So I needed to do the
following.

&lt;p&gt;

&lt;pre&gt;
   print &quot;%s %s %s&quot; % (name[0:30].ljust(30), \
                       phone.rjust(12), \
                       address[0:45].rjust(45))
&lt;/pre&gt;

&lt;p&gt;

That final concern is not really a problem, and arguably clearer as to what is
going on than using printf formatting as a c programmer is used to. Anyway if
anyone who works at ANU wants to use this from a command line or anyone wants
to see it I have it
&lt;a href=&quot;http://svana.org/sjh/various/anu_phonesearch.py&quot;&gt;online for
download/viewing&lt;/a&gt;. There may be a few places I can clean this up better,
and the version online is stripped of comments. I can understand how people
like the way python works, the code really is almost like pseudo code in many
ways, it does most of the time work the way you expect it to, it is a little
hard to wrap my perl oriented brain around, however that does not take long to
work around I expect. Also anyone complaining about whitespace formatting in
python, IMO you are deranged, it really is not an issue needing to use
whitespace for program layout.
</description>
  </item>
  <item>
    <title>[comp/linux] Another Ubuntu annoyance</title>
    <pubDate>Thu, 01 May 2008 22:03:00 </pubDate>
    <link>http://allan.svana.org/sjh/diary/2008/05/01#2008-05-01_01</link>
    <description>&lt;!-- 2008-05-01 22:03:36 --&gt;

I was bitten once more today by Ubuntu forcing the use of UUIDs for disk
labels (in grub and other places). We have a lot of systems at work (student
labs) where we update or synchronise them with rsync rather than some install
mechanism such as cfengine and fai. Thus if a grub menu.lst or an fstab is
copied over and not automatically modified a machine will not boot if it uses
uuid for a disk label.

&lt;p&gt;

Unfortunately in Ubuntu there is no way to disable this in grub, the uuid
change is hard coded into update-grub in /usr/sbin. At least in Debian it is
still optional. Anyway I had forgotten to modify update-grub to remove the uuid
stuff and had installed a new kernel on a student server, then reboot the
machine and hey presto it did not come back online.

&lt;p&gt;

If it were not for the need to run this server on Ubuntu to be similar to the
lab image and easy environment for a student to duplicate at home it would be
so much easier to run Debian on it again. Of course to compound the issue this
was a server I had to wait until after normal hours to take offline so I was
messing around with after 7pm.</description>
  </item>
  <item>
    <title>[comp/linux] Update on deb package archive clearing.</title>
    <pubDate>Mon, 28 Apr 2008 14:44:00 </pubDate>
    <link>http://allan.svana.org/sjh/diary/2008/04/28#2008-04-28_01</link>
    <description>&lt;!-- 2008-04-28 14:44:32 --&gt;

In response to my 
&lt;a href=&quot;http://svana.org/sjh/diary/2008/04/23#2008-04-23_01&quot;&gt;last post&lt;/a&gt;,
In email and 
&lt;a href=&quot;http://taz.net.au/blog/2008/04/26/keeping-varcacheaptarchives-empty/&quot;&gt;online&lt;/a&gt;
a few people have suggested using file:// URI's in sources.list as that stops
apt from using the cache. That would indeed fix the problem for the one
machine I was talking about in the post (the mirror itself) however I should
admit I had also been thinking about it with respect to all the desktops and
servers and such that use Debian or Ubuntu in the department here at work. 

&lt;p&gt;

They all have a 100 Mbit (or better) link to the mirror, and it seems silly to
have them using local disk storage once an entire successful apt run is
finished. Andrew 
&lt;a href=&quot;http://blog.andrew.net.au/2008/04/22#not_caching_acquired_debs&quot;&gt;suggested&lt;/a&gt;
the Dpkg::Post-Invoke rule could be used to run apt-get clean, my understanding
upon reading the documentation last week was that would run clean after every
individual deb package as installed. I guess it is likely when installing
large numbers it may not be run until after the post-inst script, however
without looking close it appeared to me it may mess up install processes
somehow. I may have gotten that intuition wrong, however as pointed out in the
other online response it will not work for some use cases.

&lt;p&gt;

It still seems the only current way to solve this is to add apt-get clean to
cron (or of course write a patch for apt that allows a
Apt::Install-Success::Post method or something), not really a huge problem for
now, however as I said strangely different to dselect and my expected
capabilities.
</description>
  </item>
  <item>
    <title>[comp/linux] Keeping /var/cache/apt/archives empty.</title>
    <pubDate>Wed, 23 Apr 2008 13:02:00 </pubDate>
    <link>http://allan.svana.org/sjh/diary/2008/04/23#2008-04-23_01</link>
    <description>&lt;!-- 2008-04-23 13:02:15 --&gt;

On &lt;a href=&quot;http://mirror.linux.org.au/&quot;&gt;mirror.linux.org.au&lt;/a&gt; I noticed we
stored packages in /var/cache/apt/archives. I think this is somewhat silly
considering the machine is a full debian mirror (it is ftp.au.debian.org)
(okay so we do not have security updates on there, but that is not a big
download cost).

&lt;p&gt;

So I had a look at the apt.conf and apt-get documentation and
/usr/share/doc/apt/examples/configure-index.gz and a bit of a look around
online to see how to disable the cache. I thought it may be bad to completely
disable the directory for packages to sit as apt places them there when it
downloads them. However as the partial directory being used for packages in
transit I wondered if that was where packages were kept during the install
process.

&lt;p&gt;

Anyway I tried adding Dir::Cache::Archive &quot;&quot;; and Dir::Cache::pkgcache &quot;&quot;; to
a new file /etc/apt/apt.conf.d/10pkgcache. This however did not change
anything and packages were still left in the archive. Next I tried setting
both items to /dev/null, that caused a bus error when running apt-get
install. I was kind of hoping there was some way to tell apt not to store
files after it has run, dselect runs apt-get clean upon completion, there
appears to be no way to tell apt to do a post install hook and run clean when
finished. (assuming apt ran with no errors in the case the post install hook
runs)

&lt;p&gt;

The only way to do this appears to be to place apt-get clean in a crontab
somewhere, which is a pain if you are short on disk space so would like to get
rid of packages as soon as installing is finished. Interestingly /dev/null was
also changed by what I tried above, it became a normal file and I caused some
other processes depending on it to fail. Restarting udev did not recreate the
device (even though the udev config said to recreate it as a char device with
the correct permissions set) instead it reappeared as a normal file with the
wrong permissions, some other running process seems to have interfered with
/dev/null creation. Anyway that was easily fixed with /bin/mknod, now if only
the emptying of /var/cache/apt/archives were so easy without resorting to
cron.</description>
  </item>
  <item>
    <title>[comp] Participating the BarCamp way</title>
    <pubDate>Sat, 19 Apr 2008 15:02:00 </pubDate>
    <link>http://allan.svana.org/sjh/diary/2008/04/19#2008-04-19_05</link>
    <description>&lt;!-- 2008-04-19 15:02:53 --&gt;

So I suspect this is of course one of the main interaction channels that
Barcampers are expected to use, however I am finding it interesting to do it
here today. Barcamp is promoted as a place where you sit around with your
computers engaging in the content online as well as off line all throughout the
day. Part of the online thing is most of the people there will have a web
presence, likely a blog of some form.

&lt;p&gt;

So when I have talked to people during the day, or when someone has given a
presentation, I have looked for the link they placed on the Barcamp page and
been able to go read some of their blog and see what they talk about more. I
probably should participate to the extent of adding myself to the wiki, after
all I am here all day. However it is interesting to note Bob and I have both
had the same sort of reaction to our involvement. The Unorganisers suggested
we all sign up to some yahoogroup or something for more of the discussions
leading up to hosting the event. As far as I know Bob did not join, and I did
not either, too much effort involved to sign up to another mailing list. So I
just had a look at adding my name and diary link to the BarCampCanberra page
and to edit the wiki requires a login so I decided not to bother.

&lt;p&gt;

Sure it makes perfect sense that to edit the page you need to go through some
form of authentication to stop spammers and such from blowing the wiki
apart. I simply can no overcome my web forum/online login apathy enough to
sign in here, kind of strange, though I notice Bob has not done this either.</description>
  </item>
  <item>
    <title>[comp] Reminder that other people exist</title>
    <pubDate>Sat, 19 Apr 2008 14:33:00 </pubDate>
    <link>http://allan.svana.org/sjh/diary/2008/04/19#2008-04-19_04</link>
    <description>&lt;!-- 2008-04-19 14:33:15 --&gt;

Listening to &lt;a href=&quot;http://stephendann.com/&quot;&gt;Dr Stephen Dann&lt;/a&gt; (or 
&lt;a href=&quot;http://www.ecocomm.anu.edu.au/people/info.asp?Surname=Dann&amp;Firstname=Stephen&quot;&gt;ANU
Page&lt;/a&gt;, he really needs to get his staff photo updated as he does not look
that silly/wrong I promise) giving a talk about getting his completely non
Internet savvy and seemingly not up on modern Internet culture students up to
speed on what many of us geeks and Internet people consider normal and
everyday.

&lt;p&gt;

It is a highly amusing presentation, he has been talking about many things we
all know and recognise that his students seem to not understand or know
about. He mentioned that the Comp Sci students he had the first year or so he
ran the course no longer do the subject as they seem to think they do not need
it, so all the students are marketing commerce students who do not live in
Internet culture.

&lt;p&gt;

Something that I am reminded of listening to this is that we often forget
there are people dissimilar to ourselves out there. For example a somewhat
elitist example I often have to remember is that most people in the population
are not university educated, however living in Canberra and hanging out with
people who generally are, and working at a university, I often forget that not
everyone shares my background. Dr Dann is dealing with non Internet savvy
people and trying to induct them, it is interesting to hear his
experiences. Good talk.
 </description>
  </item>
  <item>
    <title>[comp] Getting deeper into the materials</title>
    <pubDate>Sat, 19 Apr 2008 13:31:00 </pubDate>
    <link>http://allan.svana.org/sjh/diary/2008/04/19#2008-04-19_03</link>
    <description>&lt;!-- 2008-04-19 13:31:30 --&gt;

On the badges being worn by the people at Barcamp most people in the room have
various letters across the bottom that describe what geek things they are
involved in in shorthand. The short hand is a geek periodic table of elements
that is hanging up on the wall in N101. I was briefly chatting with 
&lt;a href=&quot;http://carruthk.blogspot.com/&quot;&gt;Kate Carruthers&lt;/a&gt; before she headed
off to the speed networking session. I instead of being a sociable well
adjusted geek and joining in that session remained sitting here typing away on
the laptop. Wondering something about the Unorganiser 
&lt;a href=&quot;http://www.acidlabs.org/&quot;&gt;Stephen Collins&lt;/a&gt; I headed to the
&lt;a href=&quot;http://barcamp.org/BarCampCanberra1&quot;&gt;BarCampCanberra1&lt;/a&gt; page to see
what he put up there. Realising that people had put their website links on
there I paged down and found the Kate Carruthers link there. On her blog there
is a link to the 
&lt;a href=&quot;http://alegrya.wordpress.com/2008/03/28/geek-i-odic-table-of-the-elements/&quot;&gt;Geek
Periodic Table of Elements&lt;/a&gt; which was created in Sydney a few weeks ago.

&lt;p&gt;

So the fact that people using the abbreviations on their badges is so
prevalent today it had me wondering if there would be a cool way to obfuscate
this a little bit (so I admit I like geek in jokes). Alas the symbols on the
table are not the same abbreviations as found on the real periodic table so
his is not quite as simple as I first hoped. My idea is if you select your
list of elements to put on your badge and then could arrange them in such a
way as to create materials or more complex things made up of the elements
bonded in specific ways. For example water is H2O (two hydrogen molecules
bonded to one oxygen molecule), so if you had a drop of water drawn on the
bottom of your badge you are indicating your geek interests included H and O
(you could even use it as a way to indicate you do H more than O if you want
to be exact about this).

&lt;p&gt;

The idea above falls apart a bit as the letters do not match the
elements. However if you wanted to go ahead with this obfuscation you could
simply use the elements in the same place on the table as those you select to
try and choose various compounds then represent these compounds on your badge
rather than the letters them selves. However no one would easily be able to
work out what you mean now as they would need to know the chemical make up of
the compounds you use, know where those elements are placed on the periodic
table and then have memorised the geek periodic table to the extent they know
what geek interests are in those positions.

&lt;p&gt;

This is however a unconference that focuses on cool geeky online apps to some
extent, you could fairly quickly extend the geek periodic table to enable
translating from a selection of geek elements into a selection of real
materials and have some symbol suggestions for the materials. People who want
to use the obfuscation could use the tool (in both directions) to work out
what is on a badge.</description>
  </item>
  <item>
    <title>[comp] User interface discussions</title>
    <pubDate>Sat, 19 Apr 2008 12:23:00 </pubDate>
    <link>http://allan.svana.org/sjh/diary/2008/04/19#2008-04-19_02</link>
    <description>&lt;!-- 2008-04-19 12:23:16 --&gt;

So the talk that just finished a few minutes ago was asking why we have not
evolved our computer interfaces significantly in the last 40 years. The
presenter mentioned the 
&lt;a href=&quot;http://www.google.com.au/search?hl=en&amp;q=Douglas+Engelbert+youtube&quot;&gt;1968
Douglas Engelbert&lt;/a&gt; 
&lt;a href=&quot;http://en.wikipedia.org/wiki/The_Mother_of_All_Demos&quot;&gt;Demo&lt;/a&gt;
(definitely recommended watching). A few people in the audience suggested a
large part of why alternative interfaces (touch screens etc) are not pushed
out to the world at large is the technology and reliability of these devices
is still not there for reliable and cost effective deployment.

&lt;p&gt;

The presenter did have a definite point, when you consider where interfaces
were at in 1968, why has there not been more research into different
interfaces for different use cases and scenarios. It occurred to me that it is
interesting to look at life possibly imitating art. In the 
&lt;a href=&quot;http://en.wikipedia.org/wiki/Neal_Stephenson&quot;&gt;Neal Stephenson&lt;/a&gt;
book Snowcrash. Most users interface to the virtual reality world via the real
life interfaces there and also appear to access computers in reality via a VR
environment. However the hard core hackers all still access the low level real
code with a keyboard and 
&lt;a href=&quot;http://en.wikipedia.org/wiki/Visual_Display_Unit&quot;&gt;VDU&lt;/a&gt; and a Unix
style command line interface (not too surprising from Stephenson when you
consider his brilliant essay 
&lt;a
href=&quot;http://en.wikipedia.org/wiki/In_the_Beginning...was_the_Command_Line&quot;&gt;In
the Beginning ... was the Command Line&lt;/a&gt;)

&lt;p&gt;

So there are likely to be real uses for the currently accepted interfaces all
the time, however the uses of alternative interfaces is likely to apply in a
more specific use case scenario, and thus manufacturers, designers,
researchers exactly need to somehow align and market them in specific ways and
inform the people who want that use of a better (if it really is better) way
to use the technology.

&lt;p&gt;

An amusing aspect that came up for me (from a cycling background) was the
question asked why in The Tour de France the UCI has banned recumbents. The
person asking the question has obviously drunk the 
&lt;a href=&quot;http://en.wikipedia.org/wiki/Kool-Aid&quot;&gt;kool-aid&lt;/a&gt; on offer from the
&lt;a href=&quot;http://www.ozhpv.org.au/&quot;&gt;HPV community&lt;/a&gt; on this issue with there
constant claims that they are obviously faster and superior for all uses. The
reality of this is that they simply can not climb as fast, thus any race with
climbing (such as The Tour de France) will make them useless. The reasons they
do not climb well is they can not be made as light as a modern diamond frame
road bike (they can be easily purchased at 6 KG ready to ride now) and you can
not get out of the saddle in a recumbent and really work more muscle groups,
the limitations of muscle uses restrict the ability to go hard up hills. Also
when climbing with the rather limited motor available in a human body the
aerodynamic advantages of a recumbent do not matter at such low speeds and can
not overcome the advantages of low weight and more muscle groups.

&lt;p&gt;

Thus &lt;a href=&quot;http://www.mabula.net/tbfw/blosxom.cgi&quot;&gt;Paul&lt;/a&gt; had some basis
in suggesting that one reason computer interfaces have not advanced is that
they are rather optimal for the purpose, though I strongly tend to agree more
with the presenter that computer interfaces have a lot of room for
improvement.
</description>
  </item>
  <item>
    <title>[comp] Barcamp thing</title>
    <pubDate>Sat, 19 Apr 2008 10:28:00 </pubDate>
    <link>http://allan.svana.org/sjh/diary/2008/04/19#2008-04-19_01</link>
    <description>&lt;!-- 2008-04-19 10:28:24 --&gt;

So a bunch of people were keen to hold a 
&lt;a href=&quot;http://barcamp.org/&quot;&gt;Barcamp&lt;/a&gt; in 
&lt;a href=&quot;http://barcamp.org/BarCampCanberra1&quot;&gt;Canberra&lt;/a&gt;. Bob and I were
asked if we could ask &lt;a href=&quot;http://cs.anu.edu.au/&quot;&gt;DCS&lt;/a&gt; if the event
could be hosted here. So Bob and I are here today (with a broken collar bone I
am of course unable to do anything active, I had however volunteered to be
here today anyway if Bob had been unable to make it) to provide any venue
stuff and setup and venue care.

&lt;p&gt;

So it will be interesting to see how the talks and other stuff go all day,
there are a rather large number of people here so it is likely to work
well. Right now there is a talk about 
&lt;a href=&quot;http://en.wikipedia.org/wiki/Meraki&quot;&gt;Meraki&lt;/a&gt; on.</description>
  </item>
  <item>
    <title>[comp/hardware] Not meant to own one</title>
    <pubDate>Thu, 10 Apr 2008 15:51:00 </pubDate>
    <link>http://allan.svana.org/sjh/diary/2008/04/10#2008-04-10_01</link>
    <description>&lt;!-- 2008-04-10 15:51:27 --&gt;

just before &lt;a href=&quot;http://lca2008.linux.org.au/&quot;&gt;lca2008&lt;/a&gt; this year I saw
a fantastic 2 GB usb memory key in the computer shop on campus here at
ANU. Around 4mm thick and 1cm by 1.5cm square with a metallic pink top, made by
pqi. I bought one and took it with me to Melbourne. However I did not attach
it to anything (such as keys or phone) and lifting m wallet out of my pocket
one evening in Melbourne it also came out of my pocket and was lost forever.

&lt;p&gt;

On my return to Canberra I bought another one and all seemed fine. I tied it
onto my phone and was able to slip it inside the leather phone cover so it
stayed put and was out of the way. This was until last Wednesday morning when
I &lt;a href=&quot;http://svana.org/sjh/diary/2008/04/02#2008-04-02_01&quot;&gt;crashed and
fractured my collar bone&lt;/a&gt; my phone was in a back pocket of my cycle
jersey. Though the phone has come out of the crash unscratched and working as
well as it was previously. The usb key has a bent pink metal cover and the
back of the plastic bit where the chip contacts are is scratched a bit.

&lt;p&gt;

After seeing APC tests in which the USB keys still often worked after much
more severe torture than this one would expect it would still work. Alas I
plug the key into a usb slot and nothing happens, definitely dead, tried it in
multiple computers with a lot of wiggling around of the key. So small pink usb
key junkie that I am I wandered over to the store today and they no longer
have the 2GB key in pink, and they rang the importer who also no longer has
them, only blue or black which really is not as cool. Thus it appears I am
simply not meant to permanently own a cool small pink usb key.

&lt;p&gt;

I did however see a helmet in the Giro line up that is a rather cool pink,
maybe I should get that to replace my broken helmet.</description>
  </item>
  <item>
    <title>[comp/design] API design and error handling in code</title>
    <pubDate>Mon, 25 Feb 2008 21:12:00 </pubDate>
    <link>http://allan.svana.org/sjh/diary/2008/02/25#2008-02-25_01</link>
    <description>&lt;!-- 2008-02-25 21:12:21 --&gt;

I am catching up on some posts on planet Gnome and I came across 
&lt;a href=&quot;http://jeffreystedfast.blogspot.com/2008/02/worse-is-better-in-form-of-autosave.html&quot;&gt;this
post about error handling with g_malloc&lt;/a&gt; and a 
&lt;a href=&quot;http://blogs.gnome.org/otte/2008/02/04/error-handling/&quot;&gt;response&lt;/a&gt;
agreeing with it. I find this interesting for a few reasons.

&lt;p&gt;

First it is true that putting in full error handling in code when using fairly
standard libraries can take a lot of time, complexity and ugliness. However
there should be some way somewhere to find out if errors happened I suggest,
largely so you can deal with them if there is a situation they may be
likely. Also understanding that libraries can fail in calls and what this
means is important for coders, even if they do not handle them all. When
marking assignments at uni I am keen to see that students have thought about
error conditions and made the decision about what level of complexity to trade
off against what likleyhood certain errors have of occurring.

&lt;p&gt;

The above issue with assignments however does tend to be students who are
newer to programming than most free software hackers so there are
considerations in both directions there. As for the other reason the above
posts interest me, it is cool to see Cairo getting such props for great design
again. &lt;a href=&quot;http://cworth.org/blog/&quot;&gt;Carl&lt;/a&gt; and co have done a stellar
job with that library.

&lt;p&gt;

As I continue reading the planet I can see more 
&lt;a href=&quot;http://blogs.gnome.org/snark/2008/02/04/about-error-handling/&quot;&gt;entries&lt;/a&gt;
in the &lt;a href=&quot;http://log.ometer.com/2008-02.html#4.2&quot;&gt;thread&lt;/a&gt;.</description>
  </item>
  <item>
    <title>[comp/linux] X and KDE out of sync</title>
    <pubDate>Thu, 21 Feb 2008 17:59:00 </pubDate>
    <link>http://allan.svana.org/sjh/diary/2008/02/21#2008-02-21_01</link>
    <description>&lt;!-- 2008-02-21 17:59:09 --&gt;

So a new Dell Latitude D430 one of the academics at work has was showing some
problems with getting X to work as we wanted. It is now running Gutsy, which
seemed to not pick up on the intel video driver at first when I removed the
i810 driver. However the more annoying thing I found in this setup is that
when there is no xorg.conf kdm works fine, however kde reverts to some lower
resolution. Although I can change that with xrandr, if I try going into kde
display resolution settings they do not work if there is no xorg.conf.

&lt;p&gt;

In the last while the Xorg crew have been doing some great work to ensure X
will generally run better with no config file around, working things out as it
starts up and all that. However kde (at least the version in Kubuntu 7.10) has
not caught up to the idea of querying the X server or working with it to that
extent yet.

&lt;p&gt;

I hope the newer kde releases are heading this way, also I should check out
gnome and see if it handles this cleaner. One thing I should note though is
xrandr really is seriously cool. I found the 
&lt;a href=&quot;http://www.thinkwiki.org/wiki/Xorg_RandR_1.2&quot;&gt;thinkwiki xrandr&lt;/a&gt;
page to be one of the best for describing cool stuff it can do.</description>
  </item>
  <item>
    <title>[comp/software] A wireless scanning tool</title>
    <pubDate>Thu, 25 Oct 2007 19:26:00 </pubDate>
    <link>http://allan.svana.org/sjh/diary/2007/10/25#2007-10-25_01</link>
    <description>&lt;!-- 2007-10-25 19:26:58 --&gt;

I just wasted about 15 minutes trying to find online the name of the program I
have installed on my laptop that I regularly (though not for a few months now)
use for scanning for wireless networks.

&lt;p&gt;

Hopefully I can remember this post and look it up, the tool in question is
swscanner (a kde wireless scanner applications).</description>
  </item>
  <item>
    <title>[comp/software] No count-words-region or similar in emacs?</title>
    <pubDate>Fri, 05 Oct 2007 14:10:00 </pubDate>
    <link>http://allan.svana.org/sjh/diary/2007/10/05#2007-10-05_01</link>
    <description>&lt;!-- 2007-10-05 14:10:47 --&gt;

I have no idea how I never noticed this before, I was writing something a few
minutes ago and wished to know how many words were in a section of it. Plain
text in emacs. I tried Meta-X count-&amp;lt;tab&amp;gt; and a few variations and could
not find a command that would count the words in a region of text, or a buffer
or anywhere else. Strange I thought and decided to search online.

&lt;p&gt;

From search engine results I found that somehow emacs does not natively have
the few lines of lisp required to do this seemingly simple function anywhere
by default. So there are some reasons this may be the case, the first of which
is the definition of what constitutes a word may be in question, especially in
different modes. However I just want a basic text mode word count capability.

&lt;p&gt;

Many online suggestions seemed to launch a sub-shell and run wc on a buffer or
section of a buffer, this is obviously overkill. Fortunately one of the first
search results is to an elisp intro that has a section detailing a 
&lt;a href=&quot;http://www.delorie.com/gnu/docs/emacs-lisp-intro/emacs-lisp-intro_208.html&quot;&gt;function
defined to do count words region&lt;/a&gt;, which is exactly what I needed, so it is
now in my .emacs file.

&lt;p&gt;

The two things I find most surprising with this state of affairs are: 1. emacs
does not have the capability somewhere in the huge amount of elisp distributed
with it to do this natively and 2. Though I have been using emacs a lot for
more than 10 years I never before noticed this was lacking.</description>
  </item>
  <item>
    <title>[comp/hardware] Keyboard training</title>
    <pubDate>Tue, 18 Sep 2007 15:04:00 </pubDate>
    <link>http://allan.svana.org/sjh/diary/2007/09/18#2007-09-18_01</link>
    <description>&lt;!-- 2007-09-18 15:04:32 --&gt;

I have noticed my wrists getting sore when typing on my computer at work for
long periods form time to time. I decided I should put more of an effort into
trying out a Natural shape keyboard for a while. When 
&lt;a href=&quot;http://www.stillhq.com/&quot;&gt;Mikal&lt;/a&gt; was here for a month recently he
recommended the Microsoft Natural Keyboard 4000 model. This is a mostly black
keyboard with a usb cable to the computer (none of this silly wireless stuff)
and appears to be the most recommended keyboard on most RSI and similar topic
websites and blogs.

&lt;p&gt;

I finally convinced Bob to purchase three of these (one for me, one for the
head of department and another in case Mikal^Wanyone requests one). Of course
I am writing this diary entry on my laptop which sort of defeats the purpose,
however I will be making an effort to get used to the new keyboard. It is
quite a change as I had previously been using an old ps2 keyboard that I liked
the feel of. One of 5 or so I found a cache of at work and had snarfed up and
connected to my home computer, work computer and any other deskbound computer
I had to type much on.

&lt;p&gt;

My typing is a little slower on the new keyboard, only having used it for an
hour two now, however it feels nice and the shape is not strange or keys in
the wrong places it seems. I had wondered about using the non standard keys
and the strange zoom switch (though as a scroll wheel) however most of the
extra keys do not show up as having an event in X (using xev). Searching for
information on this I find a few 
&lt;a href=&quot;http://gentoo-wiki.com/HOWTO_Microsoft_Natural_Ergonomic_Keyboard_4000&quot;&gt;Microsoft
Natural Keyboard 4000 howtos&lt;/a&gt; or forum discussions, however the methods to
get the extra keys all seem to require a kernel patch, one which is not
integrated into the distribution kernels. Thus unless anyone can suggest some
other mechanism to get the events to user space I guess I will leave it be for
now, after all I need it to type, not to press weird buttons on.

&lt;p&gt;

I also have to train my fingers to hit q rather than tab in mutt to get out of
an email all the time.</description>
  </item>
  </channel>
</rss>
