Blog
Blog
end

Ed Miliband Pep Talk

May 22nd, 2014

Ed looked like he needed a bit of a pep talk and some encouragement, so I thought I’d send him some. I highly doubt it’ll make it as far as his desk, but oh well, it made me feel better.


Hi Mr. Miliband,
Re: Public Far to the Left of Labour Party Finds Poll
I would like to hear your comments on this article – it would seem to indicate that many voters support a much further left, socialist agenda. You now have a massive opportunity to restore this country to its rightful position as a socialist, liberal democracy.

When will you be anouncing concrete policies along these lines? I want to see renationalisation of… well, pretty much everything the Tories and New Labour have privatized, starting with the rail network and utility companies. I don’t just want price controls on energy, I want state ownership of all utilities. Your policies do not go far enough, and that is why you are failing to establish a strong lead over the Tories – because people don’t see you as being any different.

Now is your chance to begin to rectify the impact of decades of self-serving free-market arseholery in politics. People take your point on the cost of living crisis, but they want to see radical action to tackle it. I mean seriously radical – step changes are no longer sufficient.

What is stopping you from doing this? You may never get another opportunity. I think you’re generally a good bloke, but you seem to lack the confidence to choose a direction and push things towards it. Nobody expects you to be able to answer every question perfectly, but for god’s sake if you don’t know something, just say so, bluntly as a matter-of-fact. People want to see humanity in politicians, because it seems to have been lacking for so long. You can’t fake that – the only way to get people on your side is to be ruthlessly honest, both to yourself, and to the public.

Please don’t fight the general election on the basis of “at least we’re a little better than the Tories”. If you’re to achieve a landslide majority, we need way better than that.

Here’s a tip for a great publicity stunt – perform a citizen’s arrest on Blair. The grassroots liberal left will love you for it forever. Only joking, I know that’ll never happen, but it wouldn’t hurt to more vigorously distance yourself from that man.


My thoughts on democracy

May 22nd, 2014

What we have in this country (and in America) is supposedly a system of democracy. According to Wikipedia: “Democracy is a form of government in which all eligible citizens participate equally”.

By that definition; what we have isn’t democracy – clearly politicians and the media play a much bigger part in the process than the average Joe – it’s really a case of “some are more equal than others”. What we have is an elected oligarchy – power is concentrated in the hands of the few, but the public do have some say over who those people are, and the few are supposed to represent the views of the public. It doesn’t seem to be working very well though – the public feel they have limited influence over our elected representatives once they’re in power, and in many cases the choice at election day feels like a false one.

On election day, each person’s individual beliefs and choices must be condensed down into a selection between a number of candidates. In my case, my political views are most closely aligned with the Green party – but even then there’s a problem – well, two problems actually. The first is that, depending on the constituency you live in, the party who most closely represents your views may have absolutely no chance of winning your seat – so then you’re left with a choice between voting for what you believe in (and wasting your vote), or voting tactically to avoid the worse of two evils. If you live in a safe seat for one of the major parties; your vote is basically worthless anyway so you might as well not bother. Proportional representation (proper PR, not the weird, wonky version cooked up by the Lib Dems) would go some way towards fixing this problem, and in my case I was lucky anyway because I was in the Brighton Pavilion constituency and Caroline Lucas of the Green party actually did win their first ever seat here. However, the problem remains – the choice we’re offered at the ballot box is not a free choice, there are constraints placed upon it by our broken electoral system.

This leads me onto the second, more serious problem with our party political system – what if there is no party that is aligned perfectly with my views? In my case the issue is over Nuclear power – I agree with pretty much everything the Greens say, until it comes to the issue of Nuclear power; where I am strongly in favour, and the Greens are still mostly against. I feel strongly enough about this issue that it’s almost sufficient to disqualify the Greens from receiving my vote.

This puts me in the position where, no matter who I vote for, I still feel like I have to betray some of my own beliefs in order to do it. There is no candidate or party that I can vote for, and feel confident they will represent my views in the house of commons. This is leaving many ideological young people feeling completely disaffected by the whole political system, many view it as something that’s not designed to serve them, and don’t feel that their vote will have any influence – so they don’t vote. It’s sad, because these people do have political views, they do care, they’ve just lost hope in their democratic system to deliver any kind of engagement for them.

Our political choices are largely spoon-fed to us via the machinery of party politics, and the media’s portrayal of it. But even once we’ve made the decision to vote for a political party, and even if the political party we voted for wins, we often still don’t feel happy with the way they’ve represented us in parliament. Looking back at Blair’s first election victory in 1997, I remember people being very excited for change when he came into power, and I remember that excitement gradually draining away over the course of his reign, as we realised that many of his decisions were “antipathetic” to the views of those who elected him.

So, even once we’ve elected someone we feel happy with (such as Blair in 1997), we often don’t get what we bargained for. This is because politicians are people, and people can be influenced; by the media, by other governments, by lobbyists, by god, by anyone, and those people can get it wrong – both in terms of taking the wrong decisions, and also in terms of failing to represent the portion of the electorate who voted for you. Blair went to war against the wishes of most of his supporters, Clegg allowed the coalition to raise tuition fees, despite it being one of his primary manifesto commitments not to do that. It just leaves us feeling cheated by the whole system, and for some people it makes them withdraw from it – resulting in an even less democratic system.

Increasing numbers of people are disengaging with democracy and seeking alternative mechanisms to get their views across. I’m thinking about the Occupy movement, as well as the riots, and the fracking protestors, and the no-dash-for-gas protestors. In some cases it’s successful, others not so much. We’ve always had protest, of course, but there are times in history when protest reaches a climax, and the tectonic plates of society gradually begin sliding towards a new world order. I believe now is one of those times.

It’s all very well complaining about the state of the current system, and I’m sure I’m not the only one to do that – but not many people have a coherent solution – it was a critisism often levelled at the occupy movement – they knew they weren’t happy with how things were, but didn’t really know what to do to fix it.

Well I have a proposal that I would like to raise for consideration and debate – as I see it, the biggest problem with our democracy is that we’re voting for parties and personalities, not policies. We vote-in a party, and then have to trust them to act for us in the house of commons, often they let us down. What we need in order to fix this, is a system of voting whereby we vote for the policies, not the parties. I’m advocating a system in which every bill that passes through the house would trigger what is effectively a referendum.

In my proposed system, the political process would continue as it is, with parties elected and bills raised in the house in the way they are now, but at the end of each debate, when the division bell rang; instead of the archaic Harry Potter-esque ritual that occurs at the moment, the vote would instead be put to the public, via an online voting system. Members of the public would be able to vote on the bill, as if they were a member of the house of commons, but they’d be able to do it in a couple of minutes in their own homes from any internet-connected device – and the vote of the public would be binding. Government would become purely an administrative body (the Admin Bods, as Russell Brand puts it), all the decisions would be made democratically by the people, not a select ordained few.

This has been technically possible for a while, but I think we’re probably a long way off it actually being implemented. The electronic voting saga of the US elections and our government’s persistent failure to ever deliver an IT project that actually works will probably make this impossible for the foreseeable future. However, I believe it is the only route to true democracy. An elected dictatorship is not a democracy, a democracy is a society in which the people have the power of self-determination.

That we should be grateful for the chance to choose our dictator is absurd. Absurd and unnecessary. We do not need to nominate someone to make our decisions for us, we can make them ourselves. The internet makes this a practical reality – but as far as I’m aware, I’m the only one pointing this out.

You may say that the public is ill-equipped to be making important decisions about the future of the country, but I would counter that by saying that they can do no worse than the terrible decisions being made by our current political class. Furthermore, if decisions were fully representative, the bias towards the rich and powerful in politics would be removed – this would result in more decisions that benefit the “greater good”.


jQuery 1.9 takes away live() – I put it back

January 8th, 2014

Sometimes it’s annoying when a function you’re using all over your code is depreciated and then taken away, and the reasons for it having been taken away don’t warrant the effort required to go through and rewrite everything to work with the new function. For me, on a project I’m working on at the moment, that was the case with jQuery 1.9 and the live() function. The effort required to change every instance of ‘live()’ to ‘on()’ in our code simply wasn’t worth it – it doesn’t actually gain us anything perceivable in terms of a benefit, and would’ve taken a few hours to do. I set out to find a quicker solution – it seemed obvious that since the functionality of on() is basically equivalent to the functionality of live(), it should be relatively easy to write a wrapper function so that any call to live() becomes a call to the new on() function, without having to actually change any of those function calls.

Turns out, that’s exactly what jQuery 1.8 does for you, they just removed this functionality in 1.9. It’s therefore very trivial to put it back in, simply add this little block of code immediately after loading jQuery – you will then be able to carry on using live() in jQuery 1.9 (and probably beyond):

(function( $ ) {
	// jQuery 1.9 takes away live(), I puts it back. ~Kieran Simkin
	if (typeof($.fn.live) != 'function') {
		$.fn.extend({
			live: function( types, data, fn ) {
				jQuery( this.context ).on( types, this.selector, data, fn );
				return this;
			}
		});
	}
}(jQuery));

Apparently the economy is recovering…

August 14th, 2013

Inflation has fallen back from its recent ridiculously high rate, house prices are on the up again and unemployment continues to fall. Apparently this is sufficient for the Tory bastards to declare that the economy is “off life support”. Nevermind that inflation is still at 3%, with actual take-home pay falling in real terms, nevermind that the unemployment figures obscure the real truth that many people are being forced off benefits and into the grey market economy or into underpaid jobs which leave them deeper in poverty and forced into the hands of payday lenders, food banks and loan sharks.

This “recovery” is just manipulation of the figures by a devious government of con men, embezzlers, liars and cheats. These bastards are in league with the banksters and the corporate fat-cats in an unspoken conspiracy to concentrate wealth and power in the hands of the few. For a true recovery to happen; we need to take the vast fortunes these bastards have amassed at our expense, and redistribute them to the poor sods who’ve been screwed over by them. We need to take back democracy and make it work for the people, instead of allowing the continuing charade of false choice between a lineup of elitist criminal scumbags.

What I still don’t understand though, is why everyone seems to think rising house prices are a good thing – for people like me who’d love to get on the property ladder, but can’t, rising house prices is the last thing we want. What would absolutely make my day is if there was a complete collapse in the housing market, such that houses were selling for their actual value, rather than some arbitrarily inflated figure plucked out of an estate agent’s asshole.

Sure, a collapse of the housing bubble would leave a lot of people in negative equity – but at the end of the day it’s their fault for buying something at a price which they knew to be vastly overinflated. Can I interest you in a £200,000 tulip anyone? Greater fool theory is no way to do business. Besides, if people actually bought their house for the purpose it was intended – ie, to live in, and they can afford their mortgage repayments, then what does it matter if they’re in negative equity?

If you want to gamble on the markets, there are a plethora of fun and exciting financial derivatives you can buy. Go buy some CFDs, or binary options if you wanna tie your fortunes to the arbitrary value of some abstract financial entity, hell if you want an investment just go and buy some stock in a company or some government bonds. Just don’t buy a house as an investment, it’s not fair on the rest of us who just want somewhere to live that we can call our own.

If the government were actually building more social housing, which I would consider a very good thing, then the effect I would expect to see on the housing market is a decrease in prices. The persistently rising house prices are a symptom of a chronic lack of decent quality affordable housing – if you ask me that’s a negative indication of the state of the country, not a positive one – it’s simple supply and demand economics – supply is failing to meet demand, so the price is becoming inflated beyond the true value of the asset, due to its scarcity. Why do these asshat politicians persist in the delusion that rising house prices are a good thing?! That attitude is just pushing us deeper and deeper into a housing crisis and creating a neo-feudal system of property owners and serfs.

I don’t like being a serf.

 
When I talk about redistributing the wealth – I don’t mean directly putting it into the hands of the poor (although a little bit of that wouldn’t hurt). What I’m actually talking about is taking a large portion of the private fortunes amassed by these corporate hags and investing it in civic infrastructure and social projects that benefit everyone. New museums, libraries, parks, subsidized (and renationalized) public transport, free high speed broadband access for all (and a renationalized British Telecom), investments in renewable and carbon-free energy infrastructure (and a renationalisation of the energy and utility companies), a return to student grants rather than student loans, increased availability of grants and loans for small businesses – and of course a massive social housing building project.

All the public services that the Tories have sold off over the years to their corporate scumbag mates – let’s take them back and run them for the benefit of the public rather than for the benefit of a select few corporate fat-cats. Fuck buying back these services, let’s just take them – who cares if the companies who owned them go bust as a result? They deserve it, they’ve been screwing us for years.

Let’s just bulldoze the docklands and replace canary wharf with council housing. It’s the banksters who are the real leeches on our country, not benefits claimants.

Oh well, I can dream can’t I?


A message to Maplin Electronics

July 11th, 2013

When is Maplin going to reverse the trend of downsizing and closing the in-store parts counters?
In the Brighton store, the parts counter used to run along the entire side of the shop, with row after row of component drawers, and a helpful old guy who’d talk through your project with you and help you select the correct components.

Now Maplin is becoming more and more like a consumer electronics store, more like Dixons or PC World, and the parts counters are disappearing – they have been gradually for years.

We don’t need another consumer electronics store – and besides, that’s a dead-end business now anyway, people treat high-street electronics stores like showrooms where they go and try out the product, only to buy it later on Amazon or eBay for a lower price. There may be money in high-street consumer electronics right now, but there won’t be for much longer, trust me.

The one thing that cannot be replicated online is the face-to-face contact with an experienced electronics engineer on the parts counter. Plus I think it much less likely that people would go into Maplin, seek advice on a project and then go home and buy the parts online – if you’ve gone to the trouble of going to the store and discussing your project with the guy in there, you’re not going to then go home and put your parts list into Farnell and wait for the delivery, only to save a few pence if you’re lucky.

I think a return to your geek hobbyist roots is the only way Maplin will survive long-term – and it’s a growing market at the moment, with the Maker movement and suchlike – there’s an increasing interest in DIY electronics projects. The margins may be smaller on components than on ink cartridges, but I think if you were to fully stock your stores with a broad range of components (unlike the measly offering at the moment), and hire the experts to work on the parts counter, I think you could make up for the lower margins by increasing volumes. Plus you’d be selling to interested and knowledgeable hobbyists rather than idiots who haven’t realized you can get printer cartridges online for half the price you sell them in-store. Surely there’s gotta be more satisfaction selling a good product to an informed customer, rather than selling overpriced crap to morons?


My thoughts on 3D printing and the upcoming manufacturing/supply chain revolution

July 9th, 2013

I wrote this as a forum comment and thought it was worth posting here too:

Traditional manufacturing is at the beginning of a terminal decline globally – this is expected and not necessarily a bad thing. Over the next few years we’ll see a move towards manufacturing being done much more locally to the consumer (in some cases even in their own homes on 3D printers) and also much more personally for each individual consumer. Large factories will eventually become a thing of the past and the supply chains they create will become obsolete as items will be created on-demand, much closer to the point of sale. There will also be a change in the items being manufactured – we’ll be individually customizing the products we buy to a much finer degree, and designing our own one-off modifications of many products. Eventually we may not buy products at all, but simply pay for the design which we would then produce (or have produced) at home or in our local 3D printing shop.

3D printers are the enabling technology for this revolution (I’m mainly thinking of SLS here rather than the nasty plastic crap that’s produced by extrusion-based home printers). CNC is also important. If you don’t see the massive disruption these technologies will cause to manufacturing, you haven’t properly understood the technologies, or existing manufacturing and supply chain processes.


Let’s leave Europe to lie in its bed of shit

May 15th, 2012

I’ve always been pro-Europe. I like the idea of everyone working together for the common good.

Today, I changed my mind. Why, you ask?

Well, I’ll tell you. It’s because of the EU cookie monster. Today I encountered my first website with an obtrusive cookie warning all over it. The text of the warning reads:

“www.cambridgeshire.nhs.uk has placed cookies on your computer, to help us improve the website and your experience using it. You may delete and block all cookies from this site, but parts of the site may not work. To find out more about the cookies we use and how to delete them, see our Privacy policy”

This is going to be something you see a lot. Pretty much every website on the web uses cookies, and the EU has now mandated that every website that uses them carry a warning. It’s completely fucking redundant and stupid. The thing that amused me slightly was that the warning itself uses cookies to remember when you’ve hidden the warning, so if you’re stupid enough to disable cookies, you’ll keep seeing the cookie warning over and over again. I say it amused me ’slightly’ because the amusement was completely overwhelmed by rage at the stupidity of the whole fuckin’ thing.

I’ve always ignored the reports of the EU unnecessarily regulating things that don’t need regulating (the curvature of a banana for example). I assumed they were just right-wing eurosceptics spouting shit. Turns out they were right, the EU is getting too big for its boots. Maybe it always has been, I’ve just ignored it because I like Europe on ideological grounds.

Europe is collapsing, and I think we should withdraw completely as soon as possible to avoid any more STUPID FUCKING LEGISLATION. I don’t really care about the financial crisis; it doesn’t affect me, but I do care about them insisting on putting stupid pointless warnings all over every single website that I use. That seriously angers me.

Europe has made its bed of shit, let the stupid bastards lie in it.


The EU Cookie Monster

May 5th, 2012

The EU is legislating on technology it doesn’t understand again. This irritates me.

Browser cookies – weren’t they something people used to get worried about and disable back in the 90s? (then re-enable quickly when they realised nothing works without them).

A cookie is a file, containing some data, which is stored on your computer by the websites you look at. More often than not cookies are used to allow you to login to a website – when you login, you send your username and password to the website and the website sends back a token which gives you access to the site – the authentication token is stored in a cookie, and this cookie is sent to the website every time you request a page, proving that you’re logged in. This is the only sensible way to do authentication on the web.

Cookies can also be used to track people as they browse around your website – this works by storing a unique code in a cookie on the visitor’s computer, then whenever they make a request for a new page on your website, you add an entry to a log on your server showing which pages they visited. Users are not identified by name or address – they are known only by the unique code you assign them, along with their IP address (which gives you some basic information about what part of the world they may be in and who’s their ISP). This kind of tracking is very useful for a website developer like me because it allows you to tell how people flow through your site, where they get stuck, at what point they get bored and go away etc. – it allows me to improve my site by identifying the pages that work well and improve those that work less well. In my opinion this type of tracking is completely harmless and you should just assume that any website that is worth its shit is tracking you in this way. Mine does, via the use of Google Analytics.

There is another way cookies can be used that’s a bit more sinister, and it’s this that the EU are knee-jerking against with their new bullshit law. Lemme explain it:

Typically a cookie can only be set or read from one website – if I set a cookie on my website, and one of my visitors goes to another website, that website can’t see the cookie that my website has set. This means that each site is a silo – I can track where users have been on my site, but I have no idea of what products they bought on eBay before they came to my site. This is the way it should be, and always has been.

However with social networking and the likes of YouTube and Facebook, “embedding” content has become very common and widespread. Common embedded content includes YouTube videos, the Facebook “like” button, the Twitter “follow” button, but also the Google Analytics tracking code that I use on my website, and the Google Adsense code that people insert into their website to make a few pennies selling pay-per-click advertising.

The reason this matters is that when you embed content from a third-party website, you’re allowing that website to place tracking cookies on your visitors’ browsers – the cookies will only be visible to the site that set them. So if I insert a YouTube video on my blog, visitors to my blog will not only receive my tracking cookies, they will also receive any cookies YouTube wish to set – what’s more, these cookies will be completely invisible to me because they were set by YouTube’s domain not mine. However, because that video is embedded in my website, any Javascript code within the YouTube embedded player will also be able to tell what page of my site you are on – in other words by embedding a YouTube video, I’m allowing YouTube to track what visitors do when they’re browsing my website.

Should YouTube be able to track visitors as they browse around the YouTube site? Of course. Should YouTube be able to track visitors as they browse around my site? Definitely not!

If you think about all the websites that have Facebook “like” buttons on them (it’s a lot), and consider that in most cases these allow Facebook to track everything you do whilst you’re on that site – Facebook can basically track everything you do on the internet. Google can too because of Google Analytics and Adsense, which are installed on the vast majority of websites out there. This is obviously a bit of a privacy concern.

In simple terms; this new EU law is designed to stop big companies like Google and Facebook from having too much access to our browsing habits, particularly on sites which don’t even belong to them – this is a very sensible thing to do – but requiring all EU websites to display a cookie policy and thoroughly audit their Cookie usage just to stop the big boys from gathering too much data is like napalming several hectares of forest when all you wanna do is cut down a couple of oversized trees. Grow some balls and buy a chainsaw for fuck’s sake!

Besides, I don’t like being told what I should publish on my own website. Can you imagine if every book had to contain a warning that reading in the dark might cause eye-strain, or that if you turn the pages too quickly you might get a paper cut? What if this applied not just to books, but to every piece of printed paper ever produced? It sounds absurd but that’s basically what the EU are asking people to do with websites – slap-on arbitrary and pointless warnings and opt-out clauses that nobody will ever read or use. It’s a waste of time, money and energy. Forget it. I opt-out of your stupid cookie rules.

This is a technology problem not a legislature one – the problem is that there’s no way to embed code from another website in a restricted way. I would like to be able to embed YouTube or Facebook code, but do it in a way that made it impossible for those sites to track my visitors.

I would suggest that the best way to implement this would be to add a new HTML tag (or an attribute to the <embed> tag) that would allow the tag to behave like a sandboxed iframe with cookies either disabled or restricted to the site where it’s embedded – in other words an embedded YouTube video on my site would only be able to see cookies set by other YouTube videos on my site – it wouldn’t see cookies set on the YouTube homepage, or cookies from YouTube videos embedded in other people’s websites, or any of the cookies I set myself. This would allow us to continue using embedded content without breaking the silos around each website.

Of course the people providing the embedded code snippets might need to be forced to use the new sandboxed tags rather than the older insecure ways, but at least then you’re focusing your legislation at the cause of the problem – the big companies who are embedding their code using a method which allows them to gather data which they really shouldn’t have access to.

Also I think it’s kinda hypocritical that the government(s) should be trying to take away our fundamental internet freedoms and privacies via pieces of legislation like ACTA, PIPA and SOPA, whilst trying to convince us that they’re protecting our privacy with stupid ill-thought-out pieces of legislation like the Cookie Monster. I wish politicians would just go to hell and stop fiddling with the internet, they clearly don’t know what they’re doing.


Announcing jQuery.ui.FadeOver 1.0

February 5th, 2012

One effect I use a lot in web development is what I call “FadeOver“. By this, I mean that when you put your mouse over something, it shouldn’t just suddenly change colour – it should fade to a new colour – it just looks cooler. Since I’m now moving to jQuery, I’ve thought it wise to make this effect into a jQuery UI widget and release it as opensource.

Above you can see an example of the widget – the text with the blue flame is done entirely in CSS, no images involved, FadeOver simply fades between stylesheets with different CSS text-shadow values. The buttons below to enable and disable the widget are also FadeOver widgets themselves, although they look exactly like jQuery UI buttons, if you play with them you’ll notice they fade between colours when they change state rather than just flicking between colours instantly. It’s a subtle difference, but touches like this make all the difference in my opinion.

Click here to see more examples or download FadeOver to use it yourself.


Announcing jQuery.ui.MediaSlide 1.0

January 22nd, 2012

I’ve been using the jQuery Javascript library a lot recently, although this website is actually done entirely using jQuery’s biggest competitor; Prototype+Scriptaculous. A few things have convinced me that jQuery is better:mainly jQuery UI (particularly the theming), also the level of abstraction is nice – you’re almost not writing Javascript anymore, you’re writing jQuery – that’s a good thing (Javascript smells bad). jQuery’s documentation is better too, and there seems to be a bigger community surrounding it.

Furthermore, jQuery UI’s widget “factory” makes it very convenient to create standard web controls that can be easily used by anyone.

I therefore thought it would be appropriate if I ported the cool image gallery slider thingie from the gallery part of my website from Scriptaculous into jQuery, and released it as an opensource jQuery UI widget that anyone could use. That is what I’ve done, it’s called MediaSlide, licensed under my 1-clause Javascript BSD license. Visit the MediaSlide project page now for more details (including the code you need to add a MediaSlide to your website), or have a play with the example below to get an idea of what it does:

The widget you see above is a minature version of MediaSlide – it loads the image list directly from my Flickr feed – the images and thumbnails themselves are loaded directly from Flickr too. You can use Flickr feeds to populate MediaSlide with images, or you can use your own XML or JSON feeds. Consult the comprehensive MediaSlide documentation for more information.