Archive for July, 2008

Pee in this cup and then I’m going to spit it

Wednesday, July 30th, 2008

Disclaimer: Before you get all excited/upset, this post has nothing to do with any girls/cups.

I’ve just got back from St Pancras where I was attending a Spie Matthew Hall induction to renew my security clearance. It’s just like getting inducted into the Hollywood Walk of Fame, except instead of a star, you get breathalyzed and drug tested (I know very Hollywood).

Anyway, getting up at a stupid hour to travel to London just to have some bloke watch me pee in a cup was well worth it. Why? Because as I have blogged previously, these things tend to be unintentionally funny, for example, the process of testing the urine is called “spitting” and so they say to you “You pee in this cup and then I’m going to spit it.” (OK buddy, I’m not judging you, what you get up to in your spare time is up to you!). I also got to look at some pictures that show what happens when you don’t wear the correct PPE, most of these pictures were stupid shots of numpties with dermatitis/burns/cuts, but it was the one which nobody could quite make out that was brilliant. “Guys, that is a picture of a man who didn’t wear gloves when working and the white bit here is the bone of his finger, the fat pink bit is where his finger flesh has been rolled up and this bulge here (points to metallic object stuck in the bottom of rolled up finger flesh) is his wedding ring, which got caught on some machinery and caused the removal of afore mentioned flesh from bone. Nice.

My absolute favorite bit though, was the warning about hand/arm vibration, apparently, when men are working away from home they quite often become victim to the effects of hand/arm vibration. I was waiting for the announcement that loss of sight was one of the symptoms, when someone asked what caused hand/arm vibration. The answer? “It’s caused by to much gripping of your equipment.”.
Priceless.

Green development

Saturday, July 19th, 2008

I have just read a great article on code reuse. I always thought that the term DRY, as in Don’t Repeat Yourself, was missing something – that it didn’t quite capture all of the nasty habits that some developers xzibit. Well, the afore mentioned article has a much better term: Reduce, Reuse, Recycle. The refuse recycling metaphor is a perfect fit, I like it a lot – it even allows for the fact that sometimes we don’t recycle stuff like bottle lids, because it is not efficient to.

So I guess this makes what I would consider “good code”, to be part of something that I am going to call Green Development. Lightweight, low on resources, re-useable and recyclable. Author’s note: Does this make Microsoft global warming?

Now, if only there were some way to tag developers “wheelie bins” to see how much “non-recyclable” code they were producing and sending to the code base “land fill”. They’re just creating a problem for future generations you know.

How to: set up web sharing on your Mac

Wednesday, July 16th, 2008

Once you have upgraded to Leopard, any sites you have running locally won’t work, the problem is essentially that the config files have moved from /private/etc/httpd to /private/etc/apache2, BUT CARRY ON READING. You can’t just plonk your old config file into the new directory.

Here is what you need to do to set up the apache web server to serve your local site (and handle server side includes). You may need admin/root privileges for some/all of this, I can’t really remember and my notes are quite frankly illegible.
In the “/private/etc/apache2/other” directory create a file called “mywebsite.conf” and add the following text to it:

<Directory /Users/*/Sites>
AllowOverride FileInfo AuthConfig Limit
Options Includes
DirectoryIndex index.html index.cgi
<Limit GET POST OPTIONS PROPFIND>
Order allow,deny
Allow from all
</Limit>
<LimitExcept GET POST OPTIONS PROPFIND>
Order deny,allow
Deny from all
</LimitExcept>
</Directory>

AddType text/html .shtml
AddHandler server-parsed .shtml

Then in the ”/private/etc/apache2/users” directory create a file called “yourusername.conf” and add the following text to it (in the following example jojo is my username which you will need to replace):

<Directory "/Users/jojo/Sites/">
Options Indexes MultiViews
AllowOverride None
Order allow,deny
Allow from all
</Directory>

You will need to repeat this last step for each user that you would like to be able to host a site. When you have done this, restart websharing (under System Preferences -> Sharing) and then place your website in your “Sites” directory. You should now be able to browse to them in Safari (or whatever browser you use).

Political Apathy (2)

Saturday, July 5th, 2008

Back in March, I blogged about the fact that my MP, Dave Lepper, whom I voted for, had chosen to step down at the next election and about the process of determining who to vote for instead. Part of this process was the realisation that making my decision based on a national viewpoint was pointless, since only Labour and the Conservatives have a realistic chance of being elected – one party will tell you what they are going to do and ram it through the houses whether the electorate agrees or not, the other party currently has a policy of having no policies – but can’t be trusted to tell the truth about them once they exist. Still with me? So according to Wikipedia – and if it’s in Wikipedia then it must be true – there are only three confirmed candidates, for the constituency of Brighton Pavilion, at the next UK general election:

The Conservative candidate for Brighton Pavilion is Dr David Bull and since the last time I checked up on him he has achieved, well… er… nothing, or at least nothing that he deems worthy of adding to his website (nothing in the news section since November 2007) or blog (nothing here since October 2007).

The Labour candidate is Nancy Platts - I finally found her website! Unfortunately, she to seems to have not been up to anything worthy of mentioning either (last news dated April), but this is a moot point really, since I have already decided not to vote for Labour. Why? Human-animal-hybrids, the European Constitution/treaty, 28 days (nothing to do with the film – doofus!), 42 days and the fact that the Labour whips look unlikely to ever allow Labour MPs a free vote again.

The Liberal Democrat candidate has not been confirmed yet, I didn’t think this could be true, so I checked their website and it would seem to be so. Is this a step beyond Cameron’s no policies policy, a no candidate policy?

So the final candidate is Caroline Lucas, the current MEP for the South East and a member of the Green Party. Actually, she is the reason for this post, since a leaflet promoting her campaign was deposited through my door. It contained lots of information about the different issues that she is focusing on, some were national, some were local, all I agreed with. A quick check of her website and blog showed that she last did something worth telling people about… yesterday. At last, someone who updates their blog!!! Now my major sticking point with the Greens is what they would do with Britain’s armed forces (although I agree with their stance on the renewal of Britain’s nuclear deterrent). More accurately, my fear is what they wouldn’t do. Regardless of why we are in Iraq/Afghanistan (and whether you agree), there can be no argument that justifies a cut and run solution (IMO). All of this has to be weighed up against the fact that, although Labour recently signed the cluster bomb treaty, they are in favour of a replacement for Trident (is it wrong that I always think of toothpaste instead of a nuclear weapon?) and recently introduced some nice new thermobaric weapons that suck out the air from the victim and then crushes their body. Nice!

But here’s the kicker – and it’s something I hadn’t really considered before. As strong as my feelings on “military issues” are, they are ten orders of magnitude less in strength than my concerns over animal rights/welfare. So any ground Caroline Lucas loses to the other candidates is more than compensated for by her love of creatures. None of the “major” parties can claim this accolade, the number of animal experiments performed has increased under Labour, David Cameron would likely make his first speech as PM a top a horse and with a pack of hounds around him (the cabinet?) and there is no Lib Dem candidate.

So for the moment at least Miss Lucas, you have my vote!