Chris Worfolk's Blog


The 7 Habits of Highly Effective People

March 15th, 2012 | Books

I had heard a few good things about 7 Habits by Stephen R. Covey, so I decided to give it a read.

I have to say, I was very much disappointed. I guess there should usually be some kind of flag when the author needs to foreword his own book, though this can be forgiven – after all, our once great leader, now deposed for his crimes against Darwinism on Radio 4, Professor Richard Dawkins, has previously foreworded his own books in revised editions.

The book sets itself up to be the anecdote to the nonsense that has been published in recent times – there is no quick fix, the fads don’t work, etc. But the author then goes on to discuss how he uses many of these techniques, which Penn & Teller have devoted entire episodes of Bullshit to rubbishing, in his personal life.

He then goes on to set out many obvious points which simply don’t offer any value. Perhaps there is some merit in simply codifying already known or obvious values, but then we don’t ascribe any praise to books such as L. Ron Hubbard’s The Way to Happiness which makes valid, but obvious points such as “set a good example” or be honest.

Covey’s constant reference to his religious faith (he is a practicing Mormon) also add a large amount of bias to the book. Indeed, some of the arguments that he puts forward I could only really get my head round by looking at it from a religious perspective – they simply don’t make much sense from a secular perspective.

So overall, not too impressed with the book.

Faster grepping with fgrep

March 15th, 2012 | Life, Tech

If you use the Unix terminal, you’re probably familiar with grep. It’s a great search tool. But sometimes it is a little slow. Luckily, there is a faster version, with the original name of fgrep, though you might be surprised to learn it doesn’t actually stand for fast grep. But don’t be confused – it is faster.

You use it in avery similar way to the way you would use grep. So for most occasions, simply replace grep with fgrep for faster results.

Banning internal emails

March 14th, 2012 | Thoughts

Last year, ATOS boss Thierry Breton announced he was planning to bring internal emails to an end at the company.

It’s a brilliant idea. As his research shows, most of the internal emails we get at work these days are junk. In fact, up to 85%, perhaps even higher, are messages we didn’t actually need to get. Yet we spend hours and hours every week reading all of them!

That can’t be productive for a business.

That is all on top of emails being a distraction in themselves. One thing Gijsbert has commented on in the past, and that any “how to study” or “how to focus” book will talk about is disconnecting yourself from the outside world and not getting distracted by things like email.

So, over the past week at work, I’ve been “switching off” my emails. When possible, I read them first thing in a morning and shortly before the end of the day. Between then I close my email client and get on with actually doing my job – writing code!

Overall, I’m more productive. I’m not missing important emails either. I was expecting a lot of people to come to me and say “did you read my email yet?”, but nobody has. Nobody! You could almost argue that as it wasn’t important enough for them to come chasing me up, was it really important to send to me in the first place?

Of course, this isn’t the same thing as banning internal email, but what I think it shows is that emails have, on the whole, not become more of a burden than a benefit and the workplace can be made more productive by finding alternative routes of communication.

House warming

March 13th, 2012 | Friends, Life

Last weekend we held our house warming party for our new place. Despite the continued and so far unstoppable process of ageing which continues to haunt us, we managed to keep going until gone 5am and managed to polish off around twenty bottles of various spirits – not to mention George getting through two vase-size snakebites.

Gift of Gloves

March 12th, 2012 | Foundation, Humanism

Gift of Gloves

We would like to say a big thank you to everyone who contributed to our Gift of Gloves project. We have now received and distributed many pairs of gloves, mittens and extra warm socks, all of which were gratefully received by their recipients.

Humanism: The National Scene

March 11th, 2012 | Humanism

Last Thursday, I headed down to the Humanist Society of West Yorkshire to see Dan Bye, council member of the National Secular Society, present a talk on Humanism: The National Scene.

I saw Dan speaking last year at Leeds Atheist Society on faith schools and it was a great talk. Thursday was no less interesting, with Dan giving an excellent overview of the non-religious movement in the UK and reminding us that we actually have it better now than we ever have had in our lifetimes. Religion is shrinking and public debate is on the rise.

Adoption

March 10th, 2012 | Religion & Politics

Recently, there has been quite a lot of discussion around the subject of adoption. People stand in horror that the adoption process is being sped up so that we can match children to adoptive parents in a quicker amount of time.

The phrase you hear most often is that “we need to make sure that perspective parents are suitable.”

But is that really true? I’m going to suggest not.

The reason is, we don’t actually need adoptive parents to be that suitable. Of course if they are brilliant perspective parents then that is fantastic news, but I think we need to take a more pragmatic approach to the whole situation.

After all, these are kids who are usually in care homes. So the question isn’t are we placing them with suitable people, it’s whether we are placing them we a couple who would be at minimum more suitable than living in a care home.

We know that a care home isn’t a good environment to bring a child up in, we’ve done the research and statically it doesn’t end as well. So the question then becomes, what exactly would be the harm in having a more relaxed attitude to adoption?

Notice to require possession

March 9th, 2012 | Life

On Thursday, 1 December I received a letter from my letting agent, Walker Singleton, stating they would be terminating my tenancy because they had to sell the apartment on behalf of the mortgage company. I was shocked and alarmed at the idea of having to leave me home, so I phoned their office. Multiple times. They never answered.

I eventually managed to speak to them the next day, and said that if they had to sell the apartment, I would just buy it (at the asking price!), it would be cheaper for them, it would be cheaper for me, no one would have to move, everyone is a winner.

They said no, claiming they had to sell it with vacant possession, and if I wanted it I would have to move out, wait for it go on the market, then buy it and move back in.

I went away and discussed this with a few people, and it didn’t make sense to any of us. So on the Monday I rang them back and explained to them the situation in more detail, and that HSBC had said they would give me a mortgage, so this really was an easy win for the both of us.

They said no. I asked why repeatedly but they wouldn’t give me a straight answer, just saying they couldn’t do it. I then asked if I could speak to the owner of the property, or the mortgage provider. They said that wasn’t possible, but wouldn’t explain why.

So I went to the Land Registry and got the title register for the property and found that the lender was Mortgage Express. So I phoned Mortgage Express and they put me through to Possessions. Possessions said they hadn’t taken possession yet, so I would have to speak to Late Arrears. So I phoned their help desk back again and asked to be put through to Late Arrears.

They said they couldn’t discuss anything to do with the property other than to confirm that someone had a mortgage on it, but because I wasn’t the account holder I wasn’t allowed any further information.

I also tracked the guy down on LinkedIn

Hi Richard,

I’m a tenant of yours, currently living at an apartment you own – Crown Street Buildings in Leeds. I’m just looking for some more information about what is going on, as I’ve been served an eviction notice.

Best wishes,
Chris Worfolk

He never got back to me.

So now I’ve moved out and everyone seems to have come away with a loss. Bad times.

How to truncate an ARCHIVE table

March 9th, 2012 | Life, Tech

Archive is a cool MySQL storage engine designed for fast inserts. In fact, it’s so optimised for this that it actually only supports INSERT and SELECT – you can’t run UPDATE or DELETE commands against it at all.

This is a problem when developing though, as you’ll often want to empty out the table and start again. But because it doesn’t support delete operations, it won’t actually let you truncate the table! So to answer the question posed in the article title – you can’t.

Therefore, you have two options.

Firstly, you can drop the table and re-create it. This is the recommended way from MySQL, so make sure you have a copy of the table creation command handy.

The second option, the lazy hacky way if you will, is to change the table storage engine over to InnoDB or MyISAM, truncate the table, and then turn it back to ARCHIVE ;).

Hashing passwords in PHP

March 8th, 2012 | Programming, Tech

If you store passwords as part of a PHP script, you may be using md5() or sha1() to hash the password. This is common practice, but you may be suprised to know that actually, the PHP manual recommends against it.

The reason is that they are both fast but relatively insecure hashing algorithms that can be brute forced by modern computer systems if they get hold of the strings. A better approach is to use the crypt() function, which is a little more expensive in terms of resources, but worth it for the increased difficultly you create for any potential hackers.