For just over two years we have always bought McCain’s oven chips. They are low in fat and as far as we were concerned very nice.
This all changed about 3 weeks ago when we cooked some chips and they came out smelling like pig manure, I kid you not, I have worked in a cattle market and I know what pigs smell like and this was exactly the whiff I was getting. The first thing we thought was that the freezer was playing up and that somehow the chips had defrosted and gone off or some such nonsense. We checked the rest of the stuff in the freezer and everything was fine, I know this because we always keep Vodka in the freezer and it was as syrupy as usual which indicated to me that the freezer was very cold.
Anyway, we bought another bag (previous bag from Tesco’s) from Asda’s several days later under the assumption that we had just got a dodgy bag, perhaps it had lay on the floor somewhere too long or defrosted and been refrozen once too often. Same bloody problem. You can imagine our consternation, we had been using this product religiously for two years. We then decided to clean the oven completely even thought it was fine.
Most people would just try and change brands at this point but we wanted to know exactly what was causing that pig shit smell so we went off to Iceland (the frozen food mecca of the UK) and got a bag out of their freezer. We came straight home and bunged a batch in the Oven. You’ll never guess what. PIG SHIT all over again. So there we have it.
McCains Oven Chips stink of pig manure, or at least the ones we have used recently do. We wrote a letter to them detailing our discovery a few days ago. We are awaiting a reply…………….. to be continued……………………..
A Mathematician’s Apology
I started reading
A Mathematician’s Apology
Author: G. H. Hardy (Foreward by C. P. Snow)
ISBN: 052142706
this one as soon as it arrived through the post. It is quite a small book and even smaller when you open the cover, at least in this edition it is since they have left over an inch of margin around the text.
I really enjoyed it. I have to say that I enjoyed the forward by Mr Snow as much as the content by Hardy. I think this was because he was writing about the Author of whom I would like to know more whereas Hardy was writing about his subject rather than himself. You can get a feel for Hardy’s character from the text, particularly near the end but I thought that it dealt mainly about his take on mathematics.
The book is definitely some sort of apology, I thinks its open for debate whether he needed to apologize for anything but he obviously felt the need to justify himself in some way.
Personally I don’t think Hardy had any more need to justify himself than Da Vinci, Matisse or Michelangelo, Hardy was an artist its just that his art was mathematics which like some forms of art is not appreciated by the masses. However, this does not mean that what he created wasn’t beautiful or worthwhile. In fact years later it was found that a lot of what Hardy had created was of immense use.
Sans Serif or not to Sans Serif
I am pretty damned sure that fonts are one of the most used yet least appreciated aspects of computing I have come across.
It would be fine to interject here and say NO, surely its “blah de blah”. I say no…… People in general don’t give a damn about how machines work / talk / do their stuff, however they are concerned with how stuff looks.
For instance, look at the fashion industry. Clothes are expensive but the workmanship is generally crap but who cares, its a “scurgly! made by whatsisname”, and it looks good.
Its the same with computers, look at the Mac, previously thought the underdog, now its almost a fashion statement to own one.
Anyway, back to fonts. I am not really that bothered about what fonts are on my machine as long as I can read the text without squinting to much, but just the other day it was noted that I was using “Sans Serif” fonts and I was lacking in “Serif” fonts.
Well… I just shit my pants, what the hell was I missing. Apparently I wasn’t missing anything. Sans Serif add an extra bit to your fonts and I was missing the option of not missing them on everything I read.
To cut a long story short I needed to get some Microsoft fonts installed on my Debian box and this is the process.
First thing I needed was the Microsoft truetype fonts. ON debian these are called
msttcorefonts
and can be installed via “aptitude” or apt whichever you prefer. I fetched these and this installed a whole pile of stuff in
/usr/share/fonts/truetype/
Next thing I needed to do is create a “fonts.scale” file as ROOT
]$ cd /usr/share/fonts/truetype ; ttmkfdir;
sorted. The directory should now have the correct file. The next thing to do is restart either, the font server, or X11. I just logged in and out and that was it. New fancy fonts that are almost identical to the ones I had previously or at least in first inspection they are.
More bloody Books
I am never going to finish “From Here to Infinity”. I was about half way through Mr Stewarts book when I got an urge to browse Amazon, big mistake.
I spotted the following books all of which I ordered
A concise History of Mathematics.
Author: Dirk J. Struik
A Mathematician’s Apology
Author: G. H. Hardy (Forward by C. P. Snow)
The Man Who Loved Only Numbers
Author: Paul Hoffman
A History Of Mathematics (An Introduction)
Author: Victor J. Katz
Remapping Keys in Linux
I never really had to do this before but I have been using enlightenment for a few months now and use the ALT-(q,w,e,a,s,d,z,x,c) to switch between 9 separate desktops. I find this quite quick but I tried xemacs the other day and I needed ALT-x but I kept switching between desktops. So I decided to use a different key.
Since the Windows key ie the one to the left of the left ALT button is never used I decided to use it to switch desktops instead (I know I will need to use the ALT key in other applications so I might as well do it now before its ingrained into me).
Anyway the procedure goes as follows.
1. Detect the keycode of the key you want changed.
Open a terminal and type
]$ xev
Lots of text should whizz past on the terminal and then stop. Touch the key you want the keycode of and more text should whizz past…. something like
KeyRelease event, serial 25, synthetic NO, window 0xe00001,
root 0x38, subw 0x0, time 24436498, (-298,301), root:(458,320),
state 0x0, keycode 115 (keysym 0x0, NoSymbol), same_screen YES,
XLookupString gives 0 bytes: “”
We can see that the keycode is 115.
2. Create a user modmap file to be loaded on starting X
]$ cd ~; touch .Xmodmap
and put the following text in it
keycode 115 = Hyper_L
add mod3 = Hyper_L
then edit your ~/.xsession file: Add
xmodmap .Xmodmap
before the “exec enlightenment” line and that should be you sorted. If for some reason you did not have a .xsession file then you will need to add the line to start whatever window manager you are using ie in my case my .xsession looks like
xmodmap .Xmodmap &
exec enlightenment
yours might well be
xmodmap .Xmodmap &
exec sawfish
You should now be able to use the MOD3 modifying key in e16keyedit as a modifier key after restarting xwindows.
Vim Folding and Perl
I decided to get function folding working today and discovered that it is relatively simple to set up unless Vim isn’t detecting your filetype correctly which it wasn’t in my case.
To get basic Folding for Perl working add
let perl_fold=1
let perl_fold_blocks = 1
to your .vimrc file and then open a .pl file and you should see lots of blue lines running across the screen. These are where the folds have been made and you should see a line count similar to
+– 24 lines: sub summit_sub {——————————–
Put the cursor on this line and press “za”. This will magically unfold the line. Pressing “za” again refolds the line.
I don’t like the perl folding defaults so I dedcided to run with the manual ones but my filetype was alway wrong when working on a modules. it was inserting c-style foldmarker ie “/*}}}*/” instead of the perl foldmarker #}}}
This was easlily remedied as follows
au BufRead,BufNewFile *.pm set filetype=perl || set commentstring=#%s
I now have folding working. Now all I need to do is decide what type of folding I prefer.
PDF Tool
I was asked the other day if there was an easy way in Perl to join two pdf files together. The answer is that there is an easy way. It might not suit everyone but I managed to find a tool called the pdf toolkit (pdftk). Its another of those handy tools that gets filed in the magic toolbox for later retrieval.
Vim regex
I was wanting to start some comments in a large Perl module the other day and not really had to use Vim’s regexp to any great degree because I know Perl I decided to see if it could be done.
I decided to add a little bit of pod above every funcion. The following was the result Remember In vim the ^M is a control character for carriage return and can be achieved by holding down the control key and pressing carriage return.
The following regex
:%s/^sub\(.*\) {\(.*$\)/=head \1\(\)^M^MDescrition:^M^M=cut^Msub \1{\2/
changes
sub summit_sub {
stuff;
}
to
=head summit_sub()
Descrition:
=cut
sub summit_sub{
stuff;
}
The following regex
:%s/^sub\(.*\)\n{\(.*$\)/=head \1\(\)^M^MDescrition:^M^M=cut^Msub \1{\2/
changes
sub summit_sub
{
stuff;
}
to
=head summit_sub ()
Descrition:
=cut
sub summit_sub {
stuff;
}
New RSS Job Feed
I just found another RSS Job feed and have incorporated it into my own RSS Job aggregator.
I have now got 15 separate feeds in the database.
Google Results for Harry
I have decided to monitor where I come for the search term
harry
on google. Why? Why not. I am up against some very famous Harry’s so I thought it might be a bit of a laugh to take them on and see how far up the ladder I can get. Current ranking. Why the hell could they not have called Harry Potter something like Derek Trotter 😉
319 on google for “harry” out of 23,900,000