Backup WordPress to Dropbox on Amazon EC2 Centos Instance

I have been running multisite WordPress on my Amazon EC2 instance for almost a year and now that I have four sites running concurrently it is time to sort out a proper backup routine. Having had a look at all of the options and plugins it seemed like a good idea to backup WordPress to Dropbox and because of the size of my instance wouldn’t cost anything. I also wanted full control via Linux rather than installing a plugin which I didn’t trust. Also a good chance to do some more learning. Figured it would be a good idea to put the steps here so someone else can create should they want to do the same. I decided to run Dropbox under the ec2user as that is how everything else on my server is setup.

Backup WordPress to Dropbox

Install Dropbox

Download the latest stable Dropbox.

32bit

cd ~ && wget -O - "https://www.dropbox.com/download?plat=lnx.x86" | tar xzf -

64bit

cd ~ && wget -O - "https://www.dropbox.com/download?plat=lnx.x86_64" | tar xzf -

Lets start Dropbox

~/.dropbox-dist/dropboxd

You should get a message saying your account isn’t syncing and to visit a URL. Copy the URL to a browser and login. Wait for the welcome message and then use Ctrl-C to exit. Now lets ensure that Dropbox will start when we restart our instance. Create a startup script.

sudo vim /etc/init.d/dropbox

If you are using a stock Amazon Centos OS then copy the below. If not check for a script at the bottom of this page.

# chkconfig: 345 85 15
# description: Startup script for dropbox daemon
#
# processname: dropboxd
# pidfile: /var/run/dropbox.pid
# config: /etc/sysconfig/dropbox
#

### BEGIN INIT INFO
# Provides: dropboxd
# Required-Start: $local_fs $network $syslog
# Required-Stop: $local_fs $syslog
# Should-Start: $syslog
# Should-Stop: $network $syslog
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# Short-Description: Start up the Dropbox file syncing daemon
# Description: Dropbox is a filesyncing sevice provided by dropbox.com
# This service starts up the dropbox daemon.
### END INIT INFO

# Source function library.
. /etc/rc.d/init.d/functions

# To configure, add line with DROPBOX_USERS="user1 user2" to /etc/sysconfig/dropbox
# Probably should use a dropbox group in /etc/groups instead.

[ -f /etc/sysconfig/dropbox ] && . /etc/sysconfig/dropbox
prog=dropboxd
lockfile=${LOCKFILE-/var/lock/subsys/$prog}
config=${CONFIG-/etc/sysconfig/dropbox}
RETVAL=0

start() {
   echo -n $"Starting $prog"
   if [ -z $DROPBOX_USERS ] ; then
      echo -n ": unconfigured: $config"
      echo_failure
      echo
      rm -f ${lockfile} ${pidfile}
      RETURN=6
      return $RETVAL
   fi
   for dbuser in $DROPBOX_USERS; do
      daemon --user $dbuser /bin/sh -c "~$dbuser/.dropbox-dist/dropboxd&"
   done
   RETVAL=$?
   echo
   [ $RETVAL = 0 ] && touch ${lockfile}
   return $RETVAL
}

status() {
   for dbuser in $DROPBOX_USERS; do
      dbpid=`pgrep -u $dbuser dropbox | grep -v grep`
      if [ -z $dbpid ] ; then
         echo "dropboxd for USER $dbuser: not running."
      else
         echo "dropboxd for USER $dbuser: running (pid $dbpid)"
      fi
      done
}

stop() {
   echo -n $"Stopping $prog"
   for dbuser in $DROPBOX_USERS; do
      killproc ~$dbuser/.dropbox-dist/dropbox
   done
   RETVAL=$?
   echo
   [ $RETVAL = 0 ] && rm -f ${lockfile} ${pidfile}
}

# See how we were called.
case "$1" in
   start)
      start
      ;;
   status)
      status
      ;;
   stop)
      stop
      ;;
   restart)
      stop
      start
      ;;
   *)
      echo $"Usage: $prog {start|status|stop|restart}"
      RETVAL=3

esac

exit $RETVAL

Now we need to add a file which contains the ec2-users that we want to run the service.

sudo vim /etc/sysconfig/dropbox

Add the following line to the file and save (:wq!)

DROPBOX_USERS="ec2-user"

Now we need to sort the file permissions.

sudo /bin/chmod 0755 /etc/init.d/dropbox
sudo /bin/chmod 0644 /etc/sysconfig/dropbox
sudo /bin/ls -l /etc/init.d/dropbox /etc/sysconfig/dropbox

Turn it on

sudo chkconfig dropbox on

Check that it worked, look for Dropbox in the list.

sudo chkconfig --list | egrep '3:on|5:on' | less

Start the service

sudo service dropbox start

Hopefully everything should now be working fine.

Move Dropbox Folder

I moved my Dropbox folder to my EBS volume so it would persist, then symbiotically linked it back to the home directory.

sudo service dropbox stop
sudo mv ~/Dropbox /vol/Dropbox
sudo ln -s /vol/Dropbox ~/
sudo service dropbox start

Now it is time to tidy up the directories where Dropbox sit and ensure that only the folders you want synced are turned on.

Turn On Dropbox Selective Sync

Go to your home directory

cd ~

We now need to download the Python Script which is used to manage Dropbox from the Command Line and give it the right permissions.

wget -O ~/dropbox.py "http://www.dropbox.com/download?dl=packages/dropbox.py"
chmod 755 ~/dropbox.py

Now lets check Dropboxes status

./dropbox.py status

Hopefully should now be syncing up, most likely you won’t want everything to sync so you can use the ‘exclude add’ command to stop folders you don’t need. Run the below and it will show your synced folders.

cd Dropbox
~/dropbox.py ls

You can stop each of them syncing by using the following command.

~/dropbox.py exclude add ~/Dropbox/Public
~/dropbox.py exclude add ~/Dropbox/'Camera Uploads'

If you run the below again you can see that they are dropping off.

~/dropbox.py ls

Also worth turning off LAN sync as you won’t need it.

~/dropbox.py lansync n

Backup WordPress to Dropbox Including Database and Content

Create a folder for backups.

mkdir /vol/Dropbox/Backup

Now we want to write a quick script to copy the files from html/wp-content to Dropbox/Backup/wp-content and dump the MySQL. Create the below file, it should be synced to your other computers as soon as you save.

vim /vol/Dropbox/Backup/backup.sh

Here is the script, change the paths /vol/html/ to where you have your wp-content folder and /vol/Dropbox/Backup to where your Dropbox sits, plus update your MySQL password.

#!/bin/sh

echo "Backup Start"

echo "Syncing wp-content Files from html to Dropbox"

sudo rsync -vaz --delete --update /vol/html/wp-content/ /vol/Dropbox/Backup/wp-content/

echo "Backing up database"

mysqldump -uroot '-p[password]' --single-transaction --routines --triggers --all-databases > /vol/Dropbox/Backup/backup_db.sql

echo "Backup Finish"

Now lets run it to see if it works. (Update: previously I had used cp to copy all the files across every night. However I just noticed that it melts my server doing the update so have just updated to use rsync and just copy the files that have changed. Showing my Linux rookie credentials.)

sudo chmod u+x /vol/Dropbox/Backup/backup.sh
sudo /vol/Dropbox/Backup/backup.sh

Now we have our script sorted we need to create a cron job to run it once a day at 1am. You will need to stop cron.

sudo service crond stop

Now lets edit the file which runs our jobs.

vim /etc/crontab

Insert the below line, below this one “# * * * * * user-name command to be executed”:

0 1 * * * root ./vol/Dropbox/Backup/backup.sh

Save and start cron backup.

sudo service crond start

You can now rest easily that every night at 1am you can backup wordpress to dropbox including the entire wp-content folder plus a database dump. Perfect for the small time blog runner. Props to the following sites that were a big help in this process.

Music To Write This Code To

Richie Hawtin – Essential Mix: Live At Watergate, Berlin. Hopefully shouldn’t take you two hours to do this but this is just the type of mix to get lost in code to. Off to Berlin next month and if I hear anything like this I would be very happy.

WordPress Apache Permissions For Easy Update

I need to update my WordPress Apache permissions and I have them set so WordPress doesn’t have write access to the main HTML folder. I always have to Google to remember what I need to set so figured I would write it here so I wouldn’t forget.

sudo find /vol/html/ -type d -exec chmod 777 {} \;
sudo find /vol/html/ -type f -exec chmod 777 {} \;

Once these have run you can run the update successfully, you then just put the files back to my what my previous post recommended.

sudo find /vol/html/ -type d -exec chmod 755 {} \;
sudo find /vol/html/ -type f -exec chmod 644 {} \;
sudo chmod -R 775 /vol/html/wp-content;

Happy updating, though if it doubt you can’t beat the Hardening WordPress page on the Codex.

Music To Write This Code To

TODD TERJE – Strandbar (disko) – Let that Nordic disco take you to a warmer place.

LeWeb London 2012 – Lessons and Learnings

I was very fortunate to spend two days at LeWeb London 2012 on the 19th & 20th June this year. Methodist Central Hall in Westminster was a fitting venue for what turned out to be an informative debate on the state of the European start up scene. It provided me with some really good insight into what it takes to build and maintain a successful business. There was a certain amount of fluff and pomp from both startups, investors and successful entrepreneurs so I thought it would be nice to cut through that alongside my highlights and learnings below.

LeWeb'12 London 2012 Stage

LeWeb London 2012 Stage

LeWeb London 2012 – Highlights and Key Takeaways

Day One

Jamie Oliver,  Television Personality & Kevin Systrom, Co-Founder & CEO, Instagram with Loic Le Meur, LeWeb  London 2012 Founder

I have to admit I am quite a fan of how Kevin Systrom has approached building Instagram and in the first big talk he was alongside Jamie Oliver.

[youtube_sc url=http://www.youtube.com/watch?v=Pdbzmk0xBW8]

Key Takeaways:
  • Photo’s bridge gaps that languages can’t
  • People tend to be much nicer when using images than when using words
  • Instagram has democratised the creative process
  • Photo’s on Instagram tend to have around a 10 hour interest window
  • Instagram now has 50 million+ users
  • Instagram solved the problem of how people communicate visually using mobile
  • Instagram API has allowed them to keep their focus on mobile and let other people fill out their ecosystem
  • Instagram are working on the ability to allow you to go back in time to revisit older photos

“It’s like an empty stage with a drum kit and guitars–businesses need to hire passionate musicians to use them.”

Jamie Oliver on social media

Phil Libin, CEO, Evernote & Loic Le Meur, Founder, LeWeb London 2012

[youtube_sc url=”http://www.youtube.com/watch?v=1Y0_lC5tZGI”]

Key Takeaways:
  • Evernote has 34 million users
  • They make money from happy people and currently 4% of people pay
  • The longer someone is a user the more likely they are to pay which rises to a maximum of 25%
  • Average $US per user per platform
    • $1.06 – Android
    • $1.44 – Windows Phone 7
    • $1.79 – iPhone
    • $2.01 – Blackberry
    • $2.18 – iPad
  • 50% of Evernote’s development time is spent on Apple 50% on all other platforms
  • Evernote Food makes $6.73 a user due to its niche user base
  • The 30% they pay to Apple is a bargain when you include the marketing you get from being in the App Store
  • More than happy for users to use in app purchases as it reduces the friction of their payment process

“Spend every single minute building the best product, if Google or anyone else manages to build a better product then they deserve to win and the world will be a better place for it.”

Phil Libin on competition

Jason Goldberg, Founder & CEO & Bradford Shane Shellhammer, Co-Founder & Chief Creative Officer, Fab & Michael Arrington, General Partner, CrunchFund

[youtube_sc url=”http://www.youtube.com/watch?v=Gsj-a9v7IIE”]

Key Takeaways:
  • Jason Goldberg lost $47 Million dollars in his previous start-up
  • Focus on being the best at one thing
  • When they pivoted from a Gay Social site to an eCommerce platform they turned their old site off for three months to ensure they could focus on getting the new one right
  • Build the product first then the company will follow
  • Experiment to get the product right then iterate to improve specifics
  • 50% of their members come from social sharing
  • Friction is the most common problem for people to pay for things online

“It’s all about shifting from impressions to connections”

Bonin Bough from Kraft on the future of online advertising

Martin Varsavsky, Founder & CEO, Fon

Amazing talk on how Martin achieves the focus and lifestyle that he needs to run a very successful company at scale.

[youtube_sc url=”http://www.youtube.com/watch?v=GB10ilqE6sw”]

“Delegation means that things will never be done the way you want but it is the only way to buy you time to do the things you love.”

Martin Varsavsky

Methodist Central Hall Westminster venue for LeWeb London 2012

Methodist Central Hall Westminster venue for LeWeb London 2012

Day Two

Riccardo Zacconi, Co-Founder & CEO, King.com & Eric Eldon, Co-Editor, TechCrunch

[youtube_sc url=”http://www.youtube.com/watch?v=Kpz9vpBoSKE”]

Key Takeaways:
  • King.com has 12 million daily users, 50 million monthly users but focus is on daily numbers
  • They launch 80 games a year on their website for testing and the ones that get traction are then added to Facebook around 10%
  • Monetise via advertising, virtual goods and VIPs
  • Casual games are the most popular
  • Cross platform capabilities really helps drive growth
  • Core demographics female over 25 with core players female over 35
  • Built a platform which enables them to wrap games with a social layer easily to help them scale

Shakil Khan, Head of Special Projects, Path &Loic Le Meur, Founder, LeWeb London 2012

[youtube_sc url=”http://www.youtube.com/watch?v=thH_DBqsmQk”]

Key Takeaway:
  • Facebook is copying Path on mobile!

“Facebook is building the cities, Path is building the homes.”

Shakil Khan

Sam Shank, Co-Founder & CEO, HotelTonight & MG Siegler, General Partner, CrunchFund

[youtube_sc url=”http://www.youtube.com/watch?v=dxxRe_d1inE”]

Key Takeaways:
  • Same day booking system, 100% focus on mobile
  • Some hotels still require a fax for booking
  • 8 seconds to pay, 3 taps and a swipe, was just 3 taps but was too easy to book accidentally
  • No legacy and a very singular focus on mobile and same day booking allows them to differentiate

“Lack of focus is the biggest killer for startups. I named my company HotelTonight to enforce this.”

Sam Shank

Baratunde Thurston, Comedian

[youtube_sc url=”http://www.youtube.com/watch?v=li0AjbJca00″]

Key Takeaways:
  • He is a funny dude!
  • The Onion vote on best headlines for major stories out of a list compiled by staff

Dr. DJ Patil, Data Scientist in Residence, & Josh Elman, Principal, Greylock Partners

This was one of my favourite talks and they both did an amazing job of showing how big data works and can help shape decisions and the specific example from Twitter from 13 minutes in is priceless.

[youtube_sc url=”http://www.youtube.com/watch?v=L2snRPbhsF0″]

“Data science is the new black.”

Tim O’Reilly

Key Takeaways:
  • Use data to have a conversation
  • Use data to find inflection points and then optimise towards
Data Scientific Method
  • Start with a question
  • Leverage all your current data
  • Create features and run tests
  • Analyse and draw insights
  • Let data frame the next conversation

Conclusions

So there was a lot to take in at LeWeb London 2012 and congratulations to Blippar for winning the startup competition. Had an interesting meeting with Teleportd who came third about how we might be able to use their social photo aggregation tool at Metro.

LeWeb London 2012 – My Learnings

It wasn’t until a couple of days later when I sat down to compile this post that I really began to distil how to apply startup thinking to a more established company. However can any large company these days really afford not to think like a startup? The world is changing around us at such a pace and modern technology aids rapid disruption of just about anything, so no one should get complacent.

Most of the questions that the startup competition judges asked, were around what problem were these startups trying to solve. The more concrete the answer the easier it was to see how effective each of these businesses were. The other really useful part of having a clear problem to solve was the focus that it provided in asking the right questions around how the product was being developed.

Focus was a reoccurring theme throughout from both entrepreneurs and seasoned executives. The CEO of HotelTonight even went as far as naming his current venture to ensure that they weren’t distracted from providing the best experience when you are in need of a Hotel Tonight.   When Fab pivoted rather than trying to keep their existing community happy they turned the site off whilst redeveloping to ensure that they weren’t distracted at all.

I can’t imagine that these decisions were easy or to some people seemed very logical but are very Lean in their approach. The clear goals and focus also make it much easier to use data in a way to shape decision making. By having a clear focus on growing users Twitter was able to work out the tipping points to turn first time users into regulars. This enhanced their focus on optimising those parts of the user journey that provided these metrics until they reached hyper growth.

User experience was another key theme throughout LeWeb London 2012, with so much choice available to end users if your product doesn’t delight them on a regular basis then they aren’t likely to stick around. This can be hard from a scientific standpoint to measure and optimise but focusing on keeping people happy has allowed Evernote and many others to grow very sustainable profits. Path’s lazer focus on this area has also allowed them to differentiate from Facebook on mobile to the point that they are now copying them.

There is always someone bigger out there but most likely they will have a much larger set of people to keep happy and that can end up detracting from the end product. You have to be constantly looking forwards and focused on improving rather than looking at other people. Copy cat startups got a pretty bad rap from stage participants and especially from investors. By doing something different and disrupting existing businesses your potential rewards are so much greater than being just another clone.

LeWeb London 2012 encapsulated an amazingly diverse set of ideas and thoughts into a rather enjoyable set of talks that didn’t really speak to the “Faster than realtime” theme but not sure that was the point. London as a startup scene definitely isn’t the Valley but that is probably why it is interesting to many.

Key Takeaways:
  • Solve a problem
  • Ask the right questions
  • Focus on the above to at all costs
  • User Experience is a key differentiator
  • Use data to drive conversations and frame decisions
  • Happy users stick around longer and spend more money
Metro Logo in Blippar Presentation at LeWeb London 2012

Metro Logo in Blippar Presentation at LeWeb London 2012

Build, measure, learn, iterate my vision for an agile future.

Recently I have been going through a process of looking 18 months into the future and as part of that have written a story of to illustrate where we are going and how I am going to help them get there. I thought it would make sense to publish this almost as a time capsule here to see how far I can get in my ambitious plans.

My Story to Come

This story begins three years ago when I first joined Metro to create a development team. Prior to this all development had been done by a central group resource, they took at least 6 months to get anything done and when it was finally delivered, it wasn’t what you asked for in the first place. The lack of agility was seriously harming Metro’s ability to make the most of product, commercial and editorial opportunities that were presented to them. It took the next 18 months to change not just the way that development was run, but also the way that Metro thought about development and the processes that guide it. Our first goal was to become Agile which is a word that is bandied about a lot but essentially means working in smaller iterations using small self-organising teams and regularly reviewing what and how we are working to continuously improve.

This path was not without its road bumps and the first major one was the development of the TV Product, this was an extremely complicated system which allowed people to write reviews of 15,000 TV shows. It took over six months of development and generated less than 100 reviews. As part of our Agile process we sat down at the end at realised we had to change even further. We needed to understand the drivers of ours users behaviour and ensure that we understood them before we over engineered a system which didn’t do what they needed. This is when we started to look at the Lean Methodology of manufacturing promoted by Toyota since the 1990’s and more recently by Eric Reis in his book The Lean Start-up. Being lean means that you limit the number of things that you are working on and look at each iteration more scientifically. For each iteration you have a customer based hypothesis that you build as quickly as possible before releasing and measuring its impact against your hypothesis, you then make your next decision based on the feedback.

Build, measure, learn, iterate became the development team’s mantra and ensured that we only built what was required and we learn’t from every iteration. This ensured waste was kept to a minimum and constant feedback was able to help shape future developments. This enabled Metro to embrace the constant change that is present in our environment and use it as a competitive advantage. It didn’t take away the need for an end goal just ensured that the journey we took was as effective as it could be every step of the way. This quote I think sums it up nicely. “It is not the strongest of the species that survives, nor the most intelligent, it is the one that is the most adaptable to change”. It wasn’t just Metro who had used these principles Facebook have the words “Done is better than perfect” on their walls and both Facebook and Apple work in small teams specifically focused delighting their customers.

18 months ago Metro decided that they needed to take some brave decisions to diversify their business away from print revenues. With all of the learning that development team and Metro had been through over the previous 18 months and with each of the new start-up businesses having a technology component I decided it was time to break these agile and lean practices out of the development team and get them in use in the wider business. I realised that the best way to do this was to get involved with each of these new ideas and ensure that the both development and business resources used our template of build, measure, learn, iterate.

Boiling all of our new ideas down to a simple test and using data to shape our decision making process has been instrumental in changing the face of Metro to the one that you see today. We now always test our assumptions and if they are not correct, we fail early and quickly adapt. All data and experiments are shared through the use of highly visible dashboards. This has allowed Metro to collectively learn from each other and this level of transparency and openness has accelerated Metro’s decision making process and enabled it to stay far ahead of their competition. I would like to finish with a quote from Winston Churchill “Now this is not the end. It is not even the beginning of the end. But it is perhaps, the end of the beginning.”

Books that helped me shape this vision.

Radical Management by Steve Denning
The Lean Startup by Eric Ries

WordPress Categories vs Tags

Categories vs Tags is one of the biggest decisions around how you setup a good taxonomy using WordPress. Utilising both categories and tags can make your site easier to navigate which will help both people and search engines. It has taken me a while to get my head around this so thought I would run through my thoughts in the hope that it might help shape your decision making.

Categories in my opinion are best used for the main structure of your site and can be thought about a bit like a menu. Each post should only be present in one category. Categories can also have  sub categories, this can be handy to split your content down into more specific areas when you have enough posts. A good example of this would be sport, for example for on a news based site you are quite like to have sport as a top level category, then under that individual sports such as football and cricket.

Tags in my opinion are best used to cut across categories and a post should have many tags but only one category. Tags have the advantage of being able to be combined to bring back more specific data when required. I think a good example of this would be a tag for “David Beckham”, as he is both a footballer and a celebrity he could appear under either a sport or celebrity category and if you wanted to get more specific you could search for both “David Beckham” + “Victoria Beckham” if you are interested in their goings on or “David Beckham” + “LA Galaxy” if you wanted to know about his latest sport endeavours.

Ensuring that your taxonomy is clean and consistent can really help both people and robots navigate your site. Starting out in the right way with the right structure will lead to better results for everyone as changing later can be quite detrimental to any search juice that you have built up especially if you have the category name in your URL.

Music to Write this Code to

My mate @josephshell going deep on the house tip for his night Milkface

 

An Agile Process Should Be Shaped To Fit Your Environment

We have been recruiting a Business Analyst for a big project that we have coming up at work. They have all been interested in how our current process works. It has got me thinking why our process is the way that it is and my conclusion is the main reason is that it has been shaped in a true agile fashion to fit the environment that we operate in.

It is easy to get some experts in, go on a course or read how SCRUM should be done and implement it exactly as they have described. I have however found that the most important part of the Agile process is the retrospective and subsequent changes to your process. This self learning and feedback needs to happen not just within the development team but also with the business environment that they operate in.

A lot of processes assume certain resource requirements and business buy-in. However this is rarely the case when you start out. There are a lot of companies that say they do agile but aren’t really agile more like Waterfall using SCRUM. Another major part of Agile is self organisation so someone managing the process too tightly stops this happening. Though at the beginning it is obviously good to start from a template and iterate from that.

It has taken me over 18 months to get both my team and the business in a place that they don’t just get Agile but they are Agile in their approach. Quite a bit of this was born out of making mistakes along the way and the specific learning that we were able to distill from those. We can still improve but that is part of the appeal to me.

Speed of adaptability is essential in the modern business world to stay competitive. It is also immensely rewarding to see a team come together and improve over time. Two weeks ago we released early for the first time in our history. I am sure it won’t be the last.

Music to Write this Code to

R.I.P. Mehdi, nuff said.

In Development the most obvious choice is quite often the best one

It started with a conversation regarding Node.js as one of my developers has been using it to write a RESTful API. We had spun up an Amazon EC2 server and RDS backend for the service, which is the beginnings of a content shaping algorithm. This rapid prototype has shown real promise and now we are looking at using it as the core to our Facebook Application Homepage. With this in mind I started to think about how this would work in a production environment. This is when I thought back to some recent experiences and quickly decided that Node.js as great as it is, really isn’t the best option for the team or company at this point in time. Here are my reasons why:

Support

Only one developer has any idea of how Node.js works and when there is a problem as there will be one when you are using cloud based hosting. This could be slightly mitigated by having a Wiki. However usually it is out of office hours during weekend support when you find out the Wiki is not quite 100% up to date.

Consistency / Learning Curve

Teams change and as we move forward we need to ensure that our code is written and approached in a consistent way. This will ensure that if a developer wants to get involved with different projects they can easily jump between them. It also ensures that if the person who wrote the code isn’t around supporting it is much easier. Yet another barrier to entry will also only reduce the ability to quickly up-size should the project or team need extra resources.

Agility / Speed

We are an Agile team and working in short iterations delighting our customers is what we do best. By being consistent we become more agile, it aids self forming teams and enables continuous learning. A common approach make it easier for the knowledge to be passed around which amplifies its effect. Working on similar projects allows my team to take those learnings and get faster at doing what they do. The libraries and helpers that are developed can be used in as many places as possible to reduce code duplication and increase testability.

History

My team inherited a custom written CMS solution that we have been supporting for the past 18 months. It was written using Apache Cocoon and GWT as a front end with an Adobe CRX NoSQL solution as the data store. Due to none of these technologies being widely known development was up to ten times slower than it should have been because of the learning curve and lack of consistency. We also chose to use MooTools as a JavaScript framework for our front end and this has restricted the interoperability of our site and it doesn’t get along with jQuery which is what the rest of the web uses.

Lack of a clear benefit

Node.js is a great solution if you have requirements for massive concurrency. However that requirement for our current problem as it will be cached behind Akamai. In this case there is not enough of a business reason to do something different.

As you can see I thought long and hard about this and I hope my conclusions make sense. I am really glad that we now have the knowledge of how Node.js works and when a project comes us that does have a clear benefit I will reconsider. However until then we are going to go with the obvious choice and rewrite this API in Spring MVC to be slightly less bleeding edge.

UPDATE Dec 2013: Looking back on the above post I still think it was the right decision at the time but the flip argument to all of the above is that it would have been great to learn some new technology and get the team enthused about this. Small distinct projects are a great way of trying out new bits of technology. Sure there is a risk associated if it doesn’t work out. However if you aren’t trying new things then you will never know when something better comes along. If I had to make the same decision again I would probably go the other.

Music to Write this Code to

Treasure Fingers brings the type of house sounds I like to the party every time.

HTC Titan Review (WP7)

As we were working on a Windows Phone 7 (WP7) application for work we had to buy some handsets for testing. I decided that I would give the HTC Titan a go as I was interested to see what it is like to use a phone with a 4.7″ screen.

It was also my first time using WP7 as an OS with my primary device being a iPhone 4. I was very pleasantly surprised when I got the phone out of the box that it wasn’t too heavy. Once I turned it on I was immediately drawn into the screen.

The setup process for WP7 is very straight forward and I really enjoy the simplicity of live tiles. The fact that they can update and show interesting bits of information without being complicated to setup is a real bonus to WP7.

I have spent a lot of time using Android recently and it always takes me a long time to get the widgets setup and the home screens working in a way that makes sense to me. There was none of this with WP7.

The great thing about having a really strong design is that a lot of the apps use this as their template so if you enjoy the way that this works it is easy to pick up and you automatically know how to use them.

I was also very impressed with the camera and software which seems to predict the best time to take the photo once you have the button pressed. Some really good results and always capturing the right shot was nice. I used SkyDrive to get the photos off the phone and into the cloud which is a nice touch.

Zune software is similar to iTunes and a necessary evil, much better than the random software that ships with Android but still overblown for what it is really. My friend has a Zune pass and says that it works out really well, got enough music myself without needing to stream.

This brings me to my major gripe with WP7 music playback, I listen to a lot of mixed music like the Fabric series, if you have ripped these as separate tracks then their is a skip in-between tracks. To me this is a golden sin and one of the reasons that I couldn’t use this phone as my main device.

The other main issue is the cost of Apps, due to the lack of numbers developers have to charge more. What would most likely be free on Android and £.99 on iPhone is upward of £3.99 on the WP7 marketplace. Makes it a lot harder to make those impulse purchases.

A final issue is that currently there is no Skype at all on the WP7 marketplace or integrated on the phone. This is crazy considering Microsoft owns Skype and a major oversight. I know they are probably waiting to do a deep integration but with family around the world no access to Skype is a real oversight.

Overall I really enjoyed using the HTC Titan for a couple of months and really think that WP7 Mango and the Metro interface should be a major competitor to Apple and Android if it can gain traction. Once Microsoft bakes Skype into it and allows you to stream to your Xbox as well as use it as a keyboard I think there will be more reasons to buy.

HTC have done a good job to give people a reason to buy something different from the lovely Nokia sporting WP7 and the screen with live tiles is just amazing. Good battery life and easy input on a big screen is a winner. Not going to replace my iPhone 4 but I have been missing WP7 since we moved on to building an Android App.

If you do get a HTC Titan or any Windows Phone 7 phone then you should download the Metro App for it here (shameless plug).

Specifications

Software : Windows Phone 7.5 Mango
Processor : 1.5GHz
Memory slot : No
Display : 4.7in 480 x 800 pixels multitouch
Connectivity : GSM/GPRS/EDGE/HSDPA, Wi-Fi 802.11b/g/n, Bluetooth,A-GPS
Ports : Micro USB, 3.5mm headphones
Camera : 8 megapixel, F2.2 lens, dual LED flash, and BSI sensorVideo
Video playback : 3gp, .3g2, .mp4, .m4v, .mbr, .wmv
Audio playback : m4a, .m4b, .mp3, .wma
Radio : No
Battery : Li-ion 1600 mAh
Size : 132x71x10mm
Weight : 119g

Music to Read this Review to

Girl Unit – Wut was one of the tunes of last year. Claude Vonstroke gives it a re-rub just making it slightly deeper.

Thinking Lean to Combat Change

I have been working in software development for ten years and the one constant throughout my whole career is change. Change in technology, change in working practices and changing business requirements. During this period I have constantly battled against the best way to deal with change so it has the least impact on the day to day activities of myself and my team and to ensure that our output is an actual business requirement.

The main way that we have achieved this is by becoming Lean which is based on a method of manufacturing invented by Toyota in the 1990’s. We have shortened our iterations to less than two weeks and limited the number of things that can be worked on at any time. This means that we can get feedback from our customers as early as possible and build what they want and not what we think they want.

Eric Ries has taken this methodology and applied it to starting a business, whether that business is new or part of a larger organisation. This approach which is customer centric focuses on building what the customer wants in as short a time as possible and then releasing it to learn from how customers actually use it.

It is a big change from the build it and they will come large product based development approach and takes a while to get right. However if each time you release something it is to test a theory and you get feedback that you can use to shape your future strategy and vision. It requires a direction but not a detailed project plan but multiple iterations or ability to change tact should reality not meet your expectations.

Music to Write this Code to

The Two Bears are absolutely smashing it at the moment. Not surprising when you know their musical heritage. This is one of their many top tunes.

WordPress Edit Image Not Working on Amazon EC2

I had an issue with my WordPress edit image not working when I installed it myself on Centos. If you would like the ability to do advanced image editing in WordPress when running on Amazon EC2 Linux you will need to make sure that you have installed the PHP GD libraries or none of the image editing capabilities will show up.

sudo yum install php-gd

After a lot of searching I found this great answer on Stack Overflow which pointed me in the right direction. Have added this step to my previous post for setting up WordPress as well.

Music to Write this Code to

Pinch – Qawwali – Call it what you will this is a bad tune.