Our products

We are passionate about building niche multi-platform products that provide real utility to our customers.

Keep up to date with Liverpool FC news from across the web.
Domain Bites
Domain name industry news and resources.
Pub Reviews
Find the best pubs near you. Share your thoughts and photos.
Capture your taste and share it with the world.


We like to blog about software. Our stack, engineering problems, open source developments.. you will find it all discussed here.

The intricacies of the Google Places Web API

The Mmmm.com web and mobile applications provide location functionality based on a complex integration with the Google Places API.

Fortunately their web API is well documented, and given the scale of the data on offer is well covered with integration wrappers for the various appropriate programming languages.

Mmmm.com utilises this PHP wrapper. By taking a look at the source code you can see how simple the API really is.

One API to rule them all

As alluded to above, both the web application and the mobile applications utilise the Google Places API. To reduce complexity however, they all integrate with Googles web API by proxy of the Mmmm.com API. That is to say that the mobile applications call our in-house API which handles calling and returning Google Places data rather than integrating directly with the respective native APIs.

If you want to use the native APIs, they can be found here: Android, and iOS.

Which endpoint?

Google offer a 'nearby search' and a 'text search' API endpoint. They also offer 'autocomplete'.

Nearby search

In principle the 'nearby search' would be ideal, but there is the use case where a user wants to upload a photo taken previously in a location that they are now not near. Previously we had integrated a segmented search control such that users could specify if they wanted to search nearby or anywhere. This was however deemed overly complex and as such we settled on a singular 'search' utilising the 'text search' option.

Text search

Text search allows you to search for string searches like "Pizza in Leeds".
Unfortunately the text search API blows up a little when it comes to partial search terms.

I found from experimenting that searches for 'Mcdon' would return various results for branches of Mcdonalds, but searches for 'Mcdonal' would return completely different branches (even when the same location bias parameters were sent). One search returned a singular result.. for a Nandos..? :S

The issue with this is that one can safely assume that the closest McDonalds branch is of most relevance to the user. If that result is not returned, or it is not given the prominence it deserves, then again the user experience is affected.

Text search does resolve the issue of locations that are no longer nearby. A user can search for 'Macys New York' and return a specific location somewhere complete different.


In addition to these two 'search' APIs, Google provide an autocomplete API. This allows you to query a partial location name and have suggestions returned as to the location that your user is looking for (like in the Mcdonalds example above). Unfortunately the autocomplete endpoint only returns very basic data - it does not for example return the locations latitude and longitude which in my case meant I could not calculate and display how far the user was from each location.

Additional considerations


Whilst the documentation suggests otherwise, my testing suggests that that 'radius' parameter for a 'nearby search' be specified in meters, whilst for a 'text search' it be specified in kilometres (contrary to the documentation). Well.. when the radius is set at 50 for a search from Leeds, England, I get results from Manchester, England too. Last time I checked Manchester was more than 50 metres from Leeds.


Google have annoyingly deprecated their 'types' functionality. Previously you could specify that you only wanted to return results for locations of specific types - bars, restaurants etc. They have not done this with any (in my opinion) justified or reasonable explanation.

My personal opinion is that people are not taking a lot of photos of food at an accountancy firm, and as such it seems reasonable that I should be able to specify not to return locations of type 'accounting'. Google are forcing a poorer user experience on customers of companies who utilise their APIs.

One work around (if using the nearby endpoint) is to do some post processing of the returned results. Such an API call does return the 'types' in the response array and as such (at the cost of a little additional overhead) one can show only the appropriate types of location.

Companies, Accounting, and Tax - a reference list

This post seeks to provide a list of useful and informative resources that have aided in the development of my own understanding of subject matters pertaining to companies, accounting, and tax.

These links are the basis of the knowledge from which i was able to discern and understand the subject matters outlined within my previous posts:

General resources


Capital Allowances

Statutory Accounts

Corporation Tax




Accounting knowledge required to manage your own books

The title of this post is not strictly true in that I was managing my books through FreeAgent (disclaimer - referral link) previously.
That said, having taken the time to thoroughly understand that outlined below I find everything a lot easier.

This is a bare minimum overview of the accounting knowledge required to manage your own bookkeeping. A lot of this knowledge was garnered from Principles of Accounting and Accounting Coach. I hope it helps.

You can use the knowledge outlined below to make following my previous posts (Running a UK limited company and Filing your corporate tax return yourself) a little easier.

Explanations and equations

  • Revenue = Turnover
  • Net Income = Revenues - Expenses = Bottom line
  • Retained earnings = last years retained earnings + net income - dividends

NOTE - Dividends are not an expense. They are a distribution of income

  • You must have a credit balance in Retained Earnings to issue a legal dividend.

  • Capital Stock is the amount of money shareholders have put in.

  • Capital stock + Retained earnings = Assets - Liabilities = Book value of the company

  • The General Ledger is nothing more than a notebook, with a separate page for every account.

  • Accounts receivable (an example of an account) are amounts "owed to a company by its debtors". As such they are an asset.

  • Debits appear on the left.

  • Credits appear on the right.

  • Dividends, Expenses, Assets, Losses increase with a debit.

  • Gains, Income, Revenue, Liabilities, Stockholders Equity increase with a credit.

  • The Trial Balance validates that debits equal credits.

  • A Journal is essentially a log book. It notes the accounts involved in a transaction and the amounts debited/credited

  • Accrual-basis accounting involves recording revenues when earned and expenses as incurred.

  • If a service is provided and payment is allowed many months later, the revenue is recognised on the date that the service was provided.
  • If you buy some business stationary the expense is incurred on that date. If you pay your rental fees up front for a one year period, the expense should be recognised in the accounts monthly.

  • Asset cost - accumulated depreciation = book value

  • Accounts with balances that are the opposite of the normal balance are called contra accounts

  • Accumulated depreciation (Depreciation bought Forward) is the contra account to the respective asset account (e.g Computer equipment) and allows both the initial (gross) cost to be reported in the books as well as the book value.

  • Conservatism is best explained with a quote - "Under the conservatism principle, if there is uncertainty about incurring a loss, you should tend toward recording the loss. Conversely, if there is uncertainty about recording a gain, you should not record the gain. source.

  • Google define depreciation as "a reduction in the value of an asset over time, due in particular to wear and tear.".

  • You account for depreciation by displaying part of the assets cost on the Profit and Loss statement over a number of years.
  • The yearly depreciation amount is reported within the Depreciation Expense (Depreciation in year) account.
  • Depreciation essentially transfers a part of the assets value from the balance sheet to the profit and loss statement - each year part of the cost is expensed.
  • Depreciation is a non-cash expense. It will reduce profits without any cash changing hands.

  • The following types of account are listed on the balance sheet: Assets; Liabilities; Stockholders' (or Owner's) equity

  • Balance sheet account balances are carried forward to the next accounting year - at the end of an accounting year your assets do not suddenly disappear.

  • Called up share capital is amounts owed for shares that are currently unpaid.

  • One paid they are Alloted, called up and fully paid.

Filing your corporate tax return yourself

So. You are utilising a software tool like FreeAgent to manage your books.
FreeAgent sells itself on being 'Management accounting' software which essentially means that it provides a way of keeping track of the numbers pertaining to your business in formats that are appropriate for making managerial decisions.

Corporate tax returns however need to have a set of 'Statutory accounts' attached to them. These are accounts made up in a specific format subject to Generally Accepted Accounting Principles (GAAP). For accounting periods commencing before 31st December 2015 this is FRSSE (2015). For accounting periods commencing on or after 1st January 2016 the new standards (FRS 102) should be used.

As such, you need to take the data stored/displayed within the software and prepare an appropriately formatted set of statutory accounts. This is pretty darn hard if you don't know what you are doing.

Disclaimer - The normal advice is to have a qualified accountant do these submissions for you. I like to have a full understanding of my financial affairs, and like to learn. I can not take any responsibility for any mishaps that occur as a result of the advice below.


When submitting your corporate tax return a number of adjustments are required.

When you have an asset on your books you can depreciate its value over a set number of years (defined by yourself). HMRC do not consider this self imposed depreciation when discerning your tax obligations and as such depreciation costs need to be added back in.

Likewise, some expenses are tax disallowable (for example anything bought for private use is of course not allowable). HMRC have produced a helpsheet (which they have hidden well) which outlines what is/is not an allowable expense.

Within FreeAgent one can get a nice visual representation of this by looking at their 'Corporation Tax Calculation' screen. This is accessed by selecting from the 'Taxes' drop down within the site navigation.

The FreeAgent Corporation Tax Screen

The 'Taxable profit' section shows how the actual amount upon which you should be taxed is calculated.

The other section on this screen is the 'Capital Allowances' section. HMRC offer a number of allowances which may offset some of your tax obligations. These are outlined here.

The long and the short of it is that you can claim allowances on assets (in my case mainly computer equipment, phones etc) at cost (or market value if previously owned) up to a maximum limit (which changes yearly).

Unfortunately, as of the time of writing (May 2016) FreeAgent do not properly support capital allowances. They naively assume that all capital expenditure is allowed as part of the allowance and the figures can not be adjusted.

I questioned them on this and got the following response:

"The corporation tax is only a ball park figure and may still differ from your accountant's year end calculations due to scenarios like yours. It is a tool allowing users to budget for these year end costs; it's not intended to replace specialist tax calculation software nor can it take the place of your accountant's expertise."

One of the main intricacies of Annual Investment Allowances is that if you purchase a laptop for example and utilise it 50% for business work and 50% for private use then you can only claim the allowance on half of the cost. Likewise if you bring a laptop into the company that was previously used privately you cannot claim the allowance as outlined here - general exclusion 5. As such you need to be careful and take the data that FreeAgent presents with a pinch of salt.

The third section of the view is 'Apportionment of profit'. HMRC outlines apportionment here. It is only really relevant if different financial years have different taxation rates.

NOTE - Remember that the company financial year runs from 1st April - 31st March as outlined here. Eurgh - so many different dates/time periods.


Given that you need to submit full statutory accounts with your corporate tax returns it seems pragmatic that (should you not engage an accountant) you utilise purpose built software. The fact that software exists for such accounts production is indicative in itself of the complexities and nuances associated with producing statutory accounts.

I chose TaxCalc because not only do they offer Accounts Production software but also they provide Limited company software. The latter integrates with the accounts production software to submit your corporation tax return and allows submission of your personal returns too.

Accounts production

The first thing that you will need to do is produce your Statutory Accounts. Open up the software and complete the various self explanatory inputs - company name and number etc.

Next you will want to select the 'Chart of Accounts' section and make sure that the relevant accounts are appropriately named (to match up with those which you utilise in FreeAgent). For example, under the section "Balance Sheet > Cash at bank and in hand", I renamed the various accounts to easily identify the actual bank accounts that my company has.

You cannot add new accounts (as outlined here) because HMRC requires that the accounts be submitted in xbrl format. This is another reason why you really need to use tried and tested software for accounts production.

At this point you will want to import all of your transaction history from FreeAgent. To do this you need to login to FreeAgent, select 'Reports' from the 'Accounting' menu dropdown and click on 'Trial Balance'. From this screen you can click 'Export' in the top right hand corner and select 'Transactions CSV'.

How to export your Trial Balance in FreeAgent

NOTE Make sure that the appropriate trial balance is shown by selecting the appropriate time period from the dropdown.

Back in TaxCalc you can now click 'Import Trial Balance' under the 'Posting' section.

At this point you will likely have to map the appropriate FreeAgent accounts to their TaxCalc counterparts. This will make sure that the transactions are categorised appropriately.

How to import your TrialBalance into TaxCalc

A significant part of the Statutory Accounts is the 'Notes' which accompany each of the various contained sections. TaxCalc automatically generates these notes for you, and where appropriate prompts for an appropriate input.

Once complete you can click the 'Reports' section and preview your various financial statements as well as your completed accounts.

Corporate Tax Return

You can now open up the tax return product and once again fill in the self explanatory data fields.

In the 'Accounts and Computations' section you can simply 'Import' the accounts that you previously created.
You should also indicate that you are going to attach the accounts 'Relating to this period'.

Your first year

If it is your first year, given that a CT600 return can only cover 12 months, you may need to submit two returns. As your statutory accounts can cover the full period, you should attach the full accounts to both return submissions.

You need to be careful here. Your CT600 submission requires data inputs for values such as your Turnover. FreeAgent's Profit/Loss display displays data by accounting period. In my case the 2015/16 Profit/Loss statement displays a Turnover value for the period 24th March 2016 until the 31st March 2016. This is not the correct turnover value for either of the two corporation tax returns that I need to submit (24th March 2015 - 23rd March 2016 and 24th March 2016 - 31st March 2016).

I could not find an appropriate way of seeing the correct turnover values for these periods and as such I had to calculate them.

On the FreeAgent 'corporation tax' screen (see above) I noted that you could select these specific periods. For the period 24th March 2016 - 31st March 2016 I was curious as to how the 'Operating profit' had been calculated (especially given the naive implementations of capital allowances discussed above). The operating profit is logically calculated by doing the sum:

Turnover - Cost of sales - Administration Expenses - Staff Costs - Depreciation
Using values for the specific period.

As FreeAgent doesn't seemingly have a way of displaying period specific transactions (in a nice, digestible format) this can be a little arduous.

When you have completed both returns make sure you check all your numbers and verify that they are correct. Have a play around with FreeAgent's various screens (giving consideration to their various intracies) and verify that things 'add up'.

Free Agent have a community forum where you can see common user questions and/or submit your own. They also have a fantastic support team. If anything does not seem right do not go on to submit your returns through TaxCalc until you have had an accountant verify your work.

If you have any simple questions or anything needs clarification, I will do my best to help. Once again I must reiterate that the normal advice is to have an accountant do this kind of thing for you.

If you run anything but the most simple of companies I would advise at the minimum getting a second opinion. At Double Negative we have stock which we sell, some assets which we depreciate, and various expenses. If it were any more complex than that I would certainly engage an accountant.