Bitcoin tax treatment in the UK


Only yesterday, articles were posted all over the web about how Britain is beginning to really welcome Bitcoin and other cryptocurrencies. And today, the HM Revenue & Customs has announced their official position on taxing Bitcoin and similar cryptocurrencies.

And the news it good, very good for Bitcoin ethusiasts. For the purposes of taxation, Bitcoin will essentially be treated as any other currency.

The key points that Bitcoiners will be interested in are:

  • Income from mining cryptocurrencies is VAT exempt
  • Charges for arranging transactions in cryptocurrencies is VAT exempt
  • Cryptocurrencies transferred to fiat is VAT exempt
  • VAT is due (as normal) for selling goods/services paid in cryptocurrencies (calculated in GBP at point of transaction)
  • Corporation Tax: no special rules apply, it will be treated as foreign exchange and loan relationships
  • Income Tax: business profits from crypto-currencies taxed as normal income
  • Capital Gains: gains or losses from crypto-currencies allowable as CG for an individual or corporation tax for a business
  • Gambling gains are not taxable although losses cannot be offset against other gains (which is the same as fiat)

Here’s a quote of some of the main details:

  • 1.Income received from Bitcoin mining activities will generally be outside the scope of VAT on the basis that the activity does not constitute an economic activity for VAT purposes because there is an insufficient link between any services provided and any consideration received.

  • 2.Income received by miners for other activities, such as for the provision of services in connection with the verification of specific transactions for which specific charges are made, will be exempt from VAT under Article 135(1)(d) of the EU VAT Directive as falling within the definition of ‘transactions, including negotiation, concerning deposit and current accounts, payments, transfers, debts, cheques and other negotiable instruments.’

  • 3. When Bitcoin is exchanged for Sterling or for foreign currencies, such as Euros or Dollars, no VAT will be due on the value of the Bitcoins themselves.

  • 4. Charges (in whatever form) made over and above the value of the Bitcoin for arranging or carrying out any transactions in Bitcoin will be exempt from VAT under Article 135(1)(d) as outlined at 2 above.

    HM Revenue & Customs

PHP Optimisation Tricks & Tips

PHP optimisation stop watch

PHP may not be well known for being a fast and super efficient language, however there are plenty of tips and you can learn to make your heavily looped code somewhat more speedy.

Sometimes how to code your PHP in an optimised manner is be obvious, while other times you can be uncertain. In many cases, it can be truly unexpected which method of coding certain functionality is actually the most efficient.

I recently found the following very interesting article and PHP benchmarking tool. Take a look  for optimisations tricks and benchmarking of common PHP code snippets.

  • PHP Optimisation Tricks – This article describes a bunch of smaller tricks that can help make code run a little faster. In many cases, this can be useful when code is running many, many times within a loop. Please be aware that although some of these optimisation speed up the running of your code, some of them are unsightly and no where near as readable that more standard ways of coding. Some of the more bizarre optimisations should therefore be used sparingly and one could say, only when optimisation is needed.
  • The PHP Benchmark – runs many different code snippets in large loops. This allows visitors to easily compare the efficient of certain ways of coding the same type of functionality.  This is very interesting as a simple comparison, but it is worth being aware that due to PHP garbage collection and Zend optimisations results can vary. It is worth refreshing several times to see how/if the results change.

Welcoming Bitcoin in Britain

It seems Britain is reversing a previous decision to treat Bitcoin as a form of voucher. Consequently, they will no longer be requiring the standard 20% tax (VAT) upon their purchase.

The UK’s welcoming approach to Bitcoin contrasts with the approach of other countries, amid concerns about its use for tax evasion and money laundering as well as its notoriety for wide fluctuations in value. More

In a meeting with a group of UK traders last week, HM Revenue & Customs said it would not charge the 20 per cent VAT tax on trades, which entrepreneurs had complained made their businesses globally uncompetitive. HMRC went a step further, saying it would not charge the tax on their margins either.

The ruling sidesteps the thorny question of whether to class Bitcoin as a currency, but effectively treats it as such, and bases its policy on the EU law that exempts payments and transfers of “negotiable instruments” from tax.

Financial Times

This is great news for British entrepreneurs in the cryptocurrency space. It will allow companies to remain competitive with those overseas who were not burdened with this issue.

Although regulatory and taxation clarity is certainly not required for Bitcoin to function, it can provide a useful peace of mind for businesses that are attempting to innovate in the cryptocurrency field. At the moment, many banks in the UK are refusing service to companies and even regular consumers, at the mere mention of Bitcoin or cryptocurrency. Hopefully this news will slowly help to ease the minds of the decision makers at these financial institutions.

Java Robot for Automation

The Java Robot class contains many methods which can be useful for automation. This can be automation of testing procedures or alternatively operating existing programs via keystrokes and/or mouse presses. This can be useful if a program does not expose any form of interface or API that can be accessed programmatically.

The Java Robot class allows you to write programs that:

  1. Take a screenshot of the entire screen
  2. Take a screenshot of a specific rectangular area
  3. Move the mouse pointer to specific X, Y coordinates
  4. Perform standard mouse functions, like left click, middle click, right click, drag and drop and using the scroll wheel
  5. Perform standard keyboard functions, such as pressing individual keys and performing complex key combinations

For more practical applications, I previously wrote an article on automation using the Java Robot class which covered using the Java Robot class for automation of:

  1. Batch processing of files using a industry standard application
  2. Defeating 2D ‘Game’ CAPTCHAs – In this case, I was testing against the Are You human PlayThru demo CAPTCHA from
  3. Tracking and following an object in a 3D game world – I used Minecraft as the example here, and make a very simply bot using the Java Robot class that would identify and head towards any yellow flowers shown on the screen.


N97 Applications & Google Nexus Phones

I’ve recently been taking a look at my website analytics and noticed I’m still getting a large amount of visitors to a previous article I wrote on how to uninstall the default applications present on the Nokia N97 phone. For those still carrying the trusty N97, I also wrote a tutorial on how to free up disk space on the N97, as (compared to today’s smartphones) it was very limited.

Personally, I haven’t used a Nokia phone in a long time. I’ve been going through a series of Android powered phones, the Google Nexus phones, after leaving Nokia and its Symbian OS:

  1. Nexus One – was a fantastic phone for its time, but software updates stopped quite earlier on due to hardware limitations. This could still be used for basic web browsing, phone calls, texts and emails without any problems for most people.
  2. Nexus S – the second Google phone, still great and much higher hardware specifications than the Nexus One. I’ve had this phone for a substantial amount of time and Google kept up the software up-to-date very well. It is only recently this has declined.
  3. Nexus 4 – my current phone. I skipped the Galaxy Nexus (the third Google phone) as I really had no need to upgrade at the time, but as of a few months back the Nexus S I had was really starting to show its age. Frequent slow down and a seeming inability to run the newer software updates at an acceptable speed. The Nexus S would still, I imagine, be easily fast enough for most users, especially those new to smartphones, but the slow down niggles were starting to bug me. The Nexus 4 is a huge upgrade from the Nexus S, with a quad-core processors and much greater storage space. It’s a fantastic phone.


How to install Netflix on Ubuntu

Netflix LogoI’ve been using Netflix quite a bit recently. I started using the service a few months back and I really love it. There’s a huge variety of TV shows and films you can stream in full HD and goes damn well with my recently acquired 50 mbps Internet connection. 🙂

But I’m also a Linux user, and officially there is no support for Linux. This is despite the software working on other Linux based platforms, such as Android. However, there is a solution, or more accurately, a work around.

Erich Hoover has cleverly programmed and packaged a little application that usesthe Windows version of Firefox, via Wine to provide all the necessary requirements for the Netflix Silverlight player to run successfully in a Linux environment.

It’s awesome, and really easy to install in Ubuntu 12.04 due to Erich’s PPA repository.

Installing Netflix on Ubuntu 12.04

To install Netflix on Ubuntu, just follow the following steps.

  1. Open a terminal (CTRL + ALT + T), and enter the following commands.
  2. sudo apt-add-repository ppa:ehoover/compholio
  3. sudo apt-get update
  4. sudo apt-get install netflix-desktop

And that’s the main install. You can start Netflix by opening the Ubunty Dash (Super/Windows key) and searching for ‘Netflix Desktop’.

The first time the program is started, it will perform some initial download and set-up, which may take a few minutes dependent on the speed of your computer and Internet connection.

Once this is complete, you’ll be presented with the Netflix website running full screen, just login and begin watching! When you’re done, hit ALT + F4 to quite, or press F11 to switch from full screen to windowed and back again.

I hope this quick tutorial helping you install and run Netflix in Ubuntu 12.04!

A Simple Explanation of Bitcoin

Stack of physical bitcoins

Bitcoin logoBitcoins are basically cash that exists only on the Internet.

You can transfer Bitcoins anywhere in the world, in seconds. For most transactions, this is entirely free and the fees that do exist are tiny (a few pennies, if that).

In fact, Bitcoin is a whole different currency. It’s not dollars, not pounds and not euros, but it does have worth – people are buying Bitcoins all the time. In fact, while I am typing this out, 1 Bitcoin is worth ~ £11.1 (GBP) or $17.39 (USD).

All you need to receive Bitcoins is a Bitcoin address, which is very similar to a bank account number, but you don’t need a bank account to store Bitcoins. They’re stored on your computer, your phone, your tablet or wherever you decide to store your Bitcoins.

This is what a Bitcoin address looks like:


As you can see, it is just a random series of numbers and letters, but with that people can send you any number of Bitcoins. You can create as many Bitcoin addresses as you’d like, and its easy to do so in pretty much all the Bitcoin software that is available.

Who needs to know about your Bitcoins though? The answer is no one except you.

Bitcoin’s systems are decentralised in their nature, which means you don’t need a bank account. You can store your Bitcoins entirely yourself if you wish. Alternatively, you can use one of the various online Bitcoin services that let you access your Bitcoins from anywhere.

An online Bitcoin service I’d recommend for beginners or anyone with a passing interest in Bitcoin is Blockchain’s My Wallet service. My Wallet lets you create a Bitcoin wallet, access your Bitcoins from anywhere and even buy Bitcoins via bank transfer.

I hope you’ve found this a useful, simple introduction to Bitcoin. Please feel free to add a comment below with any constructive feedback.

Please also be aware, this article is deliberately simplified and does not fully explore Bitcoin concepts. Some concepts, such as the fact that users do not actually store Bitcoins themselves, only the public/private encryption keys needed to access them, are beyond the scope of this article.

For more detailed information, check out the following links:

Thanks for reading.

Using Exceptions and Try Catch Blocks in PHP

Although common place in most languages like C, C++, Java and so on, Exceptions and the use of Try Catch blocks are no where near as prevalent in the PHP code I’ve encountered.

From now on, I intend to use them much more in the PHP functions and class methods I write, rather than following the seemingly common practice of having these return null, false or -1.

Here’s an example of how Exceptions can neaten up code. This is a factory class that creates a new car object based on information retrieved from a database. I’m using this mysqli wrapper in this example.

abstract class car_factory


public function get($car_id)


$db = db::get();

if (!$db) throw new Exception(“Database connection failed.”);

$rows = $db->q(“select name, description where id = ? limit 1”, “i”, $car_id);

if (!$rows) throw new Exception(“Database query failed.”);

$row = $rows[0];

return new car($row[“id”], $row[“name”], $row[“description”]);



And below is how we’d call this get method.





catch (Exception $e)


echo “Dreadfully sorry, but an error occurred. Here are the details: “.$e->getMessage();


For those unfamilar with Try Catch blocks, this code will attempt to perform what is within the ‘try’ brackets. If an exception is thrown at any point during this, it will abort and run the code within the ‘catch’ brackets, creating a new PHP Exception object, containing the specific details of the exception that was thrown.

This Exception objects contain a lot of methods that can be useful for error reporting and/or logging. Click the links in the list below to see the specific details on

Using Exceptions, rather than returning null/false, or relying of PHP’s warnings, errors and notices, can generally result in easier management of errors.

For example, the above example could be easily modified to behave in a different manner dependent on whether or not the website is in a live or development status, which could simply be determined by a global ‘$site_live’ boolean variable in one of the website’s main configuration files.

The SCP Foundation and SCP Reports in PDF format

If you’re just after the PDF format SCP Reports, you can download them all with this torrent file. Otherwise, read on for more info. about the SCP Foundation sci-fi!

About The SCP Foundation

I’ve recently started reading some online science fiction known as SCP Reports, from the fictional secret organisation, the SCP Foundation. SCP stands for Secure, Contain, Protect and the foundation works to capture, control and perform research on various anomalous objects, or entities with unusual, perhaps super natural qualities. The SCP Reports are the executive summaries of these objects, their containment procedures, unusual qualities possessed and any and all testing done on these objects.

Sometimes the SCP testing can be non-existent, sometimes it can be amusing or thought provoking, and sometimes it can start a full on series short stories involving multiple dimensions and travel to unknown worlds, in the case of SCP-093. What follows is a general introduction to the SCP Foundation from the SCP Foundation site itself.

SCP artifacts pose a significant threat to global security. Various agencies from around the world operate to maintain human independence from extra-terrestrial, extra-dimensional, and extra-universal threat. In the past humankind has been at the whim of these bizarre artifacts and similar phenomena, but we have now reached a point in history where we can begin to control and contain these defiances of natural law.

You are now working for the SCP Foundation. You have no need to understand how or why we operate. What you do need to understand is how vital your mission is.

Our Goals

  • Observe preternatural phenomena and develop new theories of science based on their observable behavior.
  • Contain potentially dangerous phenomena.
  • Develop safety procedures for dealing with all future phenomena.
  • Observe, detain, and destroy any one or any thing preventing us from accomplishing the above-stated goals.

SCP Reports
One of the most essential functions of the Foundation is to compile and consolidate information about artifacts in our possession, or observed outside of our scope of influence.

Special Containment Procedures are required for each and every observed phenomenon. It is amongst your top priorities to assist the higher-level officers in the research required for the composition of these reports. These reports are the foundation of the Foundation.

Also, it is imperative that these documents never leak to the public. If they are verified and traced back to the source by a party not privy to this information, it could spell disaster for the Foundation and all SCP artifacts currently under our control.

Source: About The SCP Foundation

PDF SCP Reports

For those already familar with the SCP Foundation, I’ve compiled all the available PDF versions of the SCP Reports into a convenient torrent file. Click the link below to download the torrent and please help to seed! 🙂

Download the SCP Reports in PDF format here