Because twitter isn't enough any more.

Green Councillor Jason Kitcat, youtube, and the grown up world of local politics

Posted: July 21st, 2010 | Author: Andrew Hancox | Filed under: Brighton & Hove, Politics | 2 Comments »

To start with I want to make clear that from what I’ve seen Jason Kitcat is a dedicated councillor who does a fine job and maintains a strong web presence, twitter, youtube channel and blog. For some time Jason has been uploading clips of council meetings (the full recordings are already in the public domain) to his youtube channel, this is laudable – anything that engages people in local government can only be a good thing however…

On the 30 January 2009 he uploaded a clip of an exchange in which a snippy remark is made by a councillor leaving another looking a little foolish, the exchange was taken completely out of context and served no discernible purpose beyond humiliating one of his colleagues (who happens to be a member of a different party). You can view the clip here and decide for yourself if you think otherwise.

Eventually (after over a year) the clip drew the attention of the other councillors and a complaint was made, Jason was asked for an apology and to take it down both of which he has refused to do instead choosing to portray himself as an oppressed campaigner for freedom of speech, a position which has now led to his suspension from the council pending an apology.

WHY?????

Jason, is there seriously no better cause you can find to martyr yourself for than the freedom to upload ‘Britains bitchiest councillors’ clips to youtube? As a Green party member with – from what I’ve seen – a strong sense of justice I would have thought there are many important local issues you would go to the wall for, why let a silly mistake like this compromise your career and deprive your electorate of it’s councillor? Grow up, apologise and move on – unless you really think that people’s understanding of the situation is so limited that they’ll believe you’re the victim of a tory party conspiracy.


Saynotostatusquo and Brighton & Hove Council’s flaky commitment to the local digital industry

Posted: June 11th, 2010 | Author: Andrew Hancox | Filed under: Brighton & Hove, Politics | No Comments »

A lot has been said about Brighton Council’s Saynotostatusquo micro site to recruit four new strategic directors, though I’m behind the creation of the roles I personally think the design is a bit tacky. I was, however, aggrieved when I discovered they hadn’t looked within the city for the skills to build it but instead gone along the coast to Southampton. I’m sure that fivebyfivepeople people are an excellent and professional agency but surely bringing web developers to Brighton is a coals to Newcastle situation?

Councillor Ted Kemble, Brighton & Hove’s cabinet member for Enterprise and Employment said: “The cultural, creative & digital media field is often highlighted as a key growth area in Brighton & Hove“. It’s disappointing that these nice words didn’t show forth in this purchasing decision.

I figured this out by doing an NSlookup on the domain (resolves to 83.138.151.149) followed by a whois on that IP which gives you 161529-web1.lawtonware.co.uk, one of fivebyfives servers. This raises the further question as to why the council are paying for hosting on such a simple site when they have so much expertise and infrastructure in house.


readersharer – an easy way to share your google reader feeds.

Posted: May 26th, 2010 | Author: Andrew Hancox | Filed under: Coding, JavaScript, PHP | 2 Comments »

Well now my excitement over the election has died down a bit I’ve had a chance to write a web application that I’ve wanted for ages. At the weekend I was chatting with a friend about what feeds I subscribe to in google reader and the fact that there’s no built in functionality to share them (just individual items) so I’ve built a web app to do it.

The application’s homepage is here, you can share your feeds here and view mine here.

The application is written in PHP and uses curl to access the unofficial google reader api, bit.ly to shorten URLs and MDB2 to persist stuff to a MySQL back-end, the sign up is implemented as a single page that makes lots of ajax calls. Developing in PHP was a great experience and a particular breath of fresh air after the trials I’ve endured lately with VB/WebForms, I was expecting the toolchain to be weak but eclipse, xampp and xdebug left me extremely impressed.

At the moment the app ignores any folders you’ve defined in reader, this is a feature I’ll be implementing soon.

The issue with the app that really bugs me is the fact that the google reader api doesn’t support openID or oauth so I’ve been left with no choice but to use the notorious password anti-pattern where I require users to supply credentials to a site that’s not my own. I’m disappointed that I had to do this but all I can say is that I promise you I will do no evil don’t retain your password once I’ve authenticated you and only ever hold it in memory – I also make it extremely easy to entirely delete all the information the app stores about you.

The tricky bit of this project came when I had to find a way to simulate a cookie in curl, the only approaches to this I could find described having a text file used as a cookie store, eventually I came up with the idea of manually modifying the request header:
curl_setopt($ch, CURLOPT_HTTPHEADER,array(‘Cookie:SID=’.$SID));

The only other thing that really slowed me down was dreamhost not supporting £ signs in SQL passwords, that left me incredibly frustrated for a while!


Millionaires in the cabinet?

Posted: May 18th, 2010 | Author: Andrew Hancox | Filed under: Politics | 1 Comment »

Not all discussions can fit into 140 characters, so since Ben Duncan has blogged about the high proportion of millionaires (75%) in the cabinet, something he, Luke Walter and I ended up discussing – I feel the need to clarify my arguments.

Lets take a few numbers for a thought experiment. According to zoopla the average value of a property in my postcode – BN3 – is £290,803. The Parliament website puts the average age of an MP at 50. I’m going to allow for late starters and assume they got on the property ladder by the age of 30. As a rule of thumb we know that property prices have doubled every ten years. Putting these numbers together this means that this average house was worth £75,000 when our MP purchased it, a mortgage it’s reasonable to assume he could have paid off in the last twenty years. Now assuming out model MP is married and he and his wife both inherited half of their parent’s average value home they are currently worth £600,000 – two thirds of the way to being a millionaire – in property alone whilst simultaneously being entirely average.

In summary, you only have to be a third wealthier than average to be a millionaire as a 50 year old man living in BN3. In order to be elected as an MP you need to be better at organising a campaign, managing people, balancing budgets and (in most cases) charming people, than those you are standing against. People in possession of these skills and a sufficient investment in main-stream society to stand for parliament would have previously achieved above average professional – and hence financial – success.

So, now we can move on from wealth there are things I’m more concerned about. At the moment 28% of MPs are women, the average age is 50, in 2005 2% of MPs were from ‘ethnic minorities’, in 2009 1.7% of MPs were gay; these figures are where the real problems lie.

Panicking about most MPs being, at least moderately, financially successful is absurd and clouds the real issue. I can only assume that this rhetoric in the Green party is born of the redder elements within.


Andrew Hancox – Web opinioneer

Posted: April 30th, 2010 | Author: Andrew Hancox | Filed under: Politics | No Comments »

The excellent News From Brighton asked me to stand alongside Miles Cheverton and Dan Wilson in saying how I’ll be voting in this election – the full article, which is well worth reading, is available here but those who don’t want their mind polluted by left wing views can read a defence of my Conservatism below:

I’ll be voting Conservative in this election because I strongly believe in both their ethos and policies. The ethos of the party for me is defined by three concepts:
Egalitarianism – people are entitled to universal equality of opportunity; this is an area that the party has an unjustifiably poor reputation on.
Personal responsibility – the government should not intrude in our lives more than necessary, people should be encouraged and empowered to put something back into society, this is reflected in the, admittedly buzzword heavy, Big Society policy package.
Pragmatism – there is space for idealism in politics but we live in a less than ideal world and policies need to reflect that; Bismarck described politics as the art of the possible, something we would do well to remember.
There are two key policy packages I particularly support. Conservatives acknowledge that we cannot entirely put the genie back in the bottle when it comes to energy use and that nuclear power is one of the key ways forward. Getting people in to jobs and keeping them there is the only way we will weather and turn around the current economic situation and Conservative policies reflect this. The Liberal Democrat policy of raising the minimum wage and the Labour policy to raise national insurance are superficially attractive but would cause a huge reduction in the number of entry level positions and cause large numbers of redundancies whilst drastically increasing the wage bill of the NHS and other public sector organisations.


voteforpolicies.org.uk and the undeclared interests

Posted: March 29th, 2010 | Author: Andrew Hancox | Filed under: Politics | 9 Comments »

We are currently in the frenetic build up of what will apparently be the first digital election and some fantastic stuff is happening. One of the innovative sites that has caught my eye has been voteforpolicies.org.uk. This is an excellent site, well designed and with a clear use case – you can see what proportion of people agree with whose policy and then complete the survey yourself. The current results have the Green party whose pet policies include capping incomes and building wind farms in national parks (matlock moor) coming out overwhelming and without exception on top.
Surprised that 31% of the respondents seem to support a party that currently has no MPs I decided to have a quick dig. The about page lists three people – two of whom are (clearly talented) developers at Makito Labs, the third, however, is Matt Chocqueel-Mangan and after a quick look at his blog it’s really not hard to see why the results of this survey may not reflect the reality. You don’t need to look beyond the blogroll which exclusively links to organisations beloved of the Green Party faithful (Economic & Social Research Council, The Inequality Trust and The New Economics Foundation) to see that this man is, if not a fully paid up member of the Green Party, then strongly aligned to their ways of thinking. Having had to read books on survey design for post-graduate studies I’m aware that it is incredibly easy to unintentionally introduce bias to a survey (wikipedia discusses this) and would be interested to know what, if anything, Matt did to prevent this. I’m not saying that Matt (@mattchoc) has intentionally misled anyone but if credence is going to be given to cottage-industry social media experiments like this then we all need to look at the people behind them and consider any bias they might unintentionally or otherwise bring.
Alongside issues of survey design it is also important to consider the fact that this website has spread virally. Anything that spreads in this way will by definition, at least initially, favour the demographs of it’s owners, spidering through their social graph first which will, if they’re politically active, skew the political impartiality of the respondents. Once the results of a survey have skewed in one direction it would be easy for those who are presented with the current results to be discouraged from completing it if they know they will disagree, or skew their answers to conform.
Techeye suggest that “only close political followers would immediately recognise which options belong to which party”. The fact that the policies are not easily tied to a particular party implies that headline policies may well be avoided for the survey presenting an incomplete picture to the respondent.
The methodologies behind polls by independent organisations such as MORI and Populus will be extremely complex in order to scrupulously avoid bias of any form. Giving results from experiments like this too much credibility could easily be a mistake.


Nancy Platts (@Nancy4Brighton) whatever I said, whatever I did I didn’t mean it.

Posted: March 24th, 2010 | Author: Andrew Hancox | Filed under: Brighton & Hove, Politics | 5 Comments »
Since my last post praising Nancy Platts (@Nancy4Brighton – Parliamentary Candidate for Brighton Pavilion) engagement with twitter she has blocked me and Luke Walter (@lmwalter)  - a Green Party member and blogger. I’ve chronicled my only interaction with her here and Luke’s conduct on twitter seems impeccable so I can only assume she just doesn’t like dissent in public. Twitter’s strapline is join the conversation and if Mrs Platts wants to do so effectively she’d do well not to block those who engage her in friendly debate. If you engage with people – including your detractors – effectively and in public others will see and you will gain credibility, block friendly dissenters and you will look like a faker.
I’ve emailed Nancy and had a good response which I will comment on soon.
If your interested in Brighton and Hove’s Parliamentary candidates on twitter then take a look at BriPolTwit.
22/3/2010
Nancy,
Following our exchange on twitter on March the 18th I seem to have been blocked from following you. I’d appreciate knowing why this is. Did I offend you? If so I’m very sorry, and would be happy to apologise publicly if you point to a specific issue(s) – you might have guessed I’m not one of your party’s faithful followers but I’m making an effort to engage with the political process and don’t intend to make enemies in doing so.
Being a web developer twitter is of particular interest to me and I’m really excited to be able to engage with you through it (as I said “Thanks for replying though – nice to be able to engage with you”). I genuinely appreciated you responding to me via twitter and felt great debating with you.
Yours
Andrew

Nancy Platts – Hypocrite when it comes to universities but good on twitter

Posted: March 18th, 2010 | Author: Andrew Hancox | Filed under: Brighton & Hove, JavaScript, Politics | 2 Comments »

I just engaged with politics and I feel invigorated! I read about Labour eroding university funding while capping tuition fees and raising student numbers and then low and behold Nancy Platts, one of my local Labour parliamentary candidates, brags about standing tall alongside her pals in academia. Brilliantly popularist, cynical and hypocritical so, being a reactionary, I lazily retweeted a comment by Charlotte Vere (a local Conservative candidate – @CharlotteV) and ended up having a great back and forth – which I like to think I won.

Inspired by this I’ve knocked up an incredibly basic page which uses the Twitter API to check the vitals of Brighton & Hove’s prospective parliamentary candidates here: BriPolTwit – Let me know if I missed anyone out. Nancy Platts (@Nancy4Brighton) and Charlotte Vere (@CharlotteV) seem to be the key players at the moment.
Obviously this is amateurish in the extreme next to the amazing work at tweetminster but it told me what I wanted to know about local use of twitter in politics.

Anyway, for those who missed one of the transformative political debates of our time I’ve pointlessly reproduced it below:

  • @Nancy4Brighton: Proud to stand in solidarity with UCU & students at Sussex Uni. In interview with Reuters called for transparency in consultation process.
  • @andrewhancox: but these are Labour cuts?! Should you be standing for another party?!
  • @Nancy4Brighton: they are also due to the mismanagement of Sussex Uni finances in the past. I will stand up for staff & students.
  • @andrewhancox: It’s easy to lend support directly to the electorate – harder and less rewarding to empower and fund universities. Thanks for replying though – nice to be able to engage with you – more than @CeliaBarlowMP managed.
  • @Nancy4Brighton: Managers at Sussex have admitted verbally that things could have been better managed in past when more funding was available
  • @andrewhancox: The banks got bailed out after decades of epic fiscal irresponsibility but with universities you put the boot in. Strange.
  • @Nancy4Brighton: I think you’ll find I have been equally robust about the greedy bankers!
  • @andrewhancox: The sins of the party are visited upon the MP and your party is really damaging our universities.
  • @Nancy4Brighton Labour govt has delivered 25% more funding since ’97 & more students than ever before have gone to university.
  • @andrewhancox: While funding rose 25% Applicants have risen 38%. If you want 50% going to uni then put up or shut up.
  • @Nancy4Brighton: Interesting approach to influencing!
  • @andrewhancox: You’ve lost me with that last message. Are you resorting to non-sequiturs?
  • @Nancy4Brighton: Hem on my trousers has come down. Not helpful. Can’t sew. What’s the name of that stuff you can iron on?
  • @andrewhancox: Wondaweb (just to show there’s no hard feellings)

TDPG.GeoCoordConversion goes open source

Posted: March 10th, 2010 | Author: Andrew Hancox | Filed under: .Net, Coding | 1 Comment »

The company I currently work for (TDPG) has formulated an open source policy that will allow it to release selected non-strategic elements of it’s code under GPL v3. This occurred in response to my experiences building a .net library and finding as part of my research that many people were looking for exactly the tool I was constructing.

The library is a simple tool to convert between geographic coordinate systems (OSGB36, WGS84) but can be expanded as people require. Knowing my code would see a wider audience sharpened my mind and I hope that my unit tests and use of fxCop have left me with something people will have faith in. The project’s home page is on google code at http://code.google.com/p/geocoordconversion/ where you can get the source code or compiled DLL. I hope this will be of some use to people.


My first browser extension

Posted: March 5th, 2010 | Author: Andrew Hancox | Filed under: Coding, JavaScript | No Comments »

This week I built my first browser extension, I targeted Chrome since that’s the browser I use at work.
The extension I built adds a button to the side of the address bar which pops up a list of all the double click ads in the current tab.
The plugin uses three major features of chrome extensions:

  • Content scripts: A content script is a script or CSS file that gets injected into the page being viewed in the browser. You define them in the manifest file:
    "content_scripts": [
    {
    "matches": ["http://*/*", "https://*/*"],
    "js": ["jquery-1.4.2.min.js", "getdoubleclicktags.js"]
    }
    ]

    The matches line tells the plugin which pages to insert the script into (all in this case) whilst the js line lists the javascript files to include.
  • Browser action: This is a simple way to add a button to the button bar and associate an action with it. These are also defined in the manifest file:
    "browser_action": {
    "default_icon": "icon.png",
    "popup": "dostuff.html"
    }

    The default_icon line gives a png file to use as an icon and the popup line gives the html file to render when the button is clicked. It is important to realise that the html file rendered is in a completely seperate context to the page in browser so in order to access the current tabs DOM you need to use some messaging functionality built into chrome, this brings us to the third feature I used.
  • Message passing: Chrome provides a facility to pass messages between tabs and popups. The first step is to create a handler in a script file in one of the content scripts:
    chrome.extension.onRequest.addListener(function(request, sender, sendResponse) {
    if (request.action == "getDoubleClickTags")
    sendResponse({action: GetDoubleClickTags()});
    else
    sendResponse({action: 'invalid'}); // Send nothing..
    });

    chrome.extension.onRequest.addListener is adding a listener to the current page, it will receive a message, inspect it’s action and then act accordingly – in this case if the action is getDoubleClickTags it returns the result of GetDoubleClickTags().
    The second step is sending a message to the listener from the html file we’re popping up:
    chrome.tabs.getSelected(null, function(tab) {
    chrome.tabs.sendRequest(tab.id, {action: 'getDoubleClickTags'}, function(response){
    DoStuff();
    });
    });
    });

    The outermost method call chrome.tabs.getSelected gets the active browser tab passing it through to the inner function as the variable tab. The next outermost method call chrome.tabs.sendRequest sends a request to the tab stating the action we wish to perform, finally we specify a callback function which receives the result of the request and does some work with it.
    In order to make this all work we need to state in the manifest that the plugin will have permissions to use the chrome.tabs namespace, this is done in the manifest:
    "permissions": [
    "tabs", "http://*/*", "https://*/*"
    ]

I’m going to see what I can do about getting the entire extension open sources – although it’s pretty rough at the moment.