Popular posts

For a digital publishing platform, token replacement can be a good way to allow users to easily insert special types of content into their posts. Wordpress have their square bracket syntax ‘shortcodes’, so plugin developers can enable users to insert say, a contact form into a blog post with code as simple as [contactform]. I… Full post

Integration testing is a valuable check on methods that talk to a database, and a good way to check that stored procedures or sql queries are behaving as expected. I often see one of 2 mistakes with integration tests. The first is reliance on live data that is liable to change. This is easy to… Full post

For small scale geocoding needs I’ve always used the excellent Google maps API, but I recently wanted to do some custom geocoding and return the nearest NHS trust based on a user’s postcode. This was a nice opportunity for me to learn a bit about PostGIS, an amazing spatial database extension for PostgreSQL databases with… Full post

Firstly, I love this article on animating SVGs because it really de-mystified them for me: https://css-tricks.com/svg-line-animation-works/ I wanted to add a really simple animation effect to a quiz app I wrote for the Labour Party (see: http://www.labour.org.uk/content/aprilfools ). A little bit of animation goes a long way in making something more visually interesting and therefore engaging, so I… Full post

There are two challenges to managing performance for Angular websites – the time spent performing intensive logic in the client, and the time spent actually rendering content. When writing an app recently that involved displaying a lot of constantly changing data, I found a few quick wins. 1. Use ‘track by’. The ng-repeat directive is… Full post

TLDR; yes. As a C# developer, I instantly loved Typescript for its features that make object oriented programming easy. I also love that it supports a lambda syntax for functional programming (which will actually be vanilla Javascript in ECMAScript 6.) But after developing in it for a few months now I thought it was also worth pointing out the other… Full post

A robots.txt file and a sitemap are important additions to a site from an SEO point of view. You can of course just serve static files but it’s easy to imagine cases in which you’d want the content of these to be dynamically generated: 1. You are regularly adding/changing site content. Certainly on hirespace.com, we’re adding new… Full post

It’s been over a month since JQuery UK but I’m using things I learnt there all the time. Here are the two most useful techniques I took away from it. 1. Event delegation. Instead of attaching an event handler to a specific element on the page, letting the event bubble up and handling it on a parent element, usually… Full post

The most baffling bugs are the ones that only appear on a remote server and are impossible to reproduce locally. We had one of these recently on a page that retrieved data based on date periods. Locally, the data came back as expected; on our test server, we got nothing. It took us a little… Full post

We recently released a dashboard for the Hire Space venues’ CMS and the layout involves lots of circular badges with numbers in. I’m no CSS whizz, but I did have fun styling this and it turns out that creating fully responsive circular badges with nothing but CSS is easy. Here are the classes to create… Full post