Uncategorized

PHP Vacancy

We’re hiring for a Software Engineer at work to join our technical team based in Birmingham city centre (Jewellery Quarter). If you’re looking for a challenging PHP role and you think you might fit the bill, please do drop me a line with your current CV. Full job specification below. Please don’t be put off by the crappy website, we’re literally just about to launch its replacement :)

Glide is a rapidly growing energy and telecommunications company specialising in looking after tenants, landlords, letting agents and property investors across the UK. They supply gas, electricity, telephony and broadband services to residential and commercial customers.

About Glide

They believe in hard work in an informal atmosphere that encourages people to express their ideas. They look for talented people who want to work with technology and can tackle problems in a smart and creative way. Their employees enjoy working in a challenging environment that brings out the best in them. Customers and customer service are at the heart of everything they do – their business revolves around their customers.

They have their own in-house development, customer support and sales teams and remain focused on keeping their costs low through automation and keeping customers informed through good communication. As technology evolves, they aim to bring new and improved services to their customers as early as possible.

About The Role

They currently have an opportunity for a full-time senior software engineer, starting immediately, as part of their in-house software team.

The role will focus on developing their bespoke systems. Their systems are written in object-orientated PHP with a SQL database. You will need to be a highly competent programmer  in PHP, SQL, Javascript, AJAX, Smarty templates, Model-View-Controller and in documenting your work. Good familiarity with Ubuntu/Debian based systems is required. Experience with invoicing routines, SVN or accountancy systems would be useful.

The role will involve working on projects to develop existing products, launch new products and services, improve internal customer service systems, update and maintain accountancy systems and invoicing scripts, debugging and diagnosing problems with their existing code base and working closely with their customer service teams. The role also includes integrating their system with multiple third party suppliers, redeveloping customer portals and revamping their website.

You will be enthusiastic about new technology, eager to learn, and will hold a degree in Computer Science or equivalent. You will be capable of managing your own time.

Application Details

The company is a place where everyone can be heard. If you like the sound of this opportunity, they’d love to hear from you. Please direct your communication and correspondence through my team or direct to me. Please view the website at www.glide.uk.com for more background information to assist you with your response.

Uncategorized

Technical Notebook

If I have any regular readers, they will have noticed that I’ve started to use my WordPress as a notebook as well as a blog. This site is more or less a general dumping ground for my online stuff that I’m willing to show the world. If you don’t understand it, then don’t worry about it.

Uncategorized

Gracefully degrade HTML5 “number” form elements

Use Modernizr to replace the a “number” INPUT element with an normal text box and two control buttons in older browsers:

if (!Modernizr.inputtypes.number) {
	document.write("<button type='button' onclick='number_field.value = parseInt(number_field.value) - 1'>-</button>");
	document.write(" <input type='text' size='10' id='number_field' value='0' /> ");
	document.write("<button type='button' onclick='number_field.value = parseInt(number_field.value) + 1'>+</button>");
} else {
	document.write("<input type='number' size='10' id='number_field' value='0' />");
}

Uncategorized

Ternary PHP short-hand if/else statement

Saves using a cumbersome multi-line control structure for simple conditions like this:

// normal control structure
if (statement) {
	$variable = true;
} else {
	$variable = false;
}

// short-hand equivalent
$var = (statement) ? true : false;

// useful return statements in functions
return (statement) ? true : false;

Uncategorized

No to the Alternative Vote

On Thursday 5th May there is a referendum on whether or not the United Kingdom should adopt the instant-runoff (“Alternative Vote”) voting system in place of the “First Past The Post” (FPTP) system that’s currently in use. There are rigorous campaigns for and against this, both from various political parties and from other campaign groups.

Having carefully considered each argument I’ve come to a decision on how to vote on 5th May and I wil be voting “No”. Here are the reasons why I have reached this decision. You may wish to note that none of these reasons are political. I don’t care about any of the party positions. I will admit that the party that I’m a card-carrying member of has a consolidated “no” position, but this had no bearing on my decision.

  1. The instant-runoff system, whereby you “score” the entire list of candidates in order of preference, is the same system that Nominet and the British Computer Society use for various internal elections, so I am familiar with using it already. Here’s the blunt truth about using it in practise: After I’ve marked my second preference, I really don’t give a monkeys about the remaining six candidates and so I assign their numbers arbitrarily, almost randomly. I expect many people will do the same if this system is adopted for parliamentary elections.  Such “votes” that make up the numbers in this way are at best a waste of time and at worst could give a candidate or party more representation than people actually wanted.
  2. It makes what is currently a very simple voting system (marking a sheet of paper with a cross, even illiterates can do it as long as they have someone to tell them which candidate is which) with one that is much more complex and arguably inaccessible to a small handful. This will have a detrimental effect on voter turnout if people believe that the system is more complicated and therefore prone to error. Low voter turnout is one of the most crucial problems with elections these days and anything that threatens it further is unacceptable. I’ve always maintained that voting in parliamentary elections should be mandatory, like it is in Australia. At no point should it ever be possible to apportion the result of an election to any level of voter turnout.
  3. It has the potential to allow more extreme political parties to gain disproportionately more representation than they would otherwise gain. I’m actually very surprised that pro-AV groups, who are typically on the left of politics, are advocating a system that could give parties like the British National Party more power and influence.
  4. Lastly, given this country’s track record with IT projects, I have little to no confidence that the costly and complex vote counting system that will be required will be up to the job. Arguably a minor concern when compared to the others, but still valid.

I’m not saying for a minute that the existing FPTP system is by any means perfect, because it’s far from it. Indeed, I’ve often bemoaned its shortcomings following various general elections after watching in dismay as carefully planned constituency boundaries deliver election victories which they ought not to have and wouldn’t have under a “fairer” system. I just don’t think that AV is the answer to this.

So there it is, I have imparted my decision and the reasons for it. If you’re undecided at this stage I hope that the points I’ve raised help you to decide appropriately.

Uncategorized

Google Chart API PHP classes

Following on from my recent release of AGCDR (Asterisk CDR Statistics), I thought I would make an important sub-set of that project available separately. As part of writing AGCDR I wrote a reasonably extensive set of PHP classes to interact with the Google Chart API. The following chart types are supported, although some do not support all the features that the API offers:

The download contains all the classes, both in separate files and in a combined file (which one you will use will likely depend on whether or not you use class auto-loaders) plus a page of example usages to get you going.

As with AGCDR, this is currently being released as a beta so it’s not perfect and I would welcome comments, suggestions and bug reports. Please submit any comments, suggestions or indeed any code you would like to contribute via the Google Code page in order that all information pertaining to it is kept in the same place.

Here’s a gallery of examples: