[ Content | Sidebar ]

Archives for 2010

A sad day

February 20th, 2010

It is with sadness that I have to report the death of my mini dragon tree plant.

Mini dragon tree plant was born about two and half years ago and died sometime in the last few weeks. It graced the top of my bookshelf, and before that my desk. Unfortunately in it’s new location in my flat it doesn’t seem to have got enough light so it’s leaves turned yellow and fell off. Let’s all take a moment to remember the too brief life of mini dragon tree plant.

While this death was tragic, important lessons have been learned so hopefully it’s successor – mini dragon tree plant II – will fare better.

Filed in musings - Comments closed

Valentine’s day

February 14th, 2010

Today is Valentine’s day. Valentine’s day is all about love, and the internationally recognised symbol of love is the stylised heart. I love sed. This is probably why I spent this evening alone writing a filter to format text as ASCII hearts:

nick@pickle:~$ sed --posix -n -f hearts.sed < poem
     Shall        I comp
   are thee t   o a summer
 's day? Thou  art more love
ly and more temperate. Rough 
winds do shake the darling bu
ds of May, And summer's lease
  hath all too short a date.
    Sometime too hot the e
     ye of heaven shines
       , And often is 
         his gold co
           mplexio
             n d
              i
     mmed;        And ev
   ery fair f   rom fair s
 ometime decli nes, By chanc
e, or nature's changing cours
e untrimmed. But thy eternal 
summer shall not fade Nor los
 e possession of that fair t
   hou ow'st; Nor shall de
     ath brag thou wand'
       rest in his sha
         de, When in
            eterna
             l l
              i
     nes to        time 
   thou grow'   st, So lon
 g as men can  breathe or ey
es can see, So long lives thi
s, and this gives life to the
e............................
 ...........................
   .......................
     ...................
       ...............
         ...........
           .......
             ...
              .

You can download the script here: hearts.sed.

As far as I can tell, girls are mad keen on standards compliance. So I went out of my way to make this script POSIX compliant.

I’ve reproduced this labour of love below. As you can see, it demonstrates the elegance and practicality of sed as general purpose programming language:

: gather
/^[[:space:]]*$/d
s/[[:space:]]\{1,\}/ /g
/.\{251\}/{
  s/^\(.\{6\}\)\(.\{6\}\)/     \1       \2\n1/;P
  s/^.*\n1\(.\{10\}\)\(.\{10\}\)/   \1   \2\n2/;P
  s/^.*\n2\(.\{13\}\)\(.\{13\}\)/ \1 \2\n3/;P
  s/^.*\n3\(.\{29\}\)/\1\n4/;P
  s/^.*\n4\(.\{29\}\)/\1\n5/;P
  s/^.*\n5\(.\{29\}\)/\1\n6/;P
  s/^.*\n6\(.\{27\}\)/ \1\n7/;P
  s/^.*\n7\(.\{23\}\)/   \1\n8/;P
  s/^.*\n8\(.\{19\}\)/     \1\n9/;P
  s/^.*\n9\(.\{15\}\)/       \1\nA/;P
  s/^.*\nA\(.\{11\}\)/         \1\nB/;P
  s/^.*\nB\(.\{7\}\)/           \1\nC/;P
  s/^.*\nC\(.\{3\}\)/             \1\nD/;P
  s/^.*\nD\(.\)/              \1\n/;P
  $ { d; q }
  D
}
$ { s/$/\./; b gather }
N
s/\n\n*/ /g
b gather

Breakfast biscuits give you vim

February 13th, 2010

I was wandering around Reading museum this afternoon. Not only does it have a surprisingly large and diverse collection – including a full replica of the Bayeux tapestry – it has a rather confusing and maze-like layout. Walk down what looks like a service corridor or fire exit and you discover a whole new collection of galleries. Anyway, it was one of these jaunts down a nondescript passage that led to my discovery near closing time of the BISCUIT WING! This is an exhibition on the once great biscuit industry of Reading. Among the items on display was a 99 year old biscuit!

At the end of the biscuit exhibit I noticed this rather alarming marketing poster for vim:

Apparently if you eat biscuits for breakfast you’ll be a hardened vim user by lunch. This also seems to imply that using vim “makes you fit and keeps you slim” which is clearly not borne out by reality. Better contact the advertising standards authority…

Filed in musings - Comments closed

Advances in mash technology

February 13th, 2010

Here’s an experimental new method for overcoming some weaknesses in my current mashed potato process:

While the potatoes are bubbling and the sausages are sizzling take a small saucepan and make a small fire under it. Add a large quantity of butter, small amount of milk, some salt, some pepper, and a tiny amount of English mustard. If you’re feeling risqué and want to live life on the edge, add a little bit of nutmeg. Now, stir this mixture until it goopifies but don’t let it get too hot! While you are mashing, slowly add the butter sauce and the mash will be made!

Advantages to this technique: it makes the mashing stage significantly faster; it makes effective use of the idle time when waiting for things to fry/boil; it eliminates the cooling effect of adding cold milk and butter from the fridge; it gives a more uniform mash.

Disadvantages: it creates extra washing up; it can go a bit weird if it gets too hot; it is difficult to judge the right quantity of ingredients to add.

I’ve tried this technique twice now and have been quite pleased with the result. Experimentation continues.

Filed in musings - Comments closed

Storefjell

February 1st, 2010

You might have noticed the lack of posts in the last week or so. This is because I was 1km up a mountain in Norway. Possibly not the best time of year to be visiting, as it was incredibly cold with temperatures as low as -20°C during the day. The reason I was there was a corporate conference/holiday thing. I quite enjoyed it, especially as it was free!

To get there we went on a three hour coach journey through the frozen countryside which can be loosely described as “epic”: frozen lakes, huge forests, wild deer, tog, … This was perhaps the best bit of the whole trip.

Food was good: I consumed moose, ostrich, reindeer, and a variety of other more common animals. There was also copious quantities of free alcohol, which our Norwegian colleagues took full advantage of.

I made a brief attempt at participating in some outdoor activities: these being tobogganing which I summarise as “dangerous”, and cross-country skiing which is best described as “daft” and more thoroughly as long periods of tedious and tiring uphill skiing followed by terrifying uncontrollable sliding downhill. Not something I’ll be trying again.

The light that far north is strange. The sun takes ages to get up and go to bed, and even once it’s up it sits barely above the horizon. It was rather weird and atmospheric and makes for some excellent sunrises and sunsets which I attempted to capture here:

I took some photos. They’re all variants on the same theme: snow and mountains. They are also a bit hit and miss due to me not quite mastering the white-balance thingy. Also, I have become rather attached to the 16:9 aspect ratio. Anyway:

An end to the washing machine saga?

January 23rd, 2010

I have a new washing machine! Hopefully this one will be less problematic than the last few.

A brief inspection reveals it comes from the “fancy pants” school of washing machine design.

On top we see the rather complicated instruction manual which complements the confusing array of dials and buttons on the front panel. Luckily most of the buttons seem to serve no purpose other than to make the display flash a red “ERR” message angrily. As a professional software engineer I’m slightly alarmed by the sophistication of this device – surely the electronics are even more likely to be buggy than the mechanics?

I’m giving it a test run on my running stuff which was rather in need of a wash. Let’s hope it goes OK…

Filed in musings - Comments closed

MECHNICAL PIG update

January 23rd, 2010

The MECHANICAL PIG has been switched back on! Watch it do its piggy thing on Twitter! Interact with it on PIG CONSOLE!

What will the MECHANICAL PIG do? Only you can decide!

Filed in musings - Comments closed

Disaster narrowly averted

January 14th, 2010

Earlier this evening I was making mashed potato as I am sometimes known to do. After boiling the potato until ripe and tender I prepared the items for the next stage: milk, salt, pepper, and the all important masher. What else? Butter, of course! The most vital ingredient. No butter in the butter hopper. Hmm. More butter must be fetched from the fridge and placed in the hopper! THERE IS NO BUTTER IN THE FRIDGE!!! Woe! Misery! I am struck with a feeling of utter desolation.

After picking myself up off the floor and calming my trembling nerves with a cool glass of milk I consider carefully what must be done. Evidently the process cannot proceed in the established “butter cloud” fashion. I could spend the night in hunger repenting that I forgot to stock up on butter at Tesco. Instead I decide to make an alarming new addition to my mashed potato recipe – after all, it couldn’t get much worse. The new ingredient: MUSTARD! I added two teaspoons of English mustard and proceeded as normal.

Results were unexpectedly good! The mustard adds a nice mustardy flavour which goes well with sausages and helps to disguise the lack of butter flavour. I may have to consider adding a little mustard more regularly. The yellow mustard colour also gives the potato a rather appealing garish yellow hue which certainly brightened up my dinner.

So, all things considered, it could have ended much worse. Still, as renowned pizza oven once remarked, “a little bit of butter makes it good!”.

Why do washing machines hate me?

January 11th, 2010

I’ve just suffered my fourth washing machine malfunction in 12 months. Why does this keep happening to me!!! :(

Here is a brief recap:

  • The first washing machine had some sort of problem where it would chew up its insides and spit them out over the clothes. This was replaced but then…
  • The new washing machine refused to spin after a few months. The cause of this problem was the legendary Carbon Brushes.
  • Some time passed. I moved house. But then I was struck with a terrible internal leakage problem. This turned out to be a lime scale accumulation on the inlet valve.

I thought I was safe. The washing machine was working. My clothes were clean and fresh. But then when I least expected it the washing machine just stopped mid cycle. After some analysis I found that it had not only stopped but tripped the circuit breaker. Furthermore, the machine now trips the circuit breaker the instant it’s turned on. Hmm. The engineer is coming on Friday but even if he fixes it I doubt it will last long until the next disaster.

With what sort of frequency do other people experience washing machine malfunctions??

UPDATE: Apparently the washing machine was completely borked: carbon brushes, bearings, and some other component were completely worn out. New washing machine being delivered this morning… wonder how long it will last.

Frozen canal

January 8th, 2010

There are some who would claim that Slough is a frozen wasteland all year round. This is obviously rubbish, but it is very much frozen now as you can see from these photos I took when I went for a walk yesterday lunchtime:

Filed in photos - Comments closed