Chris Worfolk's Blog


From my cold dead hands

July 20th, 2012 | Religion & Politics

Another month goes by, and, as usual, another senseless gun-related massacre occurs in the United States. Around 50 people in total were shot, 12 of them are already dead.

I was going to say “with another 12 people dead” but this would simply be nieve. Based on the statistical average, somewhere in the region of 33 people were gunned down across the United States today anyway. And yesterday. And there will be another 33 victims tomorrow.

Surely it is time to adopt a more progressive attitude towards guns? To be clear, by progressive attitude, I mean get rid of them all.

The sadistic irony of this video increases with every victim.

Loserville

July 20th, 2012 | Distractions, Life

Last month, we went to see the new musical Loserville, at the West Yorkshire Playhouse. While the play itself was very entertaining, I have to say that I’m really not comfortable about them making a musical about my life without offering me any royalties, or even asking my permission.

Install APD on CentOS 5

July 19th, 2012 | Life, Tech

Here is how to install APD (Advanced PHP Debugger) on CentOS 5. Lets start by creating a directory for it to log files to.

cd /tmp
mkdir apd
chown apache:apache apd

We need to remove ioncube, or it will cause errors.

rpm -e php-ioncube-loader

Now we can install APD, via PECL.

pecl install apd

Add the following to php.ini.

[apd]
zend_extension=/usr/lib64/php/modules/apd.so
apd.dumpdir=/tmp/apd
apd.statement_tracing=0

My PHP binary was in a different location, so I had to alter the script too.

cd /usr/bin/
vim pprofp

Change /usr/local/bin to /usr/bin and save the file.

You also need to ensure PEAR is in your include path (/usr/share/pear) for the script to work.

LESS & SASS

July 19th, 2012 | Limited, Programming, Tech

Still writing regular CSS? Pfft, you’re living in the dark ages! These days it’s all about two new technologies that are almost identical, so I’m going to discuss them in the same post.

The idea is dynamic stylesheets – bringing concepts we use every day in regular programming and implementing them in stylesheets to avoid duplication and make everything cleaner, nicer and more up to update with current paradigms.

So what can you do with these tools? Here is a quick overview…

Variables

Using a colour everywhere that you might want to change later? No worries, just save it as a variable and if you do need to change it at a later date, you just update the variable and it will be changed everywhere.

@myColour: #FFCC00;

.header { background: @myColour; }
.footer { background: @myColour; }

Mixins

Inheritance! What a sexy thing to have in CSS. No longer do you have to place loads of DOM references in lots of different places. Now you can just write it once and included it wherever else you need it.

.bigBorder { border: #FF99CC 10px solid; padding: 5px; }
.header { .bigBorder; background: @myColour; }
.footer { .bigBorder; background: @myColour; }

Nested rules

This one is a huge time saver! How many times have you had to reference half a dozen elements in one DOM reference? Probably very rarely, but certainly two or three tags is the every day reality. No longer though, because you can now nest your rules.

.header {
	.bigBorder
	
	a {
		font-size: 200%;
	}

In this example, the 200% font size will only apply to a tags inside .header, just as if you had done .header a in your DOM reference.

Operations

Want to make a header colour slightly darker? No worries, just add two colours together.

@mainColour: #FFCC00;

.header { background: @mainColour + #333333; }

But these are just a few of the features of these languages. They allow you to do a lot more – including things like full blown functions that you can pass parameters into, guards and much more.

The main difference between LESS and SASS is that LESS is a client-side JavaScript library (although has now been ported to Node) – you send the browser your .less file and include a JavaScript library that converts it. Meanwhile, SASS is a Ruby Gem that compiles a stylesheet to send to the client each time you edit your .sass file.

To find out more, visit the LESS and SASS websites.

Authority Forums relaunch

July 18th, 2012 | Limited, News

Authority Forums

I’m pleased to announce the relaunch of Authority Forums.

Founded in 2005, AF tracks the biggest message boards and forums on a particular topic. So, for example, if you wanted to find out what the biggest Futurama fan forum on the internet was, you would browse to Futurama where you can see each forum ranked according to size, with graphs and historical stats available too.

Over the past month the site has been re-built from the ground up to be faster and easier to use, the design has been overhauled so that it looks much pretty and all the content has been updated too – as you can imagine, over seven years a lot of forums close down and new ones open, so we’ve taken care of all of that.

Lithium

July 17th, 2012 | Programming

Recently, I’ve been re-developing Authority Forums and as part of the re-development, the site has been re-built from the ground up, using the Lithium framework.

Lithium, which bills itself as “the most RAD framework for PHP” is a spin-off from CakePHP. I’ve used the CakePHP framework for previous projects, and it’s an OK framework, but I didn’t find it to be something special. Neither did some of the core developers apparently, who left to start Lithium. It’s also contributed to by Richard McIntyre, who gave the talk on The Future of PHP that I blogged about last month.

It is an easy framework to get started with. I say that; it took me twenty minutes to work out that I needed to download both the Lithium and framework packages to get started. But once I had stopped missing the obvious, everything was up and running very smoothly.

In particular, creating models was very easy. All you do is create a class with the name of your database table and have it extend the Lithium base model. That’s it! You don’t have to tell Lithium what the content of the table is, it figures all of that out by itself and gets you up and running with a CRUD-supporting model immediately.

Of course, this isn’t always ideal for performance and security reasons, but you have significant customisation options that you can dig into to tweak things as you need them. Or, if Lithium just isn’t doing the trick to you, you can easily replace it with Doctrine, or any other ORM of your choice.

It also comes with a good range of built-in libraries. Perhaps not quite as comprehensive as Symfony2, but certainly easy to get started to and that just turn on and off as you wish – most are off by default but can be turned on my uncommenting a few lines. It also has ground-up support for MongoDB.

Deploying was easy too. Lithium automatically figures out whether the current install is dev, test or production and adjusts everything appropriately, so all you do is enter the connection details for databases on each environment and Lithium intelligently figures out which ones to use without you having to tell it, removing the need for slightly different code or a non-writable configuration file.

That said, deployment wasn’t quite as smooth as it could have been, and resulted in a bit of last minute panic. Lithium’s major weakness right now is the lack of community support and documentation. The documentation they provide is fairly good, but unless you’re doing exactly what the example is showing you will run into problems.

I would say I spent more time digging around the API documentation than I did the manual. This isn’t the case with Symfony2 (though I’m not a fan of the Symfony2 documentation either), so if you’re not comfortable doing this, it’s a tough framework to work with. More importantly, though, there just doesn’t seem to be other users doing real-world stuff, and so on several occasions, I had to find myself guessing at how to use functionality.

A good example of this is how to filter a query based on a range. It is easy to do a “I need this column to equal this” for example, but what happens when you want to do “I need this column to be greater than this.” In the end I guessed you could supply a sub-array with the value and the operator – and it turns out you can! But I couldn’t find any documentation for this, even though the functionality clearly is there. What they really need is a user forum (and users! It could just be on Stack Overflow like every other piece of knowledge you ever need).

Overall, I’m really enjoying using the Lithium framework. Its lack of user community is a massive drawback, but wider adoption will solve that and it should be more widely adopted because it’s a great framework.

My kingdom for an internet connection

July 16th, 2012 | Life

It’s been over four months since we moved into our new apartment and we still don’t have our own internet connection.

Having originally placed our order with o2, they failed to turn up to install the phone line and then insisted that they had turned up, even though Norm was there, with his phone turned up and got neither a knock on the door nor a phone call, we cancelled with them and re-ordered with BT.

This meant waiting another four weeks for an appointment, but when the time came George managed to book a day of work to sort everything out. But BT never turned up.

I phoned them to ask what was happening. They said they would go away and investigate and phone me back. Five minutes later they did. They said that they didn’t have our address in their engineer’s database, so couldn’t turn up and had to wait 24 hours for the database to update before they could say when they could come.

That is one of the craziest things I have ever heard. But even if you find that credible, I then enquired why they hadn’t even notified us when they realised they couldn’t turn up. They said they had my number down incorrectly – this would be slightly more believable if it wasn’t for the case that they were telling me this after phoning me back! How exactly did they have my number down incorrectly if they’ve just called me on it?

They promised they would phone me back after 3pm the next day to arrange a new appointment.

At 2pm the next day, I got an email from our landlady asking if one of us could call her ASAP. I did, and she said a BT engineer was trying to get into our apartment. Obviously, having not been told he was coming, we weren’t home. I said it was OK to let him in, but by the time I had done that, he had already left.

I phoned BT to see what was going on, but having left me on hold for a few minutes to investigate they told me that the engineers’ reports don’t come in until 6pm so they didn’t know what was happening and promised they would ring me back the next day.

They didn’t phone me, so that afternoon I phoned them and had a long conversation about what was going on. By this point the issue was deemed so serious that I was transfered to someone based in the UK, who actually spoke fluent English.

He said that they simply couldn’t install a line if our address wasn’t in the Royal Mail database. So even though they had been to our property the day before to install the line, they couldn’t install the line because they didn’t believe that our property existed.

At this point, I decided on a new strategy. I told them that they had our address wrong. We actually lived in apartment 14 (actually, I tried 13 first but because of superstitious nonsense, there is no apartment 13), so they should install it to that property. I also explained that for unknown reasons apartment 14 would be labelled “303” on the door, even though it definitely was apartment 14. They updated their records and scheduled a new appointment in two weeks time.

The appointment arrived and the engineer turned up to install our line. After a frantic twenty minutes trying to find the housekeeper to let us into the comms room (we don’t have any contact details for her, so we have to phone the landlady, who phones the housekeeper), the engineer finally got access and began surveying the situation. It turned out the only way we could get it working was to use the existing network because the building had never given any consideration to people actually wanting a phone line (the alternative was to run a new line in, up the side of the building – that was my preference to avoid all this nonsense but it would inevitably incur other nonsense instead).

Ok, so we just need to work out how we’re plugged in at the moment. Easy enough? Not quite. The comms room has a series of 10 48-port switches, none of which had any labelling on. I’m sure you can do the maths but to be clear, that makes 480 ports, one of which was our apartment – but we had no idea which.

The engineer began investigating. With some further surprise restrictions now being enforced by the building management, we were now running into an extended appointment which the engineer said it would have to bill us extra for. We told him that if such a bill would be under £100 then we would pay it, otherwise he could get on his bike.

Luckily, the bill suddenly did come in at “under £100”, so by lunch time we had a phone line we were assured would soon be working. We had no phone to plug into it, so no way to verify said claim, but I’m sure BT wouldn’t let us down. Now just to order the actual internet…

Religion and sex

July 16th, 2012 | Photos

Google results

Apparently, google thinks that pornography and church go rather well together.

A given?

July 15th, 2012 | Religion & Politics

In the final of three blog posts I’ve written about the fall out from the recent Steve Moxon event, I wanted to comment on an interesting debate point raised on the Leeds Skeptics Facebook group, where someone claimed that some things we should just accept as true.

There are some things that should be a given in any skeptical society

I’m not making this up. Someone in a Skeptics group genuinely just said that there are some things we should just not question.

Of course, the equality of our fellow human beings is something incredibly important and something that when challenged, we would defend rigorously. But to suggest we should just same some things on faith is a violation of the very definition of skepticism. But more to the point, such an attitude undermines our own argument. Our position is that all our members are equal and we take this position because we’ve reviewed the evidence, and that is the case. To rule out a debate on it entirely is simply unskeptical.

Let us not forget that we have equality today because someone WAS skeptical about the prevailing idea that black people were inferior to white people, or that women didn’t deserve the rights as men did. Thank the god that I do not believe in, that someone had the courage to challenge these ideas that were just held as true at the time, so that today we can have equality.

After all, if we’re in the right, we shouldn’t be afraid to challenge our own ideas. As I’ve written before, I entertain the idea of cheating on my girlfriend. Why? Because I know I will never do it. I’m secure enough in my relationship, and I know I love her so much, that I can safely consider the possibility without worrying. I know this, because I’ve challenged my own beliefs, and because they still hold true, that only makes them stronger. As Norman summarises…

Not sure how anything can be a ‘given’ in a skeptical society? Surely the point of a skeptical society is that all view points are subjected to a rigorous process of critical analysis, regardless of whether it agrees with our world view or not.

One could argue that it is the very ‘givens’ of our own world views that require even more in depth challenging.

Challenging your beliefs only makes them stronger (or they turn out to be wrong – but I’m as certain as you can be that this won’t turn out to be the case for equality). But perhaps I underestimate how secure people actually are in their beliefs. I mean, are attendees worried that others are going to be won over by bigoted arguments?

Secondly go to the event, witness said MRA speech, and more than likely become angry at the shit he’s spouting. If you decide to argue with him you’d better have the support of the room otherwise you will get shouted down and feel even worse. At the very least you will be sat in your seat seething, possibly feeling upset or unsafe depending on how many other members are agreeing with the speaker.

I’m sure this wasn’t mean this to be in any way offensive, but she did just imply that that everyone else who attends Leeds Skeptics are at best are sexiest bigots who would shout her down if she tried to call someone on sexist nonsense he was spouting, and at worse a bunch of rapists would threaten her safety. Talk about promoting bad gender stereotypes. But it goes on…

What good would come out of it [the event], to balance against the aggressive sexism and racism that we’d almost certainly have to sit through and which would be at best uncomfortable for people who aren’t white males?

Is she seriously suggesting that white males don’t find racism, sexism or any bigotry offensive? It’s incredibly insulting, and sexist (and racist for that matter), but more than that, I think it shows that there is a real need for careful consideration of what we all hold to be true and bring open to the principle of challenging our own ideas.

As I’ve already said, challenging well founded beliefs only makes them stronger.

Controversial speakers

July 14th, 2012 | Religion & Politics, Thoughts

In my previous blog post, I wrote about our decision to cancel Steve Moxon’s scheduled talk at Leeds Skeptics. In this blog post, I wanted to explore the wider issues of controversial speakers, and balancing freedom of speech and proper public debate with being an inclusive and welcoming organisation.

In the discussions, someone asked if I would want to attend an event where someone had views that I found offensive. The answer is without a doubt yes. I totally would – and I did – I spent my university years while running Leeds Atheist Society, going to talks run by religious societies where speakers said some very offensive and controversial things.

I wanted to learn about their points of view. To me, they seemed like obviously wrong and bigoted. But how could I say that for sure unless I had heard them out? And if it turned out their views were as shallow as it seemed, I wanted to challenge them on it. To be honest, it never really occurred to me that other skeptics wouldn’t feel the same way.

When I asked my girlfriend about it, she said the same thing. She would have liked Steve to speak, so she could hear him out and challenge the opinions she disagreed with. As Mike points out, how else are we supposed to challenge prejudice?

The only way SITP can come out on top is if the members take him to task; it’s recorded and publicised in order to counteracts any publicity claims he makes himself. It needs to be clear that this is an exercise in critical analysis and the application of skepticism and not a sounding-off platform. That includes the common decency of informing the speaker himself to give himself a chance to pull out should he so wish.

I often try to bring controversial speakers to the group as a springboard for debate, because I have always felt that Skeptics group suffer severely from preaching to the converted. We bring in someone who rubbishes UFOs for a living, and we sit there with our pints and go “ha, ha, ha, there’s no such as UFOs, what idiots for believing in them, isn’t that funny.” Of course, it’s a good laugh for us all, but it is neither thought provoking nor challenging. As Adrian summarises…

At present we have a network of groups like SitP that invite scientists and atheists to speak to other scientists and atheists, and a network of groups like Truth Juice that invite woo-woo merchants to speak to woo-woo sponges. Thus speakers of all types are largely preaching to the converted and very little of any value is actually taking place.

For someone like Moxon to speak to skeptics groups is good for Moxon, since he gets to see that not everyone shares his point of view, and has to listen to people debunking his irrationality, and good for the audience since they learn first-hand what kind of woo-woo there really is out there in British society (and how it is rationalised) and they can practise arguing against it.

Trystan feels the same way…

You mention that there is a difference between a controversial speaker and one who attempts to pass of poorly reasoned views as science, but SitP is a fantastic venue to highlight – specifically during Q and A – what is wrong with the argument being made on scientific grounds. It is a fantastic opportunity to demonstrate skepticism at work.

If certain people at Leeds Skeptics are unhappy that the talk was booked then (a) it doesn’t mean anything and (b) I’m wondering why. I can guess. Most, if not all, SitPs I’ve encountered seem to have an element who feel each event is about having an on side preacher come and speak to the choir, doing all of the skepticism for them. I recall upsetting a gentleman in Oxford because my views on private ownership of land was at odds with his own. It rocked the boat, made him think. Why not seize the opportunity to perform some self-think rather than following group-think?

If anything, the academic-cum-philosophical-cum-skeptical platform should be opened up more for people with views that are groundless and have the potential for harm. Oxford Debating Society did a wonderful job by opening up their doors for Icke to bury himself under a deluge of his own nonsense.

Indeed, while the majority of organisers from local Skeptics groups haven’t commented either way, most of them who have seem to have similar feelings.

I have always thought that the point of a Skeptics event should be to make you think. We’re supposed to be non-dogmatic; and a group of individuals who can think for themselves and challenge ideas. If you don’t agree, that’s fine, it just means you’re not a skeptic by the very definition of the word and are unlikely to find much benefit attending skeptics events.

After all, if we’ve not providing thought provoking and challenging events, what exactly are we doing? Preaching a monthly sermon to you about something you are supposed to accept without question? That isn’t the movement I signed up.

Rather, Skeptics meetings should be a bastion for critical thinking, a place where we aren’t afraid to let bad ideas be proposed every once in a while because we have enough trust in our own critical faculties to be able to tell the difference between a good argument and a bad one. Such events are an ideal time to confront prejudice and show good skepticism in action.