Anti-Spam Effectiveness

What website are you looking at? Sounds a simple enough question right? Well for a human maybe but perhaps not for a CAPTCHA reading online bot. A problem that’s plagued bloggers and forum administrators for years is how to stay ahead of the comment/post spam that invariably results from putting one of these sites online.

The solution until about a year ago has been to go for a centralised solution like Akismet or make your CAPTCHA ever increasingly harder to read and thus harder to crack. Unfortunately the latter has simply increased the number of frustrated users resorting to e-mail to ask for access or giving up altogether. Akismet has stayed ahead of the curve and for one-off comments on blogs and other types of media has proved invaluable. For forums however there isn’t really a reliable connection between most forum systems and Akismet and administrators have been left wondering what to replace their ageing, difficult to read and fundamentally ineffective CAPTCHAs with.

Welcome the Q&A. While this concept has been around for a while, Q&A really comes into it’s own when you factor in randomisation. If a particular style of CAPTCHA is in use by many sites then it’s well worth a spammer trying to crack it as they reap large rewards. Custom solutions on the other hand have the advantage that unless you run a huge site like BBC News, they’re not going to be worth cracking as there are easier rewards to be reaped elsewhere. While you could use a custom CAPTCHA this requires some effort and you’ll probably end up re-using someone else’s code which defeats the uniqueness objective. This is when we resort to the simple question, unique to every website. Where am I? Who is my admin?

Having implemented such unique questions to all of my forums recently I can report a resounding success. No automated registrations leaving just the handful of spamming manual ones which are easy to weed out of an early morning. The big bonus here is legit users find it a doddle to register as they either know by heart or can easily look up the answer. I also now have the slightly tangential advantage that if I were to start getting automated registrations again then my sites may well have become as popular as BBC News which would certainly bring a smile to the face.

Comments off    

Jack Kelly’s Sailing Dream

A friend of mine, Jack Kelly, whom I met at Leeds University while studying in the School of Computing, has taken it upon himself to join the crew of a tall ship, Windeward Bound, for a 6 month stretch. As a fellow sailor I was delighted to find that he has decided to write a blog about his experiences while on board and I’ve begun avidly following his updates. Jack, I wish you all the best for your travels on the high seas!

Comments off    

Final Sail Of The Year

Today saw me return from my last sailing trip of the year before hanging up my oilies and hunkering down out of the cold for the winter. As luck would have it we couldn’t have had a better weekend for such a sail and despite the lower than preferred wind speeds we completed our overnight race to the French port of Cherbourg and returned to Gosport the following night in high spirits and with somewhat windswept and sun tanned faces!

I’ve included below a couple of choice photos I snapped when I got the chance. First up is the actual start of the race, dead centre of the picture you can just make out the starting box on the shoreline and of course the other boats in the fleet who have crossed the line or who are about to. The second is the sun drenched terrace bar in Cherbourg where the tired but satisfied race participants were conversing and enjoying a glass of Merlot (or three!)

Start Line

JOG Drinks Party

Comments off    

On London Driving

These days I’m often in London and despite the generally held opinion that London is the last place in the world you’d want a car, I’m usually behind the wheel on my visits. While my motivations for picking up the car keys are largely financial as well as a dash of convenience – why spend twice the cost of the fuel on a train when doing so would result in a massive hike to the tube as well as a change at Baker Street which is never an enjoyable experience – I’ve found my driving time has allowed me to make some rather amusing and somewhat tongue in cheek observations on what it is to be a London driver.

Firstly, space between cars. In conventional driving it is considered to be rather bad form to be up another drivers boot lid however in London the opposite is true. This is because a driver who leaves too much space is making the queue longer and has, de-facto, prevented a person further behind getting out at the lights, usually resulting in much honking of horns.

Traffic lights, while most certainly to be obeyed at all times (many have cameras to prevent red light jumping) are an opportunity for position posturing. In an effort to reduce traffic jams at junctions, London roads widen from one lane to anywhere between two and four lanes. While this sounds like a good idea, what you don’t realise until being right up at a set is that the road narrows once again almost immediately on the other side of the junction, resulting in a massive bun fight for “head of the queue” in the single file line of traffic that is to follow. Drivers at the white line by the lights (affectionately known as the starting line by initiated city motorists) vehicle occupants glare at each other in defiance through the quarter-light and twiddle with their hi-fi, not for a second however taking their eyes from that red glow up above. Cars are always to be left in gear, clutch point a mere millimetre away from taking the bite, in readiness at a chance to take the leading position in the head of the queue. Even if you’re not at the front, there’s no reason why glory can’t still be yours – you may have a Subaru in front of you and someone with a dodgy clutch to his left – second place is surely in reach. The fact that this whole exercise will release more CO2 than a 20 mile motorway journey and is to be repeated in another 100 yards at the next set of lights is immaterial. Participation became mandatory the moment your car crossed the M25.

Multiple carriageways are surprisingly common and present plenty of opportunity for vehicular shenanigans. Filters to join and exit may be left or right which presents ample opportunity for sat-nav engrossed motorists to swerve violently across 3 lanes to their goal. Speed is also an important factor. While heavily populated with fixed cameras, the road regular will know that average speeds are usually below the legal limit and so seek to maximise their speed by switching lanes (ignoring all pretence of the rule concerning not overtaking on the inside) to increase their average on each 100yd stretch by 1mph or perhaps even more. The switching of lanes in this way is an art, with success usually being measured by how many car lengths you gain on vehicles in your general vicinity. No distance between your own rear bumper and the front of the car behind and to the side is too small to prevent pulling out and zipping past the vehicle in front on either side. Indicating is usually considered only as an after thought and thus is rarely used by regular London drivers. While some motorists may let others get away with such daring over/undertaking manoeuvres this is frowned upon and a good thumping of the horn, a glare and full beam on the headlamps for the next half mile is usually practised, even if many attempts are made at apology.

Traffic jams are a common occurrence and a driver has few options, with the ones that are available being varied in success rate. Simplest is to sit tight, roll the windows down, blare out some music in an anti-social way and pretend like a central London traffic jam is *the* place to be and that you really wouldn’t rather be anywhere else. While not helping your forward progress, this increases your public visibility for those you’ll never see again and there is always the chance that any alternative route will be more snarled than yours. Don’t make the mistake of thinking that if one bridge is clogged, heading up/down river and crossing at another will get you through. In the time it has taken you to think that, over 1000 other motorists have thought the same and the other crossing option is now snarled also. This is not to say that taking an alternative route doesn’t have some appeal. There’s the option of the crazy u-turn in front of a bus followed by a rapid darting down residential streets, snaking your way left and right in an easterly or westerly direction until you hit the next main road and hope that you can somehow bypass the jam you were previously in. Most people have a great time for the first five minutes until they realise they are lost. In fact when parking, the car you’ve just seen drive past for the fifth time is probably just such a motorist. Take no time for pity for you would never do such a thing, at least that’s what you should tell yourself when you next wind up an hour late and on the wrong side of the city because you were “avoiding traffic”.

Cyclists own all roads inside of the M25. This is regularly demonstrated by their passing through red lights, cutting across your path when you have the right of way and damaging your vehicle when you are stationary in traffic without stopping or making any effort at an apology.

Parking, compared with all that moving about, should be easier but that’s rarely the case, especially in areas of free parking. The motorist in search of free parking is akin to a gannet, circling, waiting for the opportunity to get their share. If you’ve been driving round for five minutes looking for a spot, don’t kid yourself that the car in front is just using the road as a means to an end. They’ll surely take the parking space that you’ve just seen free up ahead. Parking space search fatigue is common. This is where you spot something that looks like a space, but actually you’d have to be really rather lucky to park a wheelie bin in the gap. You attempt to park anyway, denting your own bumper and cracking someone else’s number plate in the process. Circling resumes. Serious fatigue is when you try the same “only fit for a wheelie bin” space again later, this time cracking your headlamp and inflicting further damage to the other individual’s vehicle. When you finally do park and walk off on your business, don’t congratulate yourself too much. Even if you’ve parked perfectly you’ll almost certainly have a parking ticket for poor parking or have had someone else dent your car while trying to get into the space in front or behind.

When all is said and done, far be it from me to discourage the budding London driver. Remember all this excitement pales into insignificance when you consider some other cities such as Milan where any attempt to articulate rules is simply replaced by carrying out the desired action anyway and uttering the words Mi Scusi!

Comments (1)    

Daily Blogging

Many years ago (and yes I do mean years) I used to find time during the year to write an average of one blog article per day. As is quite self evident from navigating through the blog archive I’ve not been achieving this posting rate for quite some considerable time.

I used to explain away momentary relapses in blogging by stating that I was waiting for something good to say and a poll on my website affirmed that this was the correct thing to do with over half of respondents preferring to wait for a post to appear that they wanted to read rather than wading through mindless drivel. That being said, I can hardly do myself any justice by inferring that I have had little useful to say while posting has been more sparse. As friends and family with whom I’ve dined out over the past few years will confirm, I’ve always had something to say about most things going on in the world!

Two years ago at WordCamp I explained to a packed conference room some tips and tricks for filling your blog by contributing to it’s content via posts made on other social sites thus keeping your personal web space up to date with your life but without having to make a concious effort to blog. While I’ll not stop doing this as the varied content is a nice touch (especially with the photos) I’ve come to realise that something is wrong with relying on this approach to fill the pages – it lacks reason and direction. Essentially, I’d forgotten why I turned to blogging in the first place.

I turned my previously static HTML based website into a dynamic blog back in 2005 shortly after I’d joined the University of Leeds School of Computing. As my life was in a fair state of turmoil at the time it seemed a logical thing to do, to have a place online where updates could be frequent and varied and not limited to a specific structure. Once I’d gotten settled at the SoC however, I found that my blogs settled down too. I found focus and energy in my work and my blogs were both a personal reflection on this fact for myself and a window onto it for the wider world. Essentially blogging was both an affirmation of and a driving force behind my positivity.

OK, so strong stuff then. Well perhaps not. I’ve realised recently that I’ve got into a bit of a habit of dwelling for too long on the things that go wrong and not taking enough positivity out of the the things that go well. While out walking the other day in the evening sunshine I was thinking about ways to better channel that “get up and go” attitude and I remembered my blog – how a tough day in the computer labs would soon be forgotten by passing amused comment on the party from the previous evening or by reflecting on a trip I had planned in a few weeks time.

Who could say no to an opportunity for an outlet for forward thinking? While I can’t promise I’ll manage to get a post up every day in this new concerted effort as the post title suggests, I can offer assurances that I’ll look to be tending towards 30 posts in a month in the not too distant future. Article ideas on a postcard….

Comments (5)    

Push e-mail on an iPhone or iPad

When you search google for a similar phrase to the title of this post you usually get a fairly stock response; use exchange, mobile me or gmail and you can have push e-mail by simply activating it in the mail settings. The thing is, most people who search for the above know this already. What they really want to know is how they can push e-mail with a conventional e-mail account that they may have from a hosting provider and access through thunderbird or outlook.

With BlackBerry, push e-mail is really simple. Just provide the setup screen with your IMAP enabled e-mail address and password and BlackBerry will start pushing e-mail to your phone. With iPhone and iPad it can also be that simple without changing your mail provider or e-mail address but to get there we need a step in between. I call this the fake exchange server.

A little known sourceforge project called z-push holds all the answers. Essentially by installing this PHP code on a web server and setting up a config file or two we can fool an iPhone or iPad into thinking it is talking to a Microsoft exchange server and get genuine push e-mail from a standard IMAP e-mail account!

To get started you’ll need the following:

  • A web server
  • Copy of Z-Push code
  • The details of your IMAP e-mail server

Don’t look with concern at the first requirement. You can probably make use of a shared hosting account for this, or if you were prepared to go out and spend on mobile me then you will probably be able to spend less and get your own VPS, which, if you intend to push a lot of mail, might be a better bet in the long run anyway.

Configure your web server to support SSL and install PHP. I won’t go into detail on how to do this as there are plenty of online tutorials for this already that you can google. The SSL bit is important as this will ensure that e-mail traffic from your iPhone or iPad is encrypted which is essential if you have a habit of using open WiFi connections while on the move. If you’re doing things on the cheap and using a home server then make sure you have a static IP at home. You can get a free SSL certificate from the fine folks at StartSSL.

Once your server is up, follow the instructions for installing z-push from their website. In practice I found that the stable version was far from it and didn’t really work so opted for the 2.0 alpha version. Try your luck and see what you get. There is a forum on the z-push site from where you should be able to obtain help if you need it.

With z-push installed and configured as per your IMAP e-mail server settings, you’re ready to try your luck from your Apple device. Head on over to e-mail accounts and delete the current entry you have. Once you have done this, select to configure a new account and choose Microsoft Exchange. Enter your e-mail address, username and password. Leave the domain blank and SSL on. Often your username and e-mail address are one and the same although this can vary. It’s unlikely that just these details will connect as you’re pushing mail from your dummy server, so you’ll be prompted after a few seconds for a server URL. Enter the domain name on which you have installed z-push.

Assuming all of this is accepted by your Apple device, you now just need to go to the fetch new data settings, enable push and and change fetch to manually. Open up mail and if all is working you should see your e-mail in folders. If so your final test will be to return to the home screen, send an e-mail to yourself from your PC and watch the iPhone/iPad. You should see the e-mail arrive within seconds. If so, you’re pushing mail!

At the close of this article I’d like to mention that my ability to investigate this scenario and write up the solution is due in no small part to the generosity of Stinky Ink in them putting up an iPad2 as a prize in their WordCamp UK competition, many thanks once again!

Comments off    

Free iPad

Whilst at WordCamp UK 2011, held in Portsmouth, I entered a competition run by one of the key event sponsors, Stinky Ink, to win an iPad2 – and my e-mail got picked out of the hat!

Free iPad

It’s unpacked and I’ve started to have a play around with the interface and features. I’m already liking the ease of use for occasional web browsing, the twitter client is great and I’ve been inspired to do a little hacking in the field of push e-mail. Watch this space!

Comments off    

Foursquare Auto-Checkin

Having been a recently new joiner to the foursquare phenomenon I’ve quickly decided that I like it and that it’s leaps and bounds ahead of Facebook places. That being said, it’s not without issue. The main one being that there are places I regularly frequent that I want to check into, but don’t wish to publish on twitter. “You can do that!” I hear you cry, well yes, you can, but you still have to get your phone out of your pocket.

To me, getting one’s phone out of one’s pocket should be to actually say something, such as “I’m at somewhere new” or “I’m at somewhere I normally visit but I’m here for longer this time, come and join me”. If I’m just heading to the office or going home, I want to log that onto the statistics but not shout about it. While there is of course an option on the mobile app to do this, I have to specifically choose that option. In reality, what I really want to do is only to touch my phone if I have something to say, otherwise let foursquare do the work for me.

Enter the API! I have long been a user of google latitude. This little known service allows me, via a private API key, to retrieve the latitude and longitude coordinates of my phone wherever it is. I used this feature to track my road trip progress and it worked very well. To this end, knowing that foursquare is primarily powered by coordinates and I always have access to mine, I decided to stick my coders hat on and program my way to lazy foursuare use.

Registering for a foursquare API key is easy and it arrives straight away. Getting an OAuth token using the key was also just as easy and within a minute or so I was able to call out instructions to foursquare from my server, pretending to be me. It didn’t take me long to close the loop so that to all intents and purposes my server is me as it knows where I am.

Although it’s a little rough around the edges, I now have an application running that has a pre-set list of locations that it is allowed to check me into and when my coordinates say that I am there, it calls out to foursquare and does so.

While this is far from ready for release, I do hope to do so in not too distant future, perhaps in time for WordCamp. In the meantime I’m going to sit back and enjoy ousting my colleagues as mayor of the office, just by pulling into the car park. After all, isn’t that what this whole foursquare thing is all about?

Comments off    

SLR Camera Simulator

If you’re looking to hone your photography skills but don’t have much time to get out and about with your camera, spending a few minutes in your working day playing with this camera simulator could be the answer. Look at a subject through the viewfinder, change the settings and take a picture, looking at the results afterwards. Quite a remarkable piece of web development I must say!

Comments (1)    

No to AV

Tomorrow sees the first referendum in the UK for over 35 years and the decision at hand is whether to change the voting system for Westminster elections from the traditional first past the post system to the alternative vote (AV). I’ve written this post as I wanted to share my reasoning for deciding to vote no in the poll.

Firstly let me stress that this referendum is a massively important decision, one of the most important decisions that is to be made about the UK political system for over a generation so please don’t underestimate the significance of casting your vote! Whether you agree with my points or not, you should be sure make your voice heard on May 5th – set aside a time of day to go to the polls and cast your ballot.

I was first introduced to the alternative vote back in 2003 when I started my studies at the University of York and decided to run for election to the Halifax College Students Association (as it is now known). As I became engrossed in campaigning and the fervour of the election trail I came to realise that AV has many flaws, interestingly some of which are not being actively mentioned by the current No to AV campaign.

Initially I noted that the primary flaw seemed to be the time taken to count. In first past the post each ballot paper is required to be reviewed only once, whereas with AV you review some ballot papers a number of times; if the top candidate has less than half of the votes then you review all the papers for the candidate with the lowest number of first place votes to decide if to discard the paper or add the vote to one of the remaining candidates. This could, in theory, continue until almost half of the ballots have been reviewed at least twice. Despite what the yes campaign says there is no way that this can possibly counted as fast as first past the post with standard resource allocation. If they wanted to compete on speed then they’d have to have more counters or resort to electronic voting. For reasons of cost and reliability neither of these two options seem palatable, even to many in the yes campaign. The final nail on this one of course is that if we just accept it will take longer, keeping the count manual and the number of counters the same, our “morning after” results that we currently enjoy (and the excitement of election night) may well be a thing of the past. As someone who has enjoyed election night even since before I was able to vote this is not something I’m willing to let go easily.

It’s probably possible to infer what my next gripe was based on the above, the increased likelihood of counting mistakes. While I’m sure all counts are and would be conducted to a high standard, the vote re-distribution factor in AV along with the increased number of ballot paper options increases the probability that a good counter will make accidental mistakes. Given the counting time factor, if the vote is close, called into question and a recount requested (as is sometimes the case for certain marginal seats) this process could take longer. Don’t get me wrong, I’m a quality over quantity person but I also subscribe to the Keep It Simple Stupid (KISS) principle; if something can be done simply with less chance of error than that is usually the best approach unless there are compelling reasons not to. This of course applies equally to the voter making their choices on the ballot paper although given how long polls are open for during the day any slight time increase in voting time is unlikely to cause any problems.

My final and certainly biggest issue with AV (indeed my decision really rides on this issue) is the political spectrum conundrum. Many of the worked examples you’ll find online for how AV works show a scenario in which there are several similar candidates politically with small but defining differences between them and one politically different candidate. In this situation AV outperforms first past the post in fairness as those placing the several similar candidates in ranked order will ensure one of them gets elected over the politically differing candidate thereby ensuring the political wishes of the majority are catered for. This however assumes a certain polarity of political spectrum in each constituency and in the UK we simply do not have that. Most common is the 3 party ballot in which most votes are shared between them. In AV, the temptation would be to rank amongst these three but politically this makes little sense as if you drew a venn diagram of how policies overlapped you’d find little in common. The result of this is that voters are tempted to mark on the ballot against more than one candidate under the perception of increased choice when in fact doing so is increasing the chances that a party that does not sit well with their true political opinions being elected. This also increases the chances to engage in tactical voting. At present tactical voting goes on but based on past results and opinion polls as you can only vote for one candidate. With AV you can deliberately set out to disadvantage one candidate over others by simply ranking all the others and leaving the last candidate off the ballot. Clearly not everyone will do this but something that even has the potential to encourage people to focus on voting out a candidate rather than voting one in somewhat defeats the objective of polling political opinion which is, after all, what a general election is really about.

Having said all of that, ultimately everyone must make their own decision and I’ve no doubt that many will disagree with my views and my rationale behind them. Whatever you believe though be sure to do one thing; as I said at the start, go out and vote. To stay at home is to let others decide for you and as always when it comes to the decisions others make on your behalf, you might not like what they choose.

Comments (3)    

Next entries » | « Previous entries