Music to code to

Programming requires a good deal of concentration. I find that’s aided by the right kind of music. For me that generally means instrumental and predominantly (but not always) electronic. He’s a list of some albums that work for me.

Music to code to: Volume One (A-C)

  • Actress: R.I.P.
  • Adam Johnson: Chigliak
  • Autechre: Amber
  • Autistici: Complex text tone
  • Ben Lukas Boysen: Spells
  • Bibio: Fi
  • Bicep: Bicep
  • Blanck Mass: Dumb flesh
  • Boom Boom Satellites: Out loud
  • Bottlesmoker: Hypnagogic
  • Brothomstates: Claro
  • Burial: Untrue
  • Byteone: Death of a typographer
  • Carbon Based Lifeforms: World of sleepers
  • Chris Remo: Firewatch original score
  • Chris Zabriskie: Cylinders
  • Christ: Metamorphic Reproduction Miracle
  • The Cinematic Orchestra: Man with a movie camera
  • Clark: Body riddle
  • Com Truise: Galactic melt
  • Cosey Fanni Tutti: TUTTI

Dry January AKA Giving up

This year, like an increasing number of people across the UK, I decided to give Dry January a go and give up alcohol for the month. I hadn’t actually given this much thought at all but Martin said he was going to do it and asked if I wanted to join in. I didn’t consider my drinking to be a problem but I was certainly drinking more than the recommended limit each week. I was therefore interested to see how easy or difficult I found a month of abstinence to be.

Martin offered to do an online order for a range of low ABV beers (for our purposes we classes anything up to 0.5% as alcohol free) for us to try during the month. So armed with a fridge full of Becks Blue, Nanny State, Big Drop Stout and many more we began our month of sobriety.

I wouldn’t never have said that I drank excessively but I certainly enjoy a beer with my dinner most evenings. The range of unbeers (as I came to call them) close at hand meant that every time I fancied a beer I could still have one. This meant that I wasn’t fighting to change the habit so much as tricking my brain into thinking everything was business as usual. Crucially many of the low alcohol beers now available are actually very tasty, highlights for me being those by Big Drop (a brewery dedicated to alcohol free beer) and Brewdog’s Nanny State.

About a week into January I had my first real test when I went out on a Saturday night with a non-dry mate. I was determined not to change my social activities because of this experiment and I figured if I could spend a few hours in a pub without resisting regular beer then I’d need to have a word with myself! I was pleasantly surprised to find the evening flew by and didn’t really feel any different to a normal night out. The only real difference was that the first pub we went to seemed to be unaware that decent AF beer was now an option. They had only two options, neither inspiring, and hadn’t even bothered to put them in the fridge. Thankfully the second place we went (The Tap on Derwent Street in Derby) was much more accommodating. They still only had two unbeers on offer but both were carefully selected German imports and very tasty. At the end of the night I walked home about twice as fast as usual and resisted buying a kebab. I felt a bit like I had super-powers.

The rest of the month continued in the same fashion and I found staying ‘dry’ very easy. Until, that is, my stock of unbeers was depleted. After a couple of days I was really craving a hoppy treat. I thought I was going to crack. But I bought a pack of Becks Blue and downed a couple with my meal and found that my thirst was quenched. It turns out that I might well be addicted to beer, but it really doesn’t matter to me that much if there’s alcohol in it or not. So does this mean I’m going T-Total? It does not. Like I say, I like beer. There are some great AF beers out there but most pubs only stock one or two (one place I went in Birmingham didn’t stock any because “They’re all shit!”) so unfortunately there’s a way to go. I drink beer because I like the taste and I like trying new things. I’m now planning to alternate between beer and unbeer on a night out though. And for home drinking I’m very happy to stick with unbeer as my default.

“We don’t have any alcohol free beers because they’re all shit!”

An idiot who obviously didn’t want my money

The other thing that happened was that I lost 2.5kg without changing what I ate or doing any additional exercise. That was a pleasant surprise.

If you’re interested in trying unbeers for yourself then the Dry January site has a great reviews section to get you inspired.

Having just about completed a month off the booze I’m inspired to try giving up some other things for the rest of the year. I’ll write about that in the next few days.

PS. I stole the photo at the top from Martin. Sorry Martin.


AWS SSL Certificate setup for WordPress site hosted on Nginx + CloudFront

Hello friends. Today I’m going to talk you through the process of setting up a free SSL certificate with Amazon ACM. This is specifically for those of you who have your sites served via Nginx running on AWS EC2 instances and have everything going through CloudFront. It’s quite a specific setup, but it’s a good setup. Here we go then!

Step 0: Make sure you can receive admin emails on your domain

When we request the SSL certificate Amazon will send an email to the following email address formats. You can’t specify alternatives so the first thing to do is make sure you can receive messages at at least one of the following:


Step 1: Order your certificate

To use an ACM Certificate with CloudFront, you must request the certificate in the US East (N. Virginia) region so choose N. Virginia from the location menu in the top-right of the AWS dashboard.

Now you need to go to your list of CloudFront distributions and edit the one for the site that needs SSL.

On the Distribution Settings page you should see a ‘Request an ACM certificate’ button. Clicking that button will whisk you away to the certificate request form. Here you must enter your domain name as follows:


(for a wildcard certificate)

(for a specific sub domain)

If you’re using the naked domain (i.e without www. or any other subdomain) make sure to enter that, the wildcard alone won’t work. You will likely have two entries (e.g. and *

Click the ‘Review and request’ button followed by ‘Confirm and request’ on the next screen.

Step 2: Approve the certificate request

You should soon receive an email from Amazon Certificates. Click on the approval link in the email and then the ‘I Approve’ button on the linked page. You should be shown a success message.

Step 3: Select your new certificate in CloudFront

Go back to the CloudFront Distribution Settings page where you earlier clicked the grey ‘Request an ACM certificate button’.

Selecting the ‘Custom SSL Certificate (’ radio button will enable the dropdown list of certificates for you to choose from. You may need to click the refresh button first. Select your new certificate and click the blue ‘Yes Edit’ button.

Step 4: Update your server settings

You’ll need to update your Nginx site config. Here’s an example:

server {
        listen          80;
        return 301$request_uri;

server {
        listen       80;

        if ($http_user_agent !~ “Amazon CloudFront”) {
                return 303$request_uri;

        root            /var/www/yourdomain/htdocs;
        index index.php;

        # For PHP:
        location ~ \.php$ {
                fastcgi_pass unix:/var/run/php5-fpm.sock;
                include fastcgi_params;
                fastcgi_param SERVER_NAME $host;
                fastcgi_param SCRIPT_FILENAME $document_root/$fastcgi_script_name;

        location / {
                try_files $uri $uri/ /index.php?$args;

        if (!-e $request_filename) {
                rewrite ^(.+)$ /index.php?q=$1 last;

    location ~*  \.(jpg|jpeg|png|gif|ico|css|js|woff)$ {
        expires 7d;

    location ~*  \.(pdf)$ {
        expires 7d;

You’ll need to reload Nginx on your server for the changes to take effect.

sudo service nginx reload

Step 5: Install the SSL Insecure Content Fixer WordPress plugin

I’ve found it necessary to install the SSL Insecure Content Fixer plugin for WordPress to get everything working as expected with this specific setup. I believe this is to do with the fact that WordPress cannot detect SSL on the server because that’s actually being handled by CloudFront. If you know a way round this please let me know!

After installing and activating the plugin change HTTPS detection to ‘unable to detect HTTPS’ on the Plugin’s settings page.

Step 6: Update WordPress URL

You’ll need to tell WordPress that your site URLs should now include https. You can do this from WordPress’ Settings > General page. I prefer however to add the following to the top of my wp-config.php file:

$scheme = “https://“;
$website_url = ‘’;
$_SERVER[“HTTP_HOST”] = $website_url;
define(“WP_HOME”, $scheme.$website_url);
define(“WP_SITEURL”, $scheme.$website_url);

define(‘FORCE_SSL_ADMIN’, true);
$_SERVER[“HTTPS”] = ‘on’;

Step 7: Check everything works

After making that last WordPress URL change you’ll get booted from the Admin area and need to log in again. If something has gone wrong you may get a redirect loop. If everything’s working fine though you’ll be able to log in and everything should appear normal, only now with bonus securitay! Check the front end of your site is loading over SSL too. You may need to force a CloudFront invalidation to speed things up.

The last thing to do is check the SSL itself which you can do at — This test can take quite a few minutes so be patient.


Stop boring your social media followers

Running a social media account for a business is hard. It’s difficult to get into the habit of putting the time in and even if you are posting on a regular basis it can be tough not to just churn out a stream of boring promotional messages. Saying ‘We are the best X in the region contact us to find out more’ over and over won’t get you anywhere.

There are a few things you can do to avoid this kind of corporate banality and they range from quick and easy to time-consuming and hard. The most effective thing you could be doing, and probably the most difficult, would be creating regular high quality content on your website which will be interesting and valuable to your audience. But let’s be realistic, you probably don’t have time for that right now. Enter Buffer.

Buffer is a fantastic tool that is best known as a social media scheduler. It allows you to line up Tweets and Facebook posts (it also works with LinkedIn, Pinterest and Google+) in advance so that they’ll go out automatically over the next few hours or days. You tell it how many times a day and what time to post. After that it’s just a case of keeping your Buffer topped up. If that’s where it ended that’d be good enough but Buffer has a fantastic feature called Feeds which allows you to pull in content from almost any website of your choice and add it to your scheduled list of posts. This feature uses RSS which stands for Really Simple Syndication. The reason it’s so useful is because it allows you to log in to a single place, quickly scan articles from several sources and share them with your followers very simply. With a few clicks you can have enough content lined up for a few days meaning you get to avoid that nagging feeling that you need to ‘do something about the Twitter’. Aside from the time this will save you this has the added benefit that your company social pages will become much more diverse and interesting to potential followers. You’ll also likely get noticed and retweeted by some of the authors of the content you’re sharing which is a great bonus.

I’m gonna assume you’re sold on this plan because it’s great. So, if you don’t already have one, go and sign up for a Buffer account now. There’s a free option but you’ll need to be on the Awesome Plan to take advantage of the Feeds tool but at $10 a month (about £7) it’s well worth the money. And there’s no minimum contract. All set? Ok, let’s do this.

After logging in to Buffer you’ll want to click your profile icon on the left, then choose the Content tab and finally click RSS Feeds.

Now you have two options. First you can type a search term into the box and Buffer will display a list of suggested sites. If any of these take your fancy just click the name. If you already have a website in mind to add to your list you can copy and paste its URL in the search box. As long as the website uses RSS, which virtually all blogs and news sites do, Buffer should now display the name of the site under the search box. Click that and a few seconds later you should see a list of the latest posts from your chosen feed fill the screen.

From here you can click through to the article to give it a read, click Add to place the article in your list of upcoming posts or dismiss the article if it’s not right for your followers.

When you want to add another feed simply click the Add & Remove Feeds button and repeat the process above. To get the most out of this feature you should aim to have a few different sources in your Feeds list. Think about your audience on social media, or the kind of audience you want to build, and figure out the kind of sites that will be of interest to them. You can experiment with your chosen Feeds too as Buffer lets you know which of your shares are the most popular. Over time you’ll be able to tailor your Feeds for maximum value.

And that’s it! You now have the facility to keep your Facebook, Twitter and other social media topped up with interesting content for minimal effort on your part.


(Un)Special Offers [video]

[youtube id=”FMrBLFkW2Ro”]

Special offers can be a great way to increase loyalty among your customers but you need to be careful. Poorly timed or ill-thought offers can actually do more harm than good. Here are a few ‘special’ offers that have failed to in their aim of getting me to buy more.

The poorly timed special offer

Have you ever bought something at full price and then noticed it reduced a couple of days later? Depending on what it is and how much it costs this might not be a massive issue. After all, if you were happy with the product yesterday at the price you paid what’s the big deal? But I’m thinking now of a time when I bought a special-edition boxed hardback book from a small, independent company. In all truth I would’ve been quite happy with the ebook but I like to think of myself who supports small businesses so I preordered the special edition and paid the significantly increased price for the book. The book had been on my shelf for approximately a week when I received an email from the supplier telling me the ‘Great news!’ that they were now able to offer the special edition for 50% off. Maybe this offer was in reflection of the fact that they’d ordered too much stock, maybe they were trying to boost awareness. Whatever the motivation I was left feeling like I wish I’d bought the ebook and saved myself £40. If you must make this sort offer at the very least segment your email list so you only send it to people who haven’t bought the thing in the last week.

The ‘too many strings’ special offer

You know those cashback offers where you buy a thing and then get money back after filling in a massive form and mailing some proof of purchase somewhere? Those suck. We all know that the offer is designed to reel people in while you chuckle about the fact that a high proportion of people will either A) forget to jump through the hoops or B) get put off by having to fill something in. Also, offering the cashback by cheque is just low. It’s 2016. You know full-well that people are also likely to forget to bank the cheque. Everything about this kind of ‘special’ offer shows you only care about sales and aren’t actually interested in your customers. Don’t do it.

The ‘there’ll be another along soon’ special offer

By pushing special offers to prospective clients too frequently you may actually stop them buying. By regularly discounting your products and services you start to undermine your full price items. If this is your strategy and the ‘full price’ is actually an inflated price that you’re not expecting anyone to pay then go for it, I guess. But understand that there may be people who are ready to buy just as your prices jump up again. If someone decides to buy at a certain price and then that price goes up they’re likely to hold back, especially if they know the price is likely to come down again at some point. They may be fully intending to buy from you as soon as the price merry-go-round rotates again but during this window you could lose them to a competitor who’s more consistent.

The ‘forget that we failed at that first thing and buy something new anyway’ special offer

This one is a favourite of telecoms companies. You set up an account for a single product, let’s say super-fast broadband, and then they start calling you and writing to you offering to “review your package”. What they don’t realise is that the one thing I actually want (and pay for) from them is often quite flaky. If you can’t get the core product right offering me something else is not only a waste of your time, it actually reminds me about how disappointed I am in the service I wanted in the first place. When I explain this to the sales person on the phone they invariably show little interest and rather than offer to transfer me to a relevant department who could help they push on with their ‘special offer’. This leaves me irritated and liable to go on a Tweetrant.

I’m sure there are plenty of other ways for companies to irritate me (honestly, it doesn’t take much) but I think that’ll do it for now. I guess it’s only fair for me to give an example of the sort of offer that would work on me. Let’s see…

The ‘ideal customer’ special offer

I personally believe that the best offers are those which exist for a genuine reason. For example, we offer a fixed 22% discount for registered charities. It’s not time-limited, the only condition is that you are a UK registered charity. The reason we offer this is because we love helping charities to do better online. At the same time we recognise the fact that budgets can be tight so we try to sweeten the deal even further.

The ‘package’ special offer

We also offer bundles of services at a hefty discount because we prefer to really get stuck in helping clients in a number of areas at once. Also, the more work we do for one client they less time is lost switching between different things. In reflection of the fact that this is better for us we offer a discount. It’s easy to understand why we do this so it doesn’t come across as manipulative. The point is it’s win-win.

What can you do?

Firstly you should decide whether or not you want or need to create special offers. They simply might not be right for your organisation. If you do decide to put some offers in place just remember to make them easy to understand and take advantage of. And make sure you don’t do anything to upset your existing customers.


Toast (or how to please your customers by making them do more)

A few years ago, on a sunny Winter’s morning, I walked into the breakfast room of a B&B. At first it seemed like any other British countryside establishment, but then I noticed the toasters. Toasters, you ask? Toasters. Every table in the little dining room had its own toaster with a loaf of bread sat next to it. There was a slightly worrying extension lead configuration to host the eight or ten toasters. But after the initial confusion (and a passing thought to health and safety fire hazards) Pete and I started toasting.

Now you might be thinking that this was pretty lousy hospitality. If you’re on holiday and paying for breakfast, shouldn’t someone bring you toast and look after you? Why should you do it yourself? Although on casting furtive glances around the room and seeing other couples happily making their own toast, we shrugged our shoulders and joined in.

There are a few reasons why this highly unusually DIY toast situation was awesome. Firstly, you could butter the toast as soon as it was done and eat it while it was still hot – none of the trying to spread cold butter on cooling toast that’s been sat in the kitchen for minutes before you get it. Secondly, it was bespoke. If you liked your bread lightly toasted and just golden, you could have it. If you prefer a darker bronze, then you could do that too. You could also control the supply, if you were hungry, you could have as many slices as you wanted, without having to ask for more. If you didn’t want much, then there wasn’t wasted food. It seemed the perfect set-up.

I’m not sure if the reasons behind the toasters were to give customers exactly what they wanted, or if it was to free up time in the kitchen by not serving toast every few minutes. The proprietor seemed pretty savvy, so I’d like to think it was both. We thought it seemed like a good idea and it was actually quite fun so we enjoyed our breakfast but eventually forgot all about the unusual toast situation.

The other day, I was staring down the top of our toaster at home waiting for it to pop when I remembered the dining room full of toasters. It got me thinking, the customers were doing the labour that they were paying for, but they were happy. A quick check for the B&B on Trip Advisor shows 22 five star reviews all mentioning the table-top toasters. It seems that the pay-off for putting in a minimal amount of effort resulted in receiving an efficient and tailored service. Where else might we be able to implement this approach?

With the toast situation, only a small part of the process was given to the customers. They still received a full breakfast from the kitchen (and were not expected to do the washing up) but they had control over the extras. So I’m not suggesting that customers are made to do all of the work that they are paying for, but there seems to be an opportunity to let them get involved and take on some actions that result in benefits for the customer and suppliers.

Are there any parts of your online service that you could hand over to your customers? Are there any processes that take up your time that would be easy for your customers to do themselves? What could you achieve with the extra time you’d save? Would your customers actually be happier to do some work themselves if they see a real benefit? Food for thought.


Paper Prototypes: What are they and why use them?

Website design is ever-changing and, consequently, the way that website designers work project-to-project changes as we learn better ways to do things, embrace new technologies, methodologies and processes.

We’ve been making and working on websites for many years, and have experimented with different ways to get clients to engage with the wireframing stage of the process. We have sketched out really rough wireframes with clients and used online wireframing tools such as Balsamic and InVision to present them. This way of showing wireframes to clients has been fine but we’ve felt like we’ve not quite been able to get people connecting with the functionality of the design. We felt it was important to wireframe most of the website with our client so they knew they had full input into the design but we didn’t need to do every page and certain pages such as a blog overview or contact page were so simple that they didn’t really need to spend that time with us.

Wireframes are the blueprints of the website and it’s important to make sure that the content and functionality is right before the website is built. But because we’re all visual creatures, it’s still hard to see past what font has been used, whether the navigation is on a light or dark background, should the buttons have rounded or square corners? etc. It’s easy to ask people to not worry about those things at this stage but we can’t help being drawn to the visual, even if it’s just monotone and basic. Our clients naturally want to skip ahead to the visual design stage where the colours, nice fonts, photos and illustrations live. Wireframes are not the sexy part of the web design process and grey boxes and buttons are, to be honest, a bit of a turn off.

A better way to engage with wireframes

So what can we do to get our clients more engaged with wireframes? Draw them! For our latest project, we rough sketched some of the important pages on the site with our clients to make sure we had everything we needed on the page and then rough sketched out the remaining page templates as a team to get all the elements in place. Then I drew every page template out on quadrille paper, both desktop and mobile versions. I also had separate cut outs of recurring elements, such as the header and footer so these could be placed over the page templates.

So why draw pages? There are several reasons that we decided to work this way in this project. One of the main reasons for drawing out the pages was because they are drawn by hand, there are no styles to be districted by. No fonts, no shades of grey, no corner radiuses. We and our clients could concentrate on the content and functionality of each page template.

The act of drawing out each element meant that I thought extra carefully about the elements going on a page template. It’s easy to copy and paste elements using design software but because each element was inked in, it was considered. Sometimes, we realised that we were missing something, a call to action or similar and I simply drew it and taped it into the design. The designs were modular and amended easily without having to save and update pdfs.

As well as there being no visual design distractions, presenting the wireframes actually worked really well by them being on paper. They could be picked up and examined, mobile pages could be held in our hands and scrolled by pulling the paper down, customer journeys around the website could be followed by placing the pages next to each other and checking that the journeys made sense. When our clients had suggestions, I simply drew them on, no waiting until I was back at a computer to make the changes. And because changes could be suggested and instantly implemented, our clients knew that this stage was a discussion for them to get involved with, not something finished that they had to approve.

But paper? In web design?

But the website isn’t printed, it will be used on computers and phones, shouldn’t you show them on those devices? We’re not going to go from paper prototype to finished website, there are a couple more stages between these. The paper prototype is important to check that the functionality and content of the website is right and to engage our clients but we will show the prototype on screen too. The next stage is to build a HTML prototype which will act the same as the finished website but we know that by testing out the pages on paper first that the processes have been well-developed. That’s not to say that things won’t change at the HTML prototype stage, but we are confident that we haven’t overlooked anything before proceeding. We had a fantastic meeting showing our clients the paper prototypes and getting them excited about the project. Visual design might always be the bombshell of the process but paper prototypes are, at least, charming.

This article was originally posted at


Remove non-alphanumeric characters in Google Sheets

I recently found I needed to remove non-alphanumeric characters in Google Sheets. I had a column of text containing business names which I needed to format as URL friendly equivalents. For example, I needed to turn these:

  • My Business Name
  • Derek’s World of Fish!
  • Jane & Janet’s Pieland

Into these:

  • my-business-name
  • dereks-world-of-fish
  • jane-janets-pieland

I achieved this by added the following formula into the top cell of a blank column. This assumes the names you need to format are in the fist column of the spreadsheet

=ArrayFormula( lower(REGEXREPLACE( A2:A , "([^A-Za-z0-9]+)|(---)" , "-" ) ))

Lessons I learned from the design of the NES

This week I was in the rare position to be able to learn about the design of the Nintendo Famicom (that’s the NES to us Westerners) from its designer Masayuki Uemura. He spoke for a couple of hours at The National Videogame Arcade run by GameCity in Nottingham. It was a great event where we heard about design decisions, successes and failures of the Famicom from it’s inception in Japan to becoming a global phenomenon.

What follows are the lessons that stood out to me as important for anyone in business.


Nintendo is an older company than you might realise. They were founded in Kyoto in 1889 and originally made playing cards before moving into traditional toys and games much later. In the early eighties Nintendo launched what would become the hugely popular Game and Watch line of LCD handheld games. There were plenty of these types of games available from other manufacturers but Nintendo did something different. Where most of the other games on the Japanese market tried to emulate the success of games like Space Invaders Nintendo made games around what would become iconic characters. The created Donkey Kong and Mario and produced games with characters licensed from Disney. Their games stood out in the market and this differentiation lead to huge sales.

Beware of false economy

After the success of Game and Watch Nintendo started working on the home console that would become the Famicom. They were expanding into a new market so wanted to keep costs down. One of the ways they did this was to hardwire the two controllers directly into the body of the console meaning they couldn’t be unplugged or replaced by players. This saved a small amount of money as fewer components were needed in manufacture. This decision was made after rigorous testing of the buttons which found the controllers could withstand over 10 million button presses. But the testing made assumptions about how gamers would press the buttons without finding out how they would actually use the pads. Nintendo realised their mistake when they started receiving consoles returned due to faulty controllers. After investigation they found that people were pressing the buttons slightly diagonally rather than straight down from directly above. This seemingly insignificant difference resulted in a 10% failure rate and as the controllers were not replaceable this meant huge numbers of consoles were returned. A costly mistake that could have been avoided by either not trying to cut corners or testing in a real world situation rather than a lab.

You may be unaware who the true audience is for your product

Along with the Famicom Nintendo created various accessories, one of which was the Family Basic Keyboard. This was intended to help children learn to program at home. When Nintendo started getting lots of calls from children on behalf of their parents they discovered that adults were using the Family Basic Keyboard as a practice device for the word processors that were being introduced into Japanese offices at the time. Apparently children weren’t actually that interested in the keyboard.

Failure can lead to expansion

Nintendo set itself a sales target for the Famicom of one million units within six months. Unfortunately only 440,000 sales were made in the first year after launch. This lead to an evaluation of the US market to see whether the product might perform any better over there. The short story is: it did. In total Nintendo sold around 34 million units in the United States. Had they hit their original Japanese sales targets they may never have entered the American market. Or they may have been less careful about how they launched which could have reduced their success. More on that below.

Test the water with a soft launch

To gauge how Americans would react to the Famicom games Nintendo created an arcade cabinet called the Nintendo VS System. While it looked like a traditional arcade machine it was really just a Famicom, two joysticks and a screen in a big box. The VS System was introduced into American video game arcades to assess the popularity of games. When it became clear America was enjoying the games Nintendo had already created they decided the time was right to launch the home console into its new market.

Tweak your offering for new markets

After missing the target at home in Japan Nintendo wanted to make sure the American launch of the Famicom was a greater success. They redesigned the console physically to resemble a VCR as these were hugely popular in American houses of the time. Having learned their lesson on the false economy of the hardwired controllers they opted to use detachable units. The final thing to decide on was a name. ‘Famicom’ could not be used as another company was already marketing a product called the Family Computer. The name NES (Nintendo Entertainment System) was decided on just one month before launch. Another option was the ‘Nintendo Learning System’. It’s interesting to ponder whether the NES would have done as well had it been saddled with that name. My guess is that it wouldn’t.

Find out what your audience loves

The other change Nintendo made for the US market was to bundle the system with their light gun because, as Uemura told us with a smile, “America loves gun.” They also made an optional robot available to make the system “appear futuristic” and tie in with American popular culture of the time.

So after initial disappointment Nintendo went on to create one of the greatest successes in video game history. Even though they no longer occupy the same position in the market there’s a lot we can take from Nintendo’s successes and, perhaps more importantly, their failures.

Oh, and if you don’t know about the National Videogame Arcade and GameCity you should check them out, they’ve just been named as one of the UK’s most creative companies by Creative England.


Creating a robust event search facility for Derby Museums

It’s been a while since I’ve posted anything here because I’ve been busy working on the prototype for the new Derby Museums website. The prototype has come together very well but there are always going to be a few head-scratching moments. For me, one of these centred around how to search and filter events. The tricky part is that we have single-day events, multi-day exhibitions, three locations and lots of other filters.

I had initially thought of performing specific searches on the database based on the above conditions. So I’d grab the conditions of the users search e.g. ‘Show events between tomorrow and next Thursday’ or ‘Show events for children at Pickford’s House’ and search on that. But it became clear pretty quickly that there are far too many conditions that could come into play to make this clean so I changed tack. Instead I decided to pull in results for all events and exhibitions from a single search and then filter them out with if/else conditions inside a while loop.

Finding events that span multiple dates

Another aspect that increased the complexity a little is searching for events that span multiple dates. As you’d expect the event is stored with it’s start and end dates in the database. Matching an event on a specific day is easy. If I search for events that are running on June 30th all I need to do is match events with start dates on or before June 30th which also have end dates of on or after June 30th. This would turn up any single-day events on that date or any multi-date events running on that date. But what about multi-date event that start and end after our search range? Or events that start before our first search date and that end before our end search date? That condition could legitimately match events that are running for the start of our search range, but it would also find events from any point in the past.

What are all the event search conditions we need to match?

I found it easiest to draw this out visually. In the following example we want to match events 1 – 4 but not return results for events 5 and 6.

[  jan  ][  feb  ][  mar  ][  apr  ][  may  ]
         [ ———————— event1 ———————— ]
         [ ——— event2 ——— ]
                        [ ——— event3 ——— ]

I worked out the following set of search conditions to achieve this:

Condition 1: Finds event1

if event start date is before first search date AND event end date is after last search date

Condition 2: Finds event1 & event2

if event start date is before first search date AND event end date is after first search date

Condition 3: Finds event3

if event start date is before end search date AND event end date is after last search date

Condition 4: Finds event4

if event start date is after first search date AND event end date is before last search date

We can discard Condition 1 as Condition 2 returns those results too. Now that we have our logic we can translate this to code. I put the following inside a PHP while loop.

if ( (isset($filter_date_from)) && (isset($filter_date_to)) ) {

    if ( 
    ( ($eventdate <= $filter_from) && ($enddate >= $filter_from) )
    ( ($eventdate <= $filter_to) && ($enddate >= $filter_to) )
    ( ($eventdate >= $filter_from) && ($enddate <= $filter_to) )
    ) {
        // show results
    } else {
        // nothing found so skip to next iteration


This assumes you’ve set variables based on a user’s desired date range and pulled your events from the database and set variables for start and end dates.

All of the code for displaying the event listing comes after the above code. If an event doesn’t match one of the conditions the continue function will jump the loop to the next iteration.

What the above doesn’t take into account is that Museum locations are shut on Sundays and Mondays. Currently you could search for events on a Monday and receive results based on the above logic. The event is ‘technically’ on for the date you’ve searched but the Museum itself is closed. I’m not sure whether to return these results and point out that the Museum is closed or not to show them at all. That’s one for another day.