Chris Worfolk's Blog


Alcohol

December 6th, 2011 | Thoughts

Alcohol is an interesting creature. As Gijsbert points out, it makes us feel really ill every Saturday morning and yet we all go out and drink it again next Friday night. That is in large part due to how addictive alcohol is, and leads it to be classified as a more dangerous drug than cannabis, LSD, ecstasy and many others.

Some groups are so afraid that their members will go off the rails if they drink the Devil’s Nectar that they are banned completely. Some groups are even so intolerant that they refuse to enter buildings which serve alcohol, even if they aren’t participating themselves.

A few months ago, I started to wonder if my life would actually be better without alcohol. I don’t really get hangovers because I always take a lot of time to sober up before going to bed, but that none the less brings its own problems with sleep deprivation on school nights.

I hadn’t wondered enough to actually give it a go, but as a result of recent events I ended up giving up alcohol as a side effect of some health issues. I also have up caffeine and have made a few other small changes to my diet and lifestyle as well.

However, having been trying all this for a few months now, it turns out that it isn’t any better.

Actually, your life is much better with alcohol. Alcohol is something which can bring real, measurable benefit to our lives. Of course, if you abuse it there are consequences, much like chocolate, credit cards, gambling, vitamins and basically everything in life ever. But enjoyed responsibly, drinking alcohol is really a pleasurable experience.

So learn from my experience. Alcohol is great and there is little to be gained from this clean living nonsense. As with everything else in life, the best path is responsible usage.

The trouble with war

December 5th, 2011 | Religion & Politics, Thoughts

Following on from yesterday’s post about Remembrance Day and my recent thoughts about venerating the military, I thought I would expand a bit on the subject based on some of the conversations I’ve had.

As I said in my previous post, it is interesting that we give so much respect to those who gave their live in war, but so little respect to those who gave their life to keep our supermarkets stocked with fish, or our power plants stocked with coal – even though fishing and mining are high fatality industries. You’re right, I wouldn’t want to go to war and I’m glad someone else is willing to do it, but I would equally hate working down a mine!

The standard response to such a question is that people choose to work as fishermen and miners, but then people choose to sign up to the military as well. We don’t operate any kind of conscription in the UK, beyond that of economic conscription that I discussed in my previous post, so every solider in the army today signed up voluntarily, and is handsomely rewarded for it. Interestingly, I’ve never heard anyone say “no, don’t bother paying me, I’m joining because it’s the right thing to do, not for the money.”

It becomes a different matter when we were talking about actual conscription during the world wars, when people were forced to go to war. But the sad reality of it is, if you were conscripted into the army, that wasn’t really a noble sacrifice was it, because you didn’t have a choice. It’s a pretty horrible truth, but a truth none the less.

Actually, the truth is much more horrible when you think about conscription. It wasn’t that these people chose to die for their country, it’s that we, as a society, murdered them. We executed them; sent them to their death. They didn’t decide to go and die, we made them go and die. If anything, Remembrance Day should share a similar tone to Holocaust Memorial Day.

What I found most interesting about the attitudes of people surrounding Remembrance Day, was how closely it fits in with what I said in my previous post about venerating the military. The upper classes sending the lower classes to die in their wars.

This was most apparently in specifically two of my friends, Kieran who retweeted extensively on the subject and Rebecca whose idea it was to go out to the war memorial on November 11th. Now, neither of these are people are either royalty nor right wing nutters. I consider them both good friends, but they are both from well off backgrounds and if I was to pick the two of my friends most likely to vote Conservative, I would pick those two (except for Norm, who I suspect mostly votes Conservative because even though he wants to vote Labour now, could never admit he was wrong about a political party 😉 ).

Indeed, when I had a discussion with Rebecca about it, and pointed out that if you sentence someone to death using conscription (it’s a to lot easier because you don’t have to bother with that whole trial by their peers nonsense), then it’s not really a noble sacrifice because they didn’t choose it, she seemed to get very flustered and told me to “just stop it now.”

That upset me somewhat because I felt like she was trying to claim the moral high ground, even though she was speaking on the pro-war side and I was suggesting it isn’t cool to sent working class people to their death just so our dirty work can get done. But this isn’t about my sensitive emotional centre carefully wrapped in an excessive amount of hair.

The response struck me as that of a religious believer when you’ve just found a massive problem with their worldview. They don’t know what to do. “You can’t say that – that’s not on the script! Don’t you understand how this works. We have to maintain the veneer or all the poor people will realise that our wars aren’t worth them dying for.”

Though as I discussed in my previous post, just because I feel that is the truth, doesn’t provide an answer as to what to do about it. Maybe we do need to keep even our own minds ignorant of the beast below.

Remembrance Day

December 4th, 2011 | Religion & Politics, Thoughts

I’ve suddenly found myself becoming a prolific anti-war blogger and I didn’t really mean for this to happen. But, I have a severe tendency to play Devil’s Advocate and with it being Remembrance Day as I write this, I suddenly seem to have become left wing.

So, I was just wondering. Remembrance Day. My question is, what exactly are we remembering?

I think the answer is, we’re remembering those who gave their lives in war, but I think a more accurate way to put my question might be, what is the purpose of remembering?

It isn’t to honour the dead, really. No remembrance ever is. Because they’re dead, so it doesn’t benefit them. Funerals are a great example of this, we don’t hold a funeral for those who have sadly passed away, we hold it for the people left behind to help them move on with their lives. A funeral is to give ourselves closure and help us to deal with the loss.

So perhaps the answer is to give ourselves some closure about the whole incident.

However, I’m not sure that is the case because we do it every year. I think, actually, Remembrance Day has a far more important purpose. We remember to remind ourselves that this should never happen again. Although clearly, we didn’t remember hard enough the first time, so more accurately, this should never happen a third time.

That I think is a worthwhile and noble purpose, one which the tradition of Remembrance Day is well worth dedicated time and effort to. It makes the world a better place.

Unfortunately, when I look at this, I wonder how much good it actually does. We don’t even have pictures of some of them.

Armistice Day

December 3rd, 2011 | Events, Religion & Politics, Thoughts

I’ve never really done much for Armistice Day since entering the world of work. However, given the opportunity to get out of work for five minutes, we headed down to the war memorial in Headingley for the short ceremony. The saddest part of the whole tragedy is that getting us out of work for five minutes was no more an unjustified reason for so many people to die, than war itself.

It was striking how religious the ceremony was. But then of course, non-religious people never really did anything for their country, so it only seems fair to forget them.

Farewell, old friend

December 3rd, 2011 | Photos

With Movember over, it was time to say goodbye to the would-be soup strainer. I thought I would take one last picture after experiencing record growth this year.

Testing multiple conditions in if statements

December 2nd, 2011 | Programming

This is one of the geeks among you. I’m currently working on a new open source project which uses a series of database models derived from a base model which includes some standard methods and I was having one problem in particular to do with updating data values in an object.

if (
    !$object->setName($d["name"]) ||
    !$object->setSlug($d["slug"]) ||
    !$object->setDateByArray($d["date"]) ||
    !$object->setContent($d["content"])
) {
    $this->setMessage($object->getMessage());
    return false;
}

As you can see, this does an if statement and then runs all the updates – the idea being that if any of them come back as false, it can set the error message and return false to the controller.

This worked as expected but with one problem – as soon as one of them appears false, PHP stops looking at the other conditions in the if statement. This is a problem because it means the user only gets one piece of feedback at a time. Whereas, it would be much better if we could give them all the fields that were wrong at once.

However, this doesn’t seem possible in the above implementation. Even if I switched it round to check that everything is true, and everything must be true, that suffers from the same problem that once something isn’t, PHP will stop checking the conditions.

I considered whether I could implement it using exceptions – putting all the checks inside a try block and then have the update operations throw an exception if they were invalid. I could then catch this exception and add the error to the list of errors. However, this suffers from the same problem – as soon as the first invalid value triggers an exception, the rest of the try block is ignored.

The solution I have eventually come to is this:

$writes = array (
    $object->setName($d["name"]),
    $object->setSlug($d["slug"]),
    $object->setDateByArray($d["date"]),
    $object->setContent($d["content"])
);

if (in_array(false, $writes)) {
    $this->setMessage($object->getMessage());
    return false;
}

All the operations are run, and their values are fed into an array. That way all the checks get run no matter what value they return. I then search the array for any values set to false and if any of them were, I know there has been a error and can flag it up with the user.

Mark Edon tells it like it is

December 1st, 2011 | Events, Humanism

Mark Edon recently gave a talk to West Yorkshire Humanists about “talking to creationists.” I’ve already seen Mark talk three times before but never the less it was interesting as ever, with plenty of fresh material.

Charity quiz

November 30th, 2011 | Humanism

As part of Non-Prophet Week, Atheist Society recently held a charity quiz to raise money for the very much worthwhile cause, Medicines Sans Frontiers. It was an enjoyable night and I came away with a pair of tickets to the West Yorkshire Playhouse so a good night all round.

Intelligence of Genetics

November 29th, 2011 | Events, Science

Recently, I visited Headingley Cafe Scientifique for the first time for a talk entitled “Intelligence of Genetics.”

I had never attended the Headingley Cafe before but it seems very well attended. It was standing room only by the time the event kicked off and there were plenty of seating available – so they probably had 50+ people there.

The venue was the New Headingley Club which looked very fancy on the website but turned out to be significantly less fancy in the flesh. I got plenty of change from my round at the bar though, so will approve of that!

The event itself was somewhat disappointing. I came away from the talk not really feeling that I had learnt anything – other than that we have a one in three chance of getting Alzheimer’s disease and this massively varies depending on our genetics. There were lots of stats, but a lot of these weren’t really in much context – am I supposed to be impressed by that number? I don’t know what an average sample size for your area of science.

Still, it was good to finally make it down to the Headingley Cafe.

SocietasPro v0.3

November 28th, 2011 | Foundation

Just six days after we released version 0.2 of SocietasPro, we’re pleased to announce that we’re announcing the third iteration, which is now available to download on Github.

Here is what we’ve changed in this version:

  • Events can now be displayed on a calendar
  • Added style to the system pages
  • Improved visual editor
  • High contrast admin version added
  • Custom columns are now exported in the CSV
  • You can now change a member’s password
  • You can now reset your own password
  • Version checker added to admin panel
  • Added support for custom selects
  • Members import now supports custom columns
  • HTML Purifier now cleans dangerous HTML
  • Locations are now shown on the events page
  • Mac line endings are now handled on imports
  • Audit trail now works with deleted members
  • Deleting members now cleans up their custom datas as well
  • Duplicate members are now filtered out on imports
  • You now get feedback if your login fails
  • Events are now sorted by date
  • Added extra stats to the control panel

Where will the project be going next? We’re going to put some work into the front end and then it should finally be ready to demo! Stay tuned to our updates on Twitter for further updates.