Quick python script to remove jpegs if raw exists

I have my EOS 80D set to save jpg and Raw files. However this means that when the files are imported I have a lot of wasted disk space. I’ve had this set for about 10 years which equates to about 80Gbytes of disk space. I thought I’d create this handy python scrypt to search through your Pictures folder for a file that has both a jpg and a cr2 file and then move the jpg to another folder – for review and/or potential deletion. NB This has worked on my Mac but please don’t hold me responsible if you accidently delete a precious folder.

import os
import shutil

raw_ext = '.CR2'
jpg_ext = '.JPG'
destination = '/Users/darren/Desktop/jpgs/'
source = '/Users/darren/Pictures/'
for root, subFolders, files in os.walk(source):
for file in files:
(shortname, extension) = os.path.splitext(file)
if extension == raw_ext:
if os.path.isfile(root + '/' + shortname + jpg_ext):
print 'Moving ' + root + shortname + jpg_ext
shutil.move(root + '/' + shortname + jpg_ext, destination)

Annoyingly WordPress doesn’t keep the indentations for python, so you can download the file here. Save the file in your home folder, unzip and edit the paths for destination and source and then run from terminal with python jpeg.py. You’ll need to crate your destination folder before you run the script. Comment out the last line with a # if you want to do a dry run!

Slow WordPress website?

If you’ve been running your WordPress site for a while then there may well be lots of junk in your core wp-options table. If you add an index to the autoload table you can often see a dramatic improvement in response time. You’ll need mysql/phpmyadmin access so only give it a go if you know what you’re doing!

ALTER TABLE `wp_options`
ADD INDEX `auto_idx` USING BTREE (`autoload` ASC);

Banksy Brace Yourself: The Spark That Drives Us

Music Drives Me… to Banksy

Music has always featured in my life. From early childhood memories of building train sets with my Father and listening to ELO. To heading off to the library during 6th form and borrowing Jesus And Mary Chain CDs, and then discovering the Pixies and seeing my first gigs. Music really moved me as it moves so many other people, and for me I’d happily go to a nightclub and dance all night on my own, lost in music.

The Brace Yourself Banksy
The Brace Yourself Banksy

I’d written my own songs, and despite not being able to sing a note started managed to convince other people to join me on stage; the first and probably highlight being a rewritten version of Belinda Carlisle’s Heaven on Earth at a Durham College. This was followed by busking and a lot more writing in Nottingham. However, despite having a growing collection of guitars I didn’t really move forwards for a few years.

The Start of The Band

That is until one day in 2006 my neighbour Simon asked if I’d like to join him and get a band together to play a few songs at his 40th Birthday party. Although Simon was an accomplished pianist he decided that he wanted to level the playing field and for us to pick new instruments to learn from scratch. We started with him on drums, me playing bass, and Kevin on guitar. There followed a few years of religious practice at Panic Studios in Acton, the eventual hiring of Vanessa the singer and ‘Six and One‘ were born – because we were all parents and between us had 6 girls and only one boy.

The 40th birthday party passed with fairly average renditions of 500 miles, Blondie, Susan Vega, and a Snow Patrol song. Soon afterwards Vanessa left to go up North. Vanessa was replaced by Ciara and Mark was added on lead guitar. Weekly practices at Panic continued, and with new members and a different number if children we needed a new name! Being a new Dad I spent a lot of time going to museums (I especially remember Hampton Court) and the cynical policy of directing people out of the museum through the gift shop. I think we ended up in the pub having a discussion and Simon really liked my idea of Exit Through the Gift Shop, and it ended up being our name with this line up. I bought the domain name, and I even got a t-shirt made with the name on it.

My Exit T Shirt My Exit T Shirt

Exit Through The Gift Shop

The Next Phase

Having Mark on board grew our ambition (as well as our ability) and we started playing more songs, and had another gig at the school fete that most of the band’s children attended. We played similar cover songs, although I think a Reef song got added to the set. I persuaded my wife to video the performance and I even went as far as uploading it to my YouTube account, tagging it with our band name “Exit Through The Gift Shop“.

We had a bit of a hiatus because Ciara hadn’t really enjoyed performing in front of a large crowd on a big stage, and we settled back into learning more songs and working with a number of different singers and improving our show. Then in 2009 Kevin the guitarist found Natalie who joined the band as singer and has sung with the band ever since. With our new found confidence we played an open-mic night in the Duke of York in Hanwell, which eventually led to us being booked for gigs there, and then further afield in Kingston, Hammersmith, and Central London. Around about this time Mark noticed that Banksy had painted his work ‘Exit Through The Gift Shop‘ for his June 2009 Bristol exhibition and thought nothing more than it being a cool meme.

Gigs In The Duke of York
Gigs In The Duke of York

A Message from Banksy

Then in January 2010 I got a strange message on my YouTube account that held the Exit Through the Gift Shop videos. It was along the lines of “Oh no, we’ve both turned up to the party wearing the same dress, could I borrow your name for a while because I had it earmarked for a film.”. He continued on to say that if we wanted to change our name then in return he’d personally paint you a new backdrop” and it was signed off Banksy. I immediately sent it on to the rest of the band, who were a mixture of excitement and disbelief, but we wrote back and said that we’d be more than happy to change our name and came up with two alternatives and asked him to choose one to rename us. The alternatives we offered were “Brace Yourself” and “Unexpected Item“. Banksy chose “Brace Yourself” and then asked us if we had any guidance for him on how we’d like the backdrop. We agreed to cede creative direction to his genius and just asked him to do whatever he wanted as long as it was big and bold!

And then it all went quiet!

The film was launched and we hadn’t been invited to the premier, and we started to worry that it’d all been a hoax. I had a feeling that everything was going to be OK, because I couldn’t believe that somebody who was famous for his social and political commentary would go back on his word. Because we all live near media land in West London, some of the other members of the band started to put out feelers to journalists and PR people to try and find out what was happening.

However around the end of the March I got a message on YouTube saying that the backdrop was ready and it was about to be delivered. This time the message was signed by Pest Control which got us very excited that this was looking genuine.

The Delivery

The next day I got a call from Simon, who was working from home, to say that a white van had arrived and delivered a large brown package to his house. I was working around the corner and quickly ran up to his house and we took the parcel up to his loft and nervously started opening it.

Opening the Banksy Parcel-untitled- 022

Opening the Banksy Parcel

Within a few minutes we had it unravelled and laid out on the floor, it was massive, about 8ft x 6ft and stunning – the Grim Reaper driving a bumper car with concentric circles behind it. I think that’s when it finally hit me how significant this was. As well as being blown away by the quality of the painting I was personally very pleased that everything was well in the world and Banksy was a man of his word!

This was also about the time everything started going wrong for me in the band, as is often the case in a situation where a group of people’s circumstances change and the members of the group have different ideologies. Fortunately I had a holiday planned and was away for all the radio and TV interviews that were scheduled, although it was very interesting to watch from afar how the story was being retold. A version of the events even made it in the Telegraph and Guardian, and even Ealing Today have a quote from me!

“I, personally am really happy with the outcome because we’d read that he was a genuine man and that he does lots to help people out and I’m really pleased that he was true to his word.”

As the story spread, the painting was valued by a nice man at Sothebys and it was suggested that it should be insured at £200,000. It was obvious that it was too valuable for us to perform in front of and secure storage was arranged for it. The question of ownership was raised and one of the band drew up an agreement that stated our collective ownership of the painting, and that if we wanted to sell the painting we would require a majority vote (ie 3 out of 5 of the band members).

We launched the band with the new name and a copy of the backdrop at the Brentford St George’s day festival, and although we did invite Banksy to come along, I think he was too busy with other things!
The band continued, with the Banksy experience increasing our confidence; we recorded some cover songs as the amazing High Barn recording studios in Essex, and played more songs to larger audiences, the highlights for me being the Brentford Festival 2012 and playing the Shakespeare pub in Victoria.

One of the High Barn session songs, Poker Face can be heard here

Playing the Brentford Festival
Playing the Brentford Festival

A New Band

However, the experience I’d had around the Banksy led me to enjoy in the band less and less, and by the end of 2010 I had left to start another band. I got a lot of out of exploring my own songs rather than playing other people’s songs. My new band, Power Corruption & Lies is starting to come together with almost an album’s worth of material on SoundCloud and with a number of gigs booked this year.

Brace Yourself in 3D

The Banksy experience was a great story but with the painting sitting in safe storage it wasn’t very satisfactory. It was very exciting when Banksy turned the concept into a 3D experience by bringing the Grim Reaper to life in his bumper car as the climax of his New York shows in October 2013 which sparked further conversation about what it meant.

Stealing Banksy

We’d all been trying sporadically to find a platform to show the piece so that more people could appreciate it, and Simon came up with the goods last week (April 2014) when it was shown alongside other pieces at the controversial Stealing Banksy show in London.

Banksy Selfie
Obligatory Banksy Selfie

I really enjoyed meeting up with my old band members and we all got a buzz out of seeing our painting being displayed there and taking the obligatory selfie. I especially enjoyed chatting with the attendees of the show and discussing what the painting meant. There were some great ideas, most based around mortality, but it was pointed out that the spark that sends the power to the bumper car was very prominent – perhaps that is an indicator of what drives us through life?

Music is the spark that drives me, what drives you?

SyncConf 2013

It was a crisp winter’s morning as I took the train across the Essex countryside watching the sun come up on the way to Norwich for SyncConf. The venue was just a little walk down the main High Street in Norwich and had a stage fit for rock-bands rather than a conference.

Kevlin Henney Keynote

However this didn’t seem to put off Kevlin Henney and he sped through his theory of how to make great software using some great examples. His Five Considerations outlined were:

Economy – I liked Kevlin’s point about the fact that developers and architects feel they are considered to be effective and productive by the volume of code they write and not the quantity of problems solved. This leads to rewarding verbosity. He also covered the other considerations of Visibility, Spacing, Symmetry, and Emergence. Kevlin’s told us that he came up with these Five Considerations and his entire book whilst brainstorming them in a bar in Florida, I think it’s a great exercise to carry out for any developer or team, what would your Five Considerations be?

Kevlin also discussed the study  about Team IQ, the findings of which say  the easiest way to increase your Team’s IQ is to employ more women in your team.

“The 90 minute Guide to Agile – What, Why, How”

Next was Allan Kelly’s whistle stop tour of Agile “The 90 minute Guide to Agile – What, Why, How” which was a great overview of the Agile movement based on case-studies of Near-Shoring development work in Cornwall. I particularly liked the IT Alignment Trap study , that showed that a company with effective IT will be more profitable than a company with aligned IT, ie Your company’s profit margin is determined to how effective your IT department is at getting things done, rather than how aligned your IT department is to your business needs and processes.

IT Alignment Trap
IT Alignment Trap

Alan, using his examples also highlighted how expensive it was fixing defects and bugs and that advocated moving across to Test Driven Development, which he said was winning his clients business over competitors who were not offering TDD, he went on to boldly state that in 8 years time and if you aren’t doing TDD you won’t have a job! This makes the case that the old quality versus price argument isn’t actually true, if you reduce quality you actually increase the price of a project (and the time taken) because you spend so much time refactoring and bug-fixing.

Another great concept form Alan was that once a company’s development team had gone Agile, it had been catching and the entire company had switched over, with the other business teams using Kanban boards for their Sales Pipeline so that the entire company could see at a glance what was happening.

Benjamin Mitchel – Kanban

After lunch Benjamin Mitchell gave us a very entertaining outline of his Kanban experiences at a Merchant Bank and then at BBC Worldwide, with a nice small-batch versus bigger batch audience participation game. We had a good discussion about how working under Kanban can feel a bit like working down the Code Mine with a never ending stream of work which had me thinking about alternative ways for rewarding teams. Benjamin finished up discussing coaching and how difficult it can be being a ScrumMaster or a Team Leader but brought in the concept of the Ladder of Inference to help us understand the thinking process we go through from observing something (someone being late to a meeting for example), and taking action (shouting at people!).


Sean Phelan – Endnote

It was great to hear Sean Phelan (my old boss from Multimap) close the conference with a behind-the-scenes look at the business decisions behind Multimap’s successful sale to Microsoft. I especially enjoyed the wry point he made about them having to batten down the hatches in 2004 (about when I left) as the 2nd dotcom bubble burst and move away from carrying out speculative development only for Google’s Mapping technology to leap frog Multimap’s two years later.

Overall SyncConf 2013 was a very well-run event, with some inspiring speakers, and great value. It was also lovely to catch up with so many of my ex-colleagues from Multimap. Here’s to the next one.


Teaching Coding

Sounding out the London tech industry recently it seems there is a shortage of good, experienced coders and developers right now, and those that are around have been snapped up by the financial services industries.

Being involved at my daughter’s primary school and thinking about Eric Schmidt’s comments about our education system I’ve been thinking about my experiences learning to code and how we can find ways to encourage our children to become more active coders.

After visiting Bletchley Park last weekend and playing with the BBC Acorns and ZX Spectrums it took me back to my youth and how I learnt to code. Back in ’82 about 20% of my 150 strong peer-group at secondary school would play and exchange games on these platforms, games like Dogfight, Deltawing, Commando, Turbo Esprit and Elite.

DeltaWing Loading Screen

We were all pretty passionate and excited about the latest release just like my children are today with the latest games. A handful of us got a bit more interested and would go through the laborious process of typing in simple games from computer magazines, and even designing our own games (I remember trying to develop a Spectrum version of Galaxians for example), but the majority were happy just to play games. The few of us who did write were self-taught from the code examples we were learning from as we copied and typed.  IT/ITC didn’t even exist at our schools.  The closest we got to an IT education was programming simple Space Invaders games on our HP programmable calculators in Maths when the teacher wasn’t looking. None of our teachers were programmers and I don’t remember being encouraged by my parents to programme either. It was just exciting, new, and it felt limitless, and the games we were playing were being developed in London and they were cool – that is what inspired me.

So how can we get more children programming?

I think Eric Schmidt was right, we need to stop teaching them how to use applications and start showing them how they are written and can be developed. If we could show children what is possible with a text editor and the right libraries then surely they must be inspired to create their own projects – after all sharing them these days is going to be a whole lot easier too. I’m right behind the BBC and Manchester Metropolitan University’s aim to encourage more people to have an interest in programming – let’s hope it takes off!

(btw I still claim to have developed a basic website back in 1985 by producing a simple paginated text based magazine (about my ski-holidays and local events) and remember sleepless nights working out the business plan wasn’t going to get off the ground because the costs of sending out the content on C15 by Royal Mail was going to be prohibitive – thank goodness for TCP/IP.)

Feeling Local – Sentiment Analysis for Communities

I have the vision for a local website which aggregates all the news feeds from Twitter, Facebook, You Tube, and Flickr in the local area and then runs a quick sentiment analysis on the information to decide if the area is overall happy or sad. Using a weather metaphor we then can show the users if the area is sunny/stormy/rainy depending on the emotions captured. We will then encourage users to add their own images and messages to the page to give them a greater feeling of connection, and empowerment over the feelings in their neighbourhood. We would allow users to share their sentiments and comment on the page using existing social networks and to encourage other local users to participate.