Skip to main content

Tabs or Spaces?

2 min read

Good coders indent their code, as it makes the whole mess a lot more readable.

There are two ways of doing this, one using tabs, and another using spaces.

Mostly this is down to personal preference, but leads to countless arguments when tabbers and spacers collaborate on a project. Leading to the production of style guides and dissatisfaction all round.

Personally, I'm very much in the tabs camp, because:

  1. They're the semantically correct character to use
  2. They remove ambiguity, i.e. one tab per indent ("Ok, so Fizzbuzz should use spaces, but how many?")
  3. They allow a developer agency within a consistent style - some devs prefer small indents, others with huge screens prefer bigger ones. Tabs let you render your own choice, but preserve a common style.
  4. You only hit one button

Most spacers I've met are so because this was the default in their IDE and they don't like change. Nobody has yet convinced me that spaces for indents is objectively superior to tabs, and my personal view is that they're the coding equivalent of hitting enter a bunch of times in word, when what you actually want is a page break.

But, understanding is important, and I'm prepared to be convinced. So, Spacers... why?

(yes.. I'm aware this is possibly not the most important issue of our age, but I'm genuinely interested...)

Who do I vote for?

3 min read

So, we have the EU elections coming up, and we're now one year away from the UK general election.

This puts me in a bit of a moral dilemma, since I can't in good conscience vote for any of the available options. Democracy in most countries is a choice from a pre-selected list of virtually identical options; like in that episode of Faulty Towers, this is fine if you like duck (and mid term, you'll find that your promised duck has turned into trifle).

This is an illusion of choice, and whatever your choice is, it doesn't matter.

A recent study showed that the voting preference of the vast majority of voters in the US had no effect on the outcome of key policies, when compared with the voting preference of the super rich and corporations. This officially makes the USA an Oligarchy, and while a similar study hasn't yet been conducted in the UK, I can't imagine the result would be too dissimilar.

There is some merit to the argument that you should vote because the supporters of the extremist parties like the BNP and UKIP (who are essentially the BNP dressed in Big Boy clothes) always turn out on polling day. This is not entirely unlike the Allies siding with Stalin because Hitler was a lot worse; necessary at the time, but hardly a ringing endorsement... and certainly shouldn't be taken to mean that we approved of the gulags or the forced famine in Ukraine.

However, unless the voting system is PR (which the EU one is I think, but the UK one most certainly isn't), this isn't much of a consideration in any case.

So, until they put a "none of the above" option on the ballet, and unless someone has a better idea, I will be staying home on polling day. That is not to say that I am apathetic, far from it. However I think it is now clear that the vote, hard won that it is, is the least effective way to exercise political power available.

At the very least, I have stepped up my donations to organisations who lobby on issues I care about (Liberty, Open rights group etc), and I will use what skills I have to engineer the world I want to live in (for example by building tools to help people communicate freely). But right now, I can't in good conscience endorse a fundamentally flawed system by taking part in it.

These are my rambling thoughts, what are yours?

Secure social networking

1 min read

Open question: If you were designing a social network, from scratch, to be both easy to use and to counter the threat model as it is today (mass surveillance, social graph used for guilt by association, prism, etc). What would you do?

My thoughts are that distributed nodes, owned by the users themselves, with IPC using HTTPS over tor would be a pretty good start...

A question for Debian/Ubuntu folk...

1 min read

I want to add some third party software to my apt sources.list (in this case, the owncloud repo), so I add their repo so sources.list and do an apt-update.

In order to make sure that the software apt downloads is trusted and unmodified, secureApt validates the distro against a set of GPG keys you've previously trusted. So, if you're to trust a third party repo you need to add their public key to your keyring.

However, owncloud, who use the OpenSUSE CDN, force you to download this release key via HTTP (because the CDN doesn't support HTTPS).

It seems to me that an attacker could MITM this connection and make you install their key. They could then get you to install their modified software, and you'd get no warning, because it would seem legit.

Have I missed something?

Operation "Move all my crap" complete...

1 min read

... now comes operation "Watching paint dry", followed by operation "Find homes for all the things".

So, thanks to the help of Kelly's folks and an army of lovely Capoeristas, me and Kelly are now moved in to the new casa. Currently, we are camped out on the living room floor, since the paint in both the bedroom and my office is still wet.

Still, both rooms look awesome, and we should be able to start setting things up tomorrow.

Broadband is set up (as you might be able to tell), so clients, and others who are expecting emails from me, I should have my office operational by tomorrow afternoon and will be diving straight back in.

Speak/See/Email you all soon!

You won't believe what this guy did with his keyboard!

1 min read

That's right. I accidentally up-ended almost an entire mug of tea over it.

Good thing it wasn't diet coke, that stuff eats through roofing tiles. Well, actually, it probably doesn't, but it isn't good for keyboards, I know that from bitter experience.

In a separate point, why on earth are my various feeds full of stories titled "You won't believe what this [subject] did with [gender pronoun] [object]!". I mean it's clearly click bait, and clearly works, but gives everything a distinctly childish tabloid (read Buzzfeed) feel.

What are we, 12?

Stop it.

Oh my god, is this still a thing?

3 min read

So, as some of you may already know, I am shortly going to be moving into a shiny new house. This is really cool, and I'm pretty excited, but it does mean I have to go through the stressful (and decidedly first world problem) activity of setting up domestic broadband in the UK.

Holy crap on a cracker... is this still a problem?

It seems that since the last time I have tried to set up domestic broadband, some 5 odd years ago, there has been no real progress in releasing BT's stranglehold on the last mile connectivity.

So, after going through the set up process to order fibre from Plusnet, and being told that I would be set up within two weeks, I have since been told that I will have to wait a full month for the BT engineer. For most people this is an annoyance, but sadly my livelihood depends on internet connectivity, so this simply won't do.

Plusnet don't seem to have anyone manning their customer service lines, so I've resorted to twitter in order to get a response (every time I have to publicly @ a company on twitter in order to get a response a little piece of me dies inside), but it seems that there is nothing they can do... they can't get the engineer out any sooner.

Last night, after a long evening stripping distemper of walls (the subject of a separate rant I'm sure), and after a couple of beers, I actually found myself trying to work out which buildings I could potentially bounce a laser off. Unfortunately, I couldn't find a building that both myself and a connected friend could both see.

My musings even got as far as trying to calculate the wattage I'd need to establish an optical link over one of the lunar retroreflectors.

Thankfully, my partner was on hand to inject some sanity, so it seems we're going to be going with Virgin. Who, as a cable company, at least aren't hobbled by BT. As a result, they insist they can get it up and running in a few days... we'll see.

Still, my consumer "choice" is now not so much a choice as a lack of options. I can either have no connectivity for a month and be forced into a month of lost business, or accept a traffic shaped, DPIed and high contention service provided by the only company free of BT's monopoly.

Could we have some real competition please?

Another immigration facepalm...

1 min read

This is so dumb:

So, if we make it impossible for immigrants to get bank accounts, rent homes and get drivers licences they're just going to leave? No, they're just going to keep cash in a jar, sleep rough and drive without insurance. Worse, we force already vulnerable people out of society and further into the hands of criminal gangs and people traffickers, especially if we force them to be dependant on those people for food and shelter.

This is blatant xenophobic pandering to the fascist UKIP vote, nothing more.

Plus, how do they propose people prove their identity and citizenship for every government service? I'm willing to bet ID cards are going to be forced back onto the table...

Constantly surprised...

1 min read

...and depressed how many otherwise smart people still buy the "nothing to hide, nothing to fear" argument for surveillance.