UKD1 Limited We provide consultancy, PHP web development and support for web applications and ecommerce sites in the UK.

27Aug/100

Keeping Chromium updated on your Mac

This is a quick shell script which is how I make sure I keep the latest nightly version of Chromium on my Mac without much hassle...

#!/bin/sh
rm -f chrome-mac.zip chrome-mac
export CHROME_VERSION=`curl http://build.chromium.org/buildbot/snapshots/chromium-rel-mac/LATEST`
curl http://build.chromium.org/buildbot/snapshots/chromium-rel-mac/$CHROME_VERSION/chrome-mac.zip > chrome-mac.zip
unzip chrome-mac.zip
rm -rf /Applications/Chromium.app
mv chrome-mac/Chromium.app /Applications/Chromium.app
rm -rf chrome-mac chrome-mac.zip

Paste the above in to a file and then execute it with 'sh filename'.

Post to Twitter Post to Delicious Post to Facebook

Tagged as: No Comments
20Jun/10Off

MongoDB London 2010 – why you should have gone!

MongoDB mugs
Image by hoerner_brett via Flickr

Friday was awesome; a combination of geeks, MongoDB, Pizza, Beer & free swag.

I wasn't expecting the MongoDB London conference to be quite as good as it was, but it was really insightful and useful for non beginners. We learnt about proper indexing, useful tips on indexing and schema design as well as doing some hacking with some fellow conference goers.

The schema design talk showed us the advantages and disadvantages of various ways of structuring documents, and highlighted some general things to watch out for.

I found it particularly interesting that, for instance, if you nest things like comments (for threading) that indexes need to be made for each level of the nest - which makes sense when you think about it. However, this means that if you are trying to retrieve all comments written by a particular user, multiple indexes won't be used.

Also, if you were designing a system which coped with a large number of replies / comments, for instance a forum you may hit the 4mb document limit for a single thread.

Sides from NYC conference, as the London ones aren't up as of writing this:

A talk entitled "Approaching 1 Billion Documents" gave us some insight about how MongoDB scales and reminds us that you can have a maximum of 24,000 collections per database at the moment. Not that this should pose a problem for most of us. You can view the slides here:

Other talks, such as ones on general administration were also insightful - it's nice to hear about the different backup strategies and ways of checking what is currently running on your database.

For instance;

db.curentOp()

lists which operations are currently going on in the database, you might see whats blocking, whats being indexed etc.

Statistics wise,

db.collection-name.stats()

will give some insightful information about a collection - such as what indexes exist, how much space they take, how many documents are in the collection, etc.

Also,  if you're interested in seeing who attended, have a look at my Mongo DB London 2010 Twitter list - it covers most people from the day.

Post to Twitter Post to Delicious Post to Facebook

20May/10Off

Gearman & Kohana: An Introduction

Last Saturday, the 15th of May 2010, I presented at Kohana London 2010 -  the first Kohana PHP conference in the UK. My talk was about using the awesome Gearman, came with some sample code written specifically for Kohana.

I've attached my slides as a PDF here, HTML version here and you can download the sample project from it's page on github!

Enjoy and feedback is most welcome.

Post to Twitter Post to Delicious Post to Facebook

Filed under: General 1 Comment
30Nov/09Off

Picking the best weekday for a website launch

Picking the best weekday for a website launch can be difficult. When considering it, there are a number of key things to take in to account:

Expected traffic / business volume

Launching on the busiest day of the month is not likely to be the best choice - a trail by fire can be risky especially for a major launch. Picking a quiet time of the month - check your sales & website analytics - will mean less lost revenue & annoyed customers and stress if things do go wrong.

Developer availability

Launching at the end of the week might seem like a nice way of finishing the week off - but teething problems might mean work over the weekend. This isn't good for keeping your developers happy!

Launching early in the week (unless of course this is your busiest period) is going to mean more normal working time to work on any (hopefully minor) issues you come across. Should there be a disaster, the whole team will be around anyway.

Support availability

Although your hosting provider probably does operate over a weekend, they are likely to have more staff around during normal working hours.

Phoning them before hand will be a good idea to make sure:

  • There are no scheduled maintenance windows of their network, your server or any of their peers.
  • If they manage backups that there is a current one (can't hurt to ask if you can't check yourself for some reason).
  • They have staff around at the time you are expecting to launch and that they are aware this is happening - this is especially important if they monitor your servers (they may think something has failed).

Post to Twitter Post to Delicious Post to Facebook

Tagged as: , No Comments