Home

Hi - welcome to the homepage of David "divydovy" Lockie, tree-hugging, technology-loving, web developer, music lover, husband, step dad, (very) amateur photographer and tennis player.

Web

I love the web. For two years, I was a fulltime, freelance web developer specialising in WordPress. Head on over and check out my portfolio and blog. I now run Pragmatic Web Limited, a web agency that specialises in WordPress and FreelanceWP, a site to help people become successful WordPress freelancers. I'm always interested in web strategy and development projects, so contact me if you like what you see.

Sustainability

I used to be a Director at LowCarbonEconomy.com. I'm totally passionate about sustainability, but find that I spend more time helping people doing things in the sustainability sector than working in it directly myself.

Personal

I'm also a real person! Find out more about me and what I like to do.

My latest posts from all subjects are below - enjoy!

Blog Posts

16th June 2012

Menu for BBQ Shack at World's End, Brighton

I couldn't find this on line anywhere so took a photo of it when I went last night.

I can confirm that it is very tasty :)

Update menu as of October 2013 below!!

20131018-085639.jpg

20131018-085655.jpg

24th January 2012

Customising the 'Via' in Tweet Button for AddThis WordPress Plugin

This one had me scratching my head for ages, and it was only some good investigation by @domsoar that found the answer, here: http://thenorthernedge.ca/blog/how-customize-addthis-for-your-website-or-blog-3559/.

The answer is to use a custom button and this sort of code:

 

<div class="addthis_toolbox addthis_default_style ">

<a class="addthis_button_facebook_like"></a>

<a class="addthis_button_tweet" tw:via="YOURHANDLE" tw:related="YOURHANDLE "></a>

<a class="addthis_button_google_plusone"></a>

<a class="addthis_counter addthis_pill_style"></a>

</div>

The bit that actually fixes the 'via' reference in the Tweet is emboldened above. I had tried with the 'via' reference previously with no success, but the tw:related argument fixed it!

Hope this helps someone :)

 

21st December 2011

Believe Eve

Believe Eve

A really fun site, designed by the talented Mr Chris James at 05Creative. With elements of responsiveness and cute interactive tweaks the site matches the client's brand. By using the WordPress blog system, Believe Eve have been able to use their site to start reaching out to social networks far more effectively.

15th December 2011

Comtact Healthcare

Comtact Healthcare

8th December 2011

One Leadership

One Leadership

4th December 2011

The Journalism Foundation

1st December 2011

Brilliant Noise

Brilliant Noise

18th November 2011

Pateman Group

8th November 2011

Hunted Store

Hunted Store

This build used an off-the-shelf theme from Templatic to bring e-commerce to a new website for this local Brighton store. The theme's design was customised by Jonathan Hall on behalf of zeroG media and I executed the site to meet the design and functionality. Result: a great-looking little store site.

7th November 2011

ISS Food and Hospitality

A very exciting project for probably my biggest client to-date. This project started right out at the concept and strategy stage, and I was really privileged to work again with Atelier Grafik on the design side of things, and for the first time Paul Allen of Lark Media to create the content and copy for the site. The site combines relatively straight-forward functionality with impactful design and carefully-crafted content to convey the organisation's unique positioning within the marketplace.

5th November 2011

Directline Holidays Blog

Directline Holidays blog

An exciting build for a household brand. The site was designed by Mark Brown and my job was to build the site as a WordPress blog ready to be installed at the /blog/ subdirectory. Nothing particularly difficult or unusual here, but a great looking site doing what WordPress does best.

4th November 2011

The importance of keeping WordPress (and plugins) updated

It is very important that WordPress and any plugins and themes are kept up-to-date for several reasons:

  1. Security - this is the most important reason. WordPress is a huge target for hackers and other malicious online types - being able to hack WordPress means instant access to over 50 million websites and the ability to read their secure content, insert dodgy links or do other bad things. WordPress is continually identifying and fixing security risks and holes. These fixes are released as WordPress updates. If you don't update your WordPress, you're leaving known security risks in place, which means that sooner or later your site will probably be hacked. This could have serious impact on your business, as well as costing you time, effort and money to fix.
  2. Performance - the WordPress team put a lot of time and effort into making WordPress faster and more efficient. Keeping your WordPress updated means that your site is performing as well as it can.
  3. Features -  Major releases of WordPress typically include improved functionality and tools to allow you to get more from your site.
  4. User experience - Most updates to WordPress make the content management system quicker, easier and generally nicer to use, encouraging you to interact with your site more.
  5. Future-proofing -  at some point, you're bound to want changes made to your site. Those changes might require the latest version of WordPress (for example to use a particular plugin that only works with newer versions). By updating frequently, you pick up small changes and errors that need to be attended to on an ongoing basis, keeping your site reasonably up-to-date with the core of WordPress development. If you don't update for a year or two, you're far more likely to suffer major disruption when you do, because all of those small and minor issues have become intertwined, making diagnosis and fixing harder and more time-consuming (and expensive).

These are the main reasons I can think of to keep WordPress updated, but there's also a broader, more fundamental reason. Good Housekeeping. Why use the world's leading publishing platform and then not keep it updated? It's like buying a Mercedes and not getting it serviced. So: keep your WordPress installation up-to-date. It's more than just software, it's part of your business.

3rd October 2011

Thematic Snippet: Show full content / enable $more link in archives

I can never find this incredibly useful snippet when I need it, so I'm blogging it.

If you child-theme Thematic, you'll notice that archive and search results pages only return the excerpt rather than the full content. This snippet changes that to give your archive pages the full impact:

// Make sure thematic_content is always set to full to enable the more link
function childtheme_content($content) {
	if (is_home() || is_front_page()) {
			$content = 'full';
		} elseif (is_single()) {
			$content = 'full';
		} elseif (is_tag()) {
			$content = 'full';
		} elseif (is_search()) {
			$content = 'full';
		} elseif (is_category()) {
			$content = 'full';
		} elseif (is_author()) {
			$content = 'full';
		} elseif (is_archive()) {
			$content = 'full';
		}
	return $content;
}
add_filter('thematic_content', 'childtheme_content');

Hope someone else finds this useful!

29th September 2011

Brighton Noise

For this site, I added jQuery datatables to allow quick and easy searching of gig listings.

25th September 2011

Carbon Leapfrog

Working for a fantastic London-based charity, and teaming up again with Simon Bottrell of 7creative, the functionality of this site really pushed my use of Custom Post Types and inter-relating content to the max. I also did some pretty cool stuff with the jQuery Crossslide plugin, using WordPress to manage the gallery and some cool loop-stuff to populate the crossslider itself.

20th September 2011

Crossfit Hove

A simple child theme for TwentyTen for my local sadist cross fit trainer, Miles Key down at Crossfit Hove. This job was mostly about driving WordPress to achieve his business's goals than about doing any particular development. The end result though, is a distinctive, functional and successful site.

12th September 2011

Ciptex

This was a great project, working again with Atelier Grafik. He did some great work creating a new identity for the company, then designing a new site around that. I then developed the site as a child theme for Thematic, using the jCarousel, some jQuery UI, Cufon and some cool custom post type work.

8th September 2011

White Horizon Chalets

This one's a bit unusual. The (lovely) couple who run this business are very old, very good friends of mine, so I took the risk of doing the design work myself to keep the project as cheap as possible for them. In the end, I reckon it's turned out pretty well :) jCarousel is used to showcase the chalets (both an overview and the interior of each), and a revised site structure helps a blog to drive bookings, which according to the client has proved successful.

22nd July 2011

Cufón for Thematic with no plugins - improved

Since I wrote the original 'Cufon for Thematic with no plugins' post, I've learnt how to use script queueing, rather than hard-coded links. Here's the official WP page about script queueing: http://codex.wordpress.org/Function_Reference/wp_enqueue_script if you want to find out more.

Here's the improved version of that post, also featuring a little function to convert the doctype into XHTML Strict, which Cufon needs in order to observe CSS line-height declarations:

// Enqueue Cufon and Font JS files
if ( !is_admin() ) { // instruction to only load if it is not the admin area
// register scripts
wp_register_script('cufon-yui',
get_bloginfo('stylesheet_directory') . '/js/cufon-yui.js',
array('jquery'),
false,
false
);
wp_register_script('font-yourfont',
get_bloginfo('stylesheet_directory') . '/js/YourFont.font.js',
array('jquery', 'cufon-yui'),
false,
false
);
// enqueue scripts
wp_enqueue_script('cufon-yui');
wp_enqueue_script('font-yourfont');
}

// Cufon needs strict doctype for line-height
function childtheme_create_doctype($content) {
$content = '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">';
$content .= "\n";
$content .= '<html xmlns="http://www.w3.org/1999/xhtml"';
return $content;
}
add_filter('thematic_create_doctype', 'childtheme_create_doctype');

// Add extra scripts to head
function childtheme_head() { ?>
<!-- Cufon -->
<script type="text/javascript">
Cufon.replace('h1, h2', { fontFamily: 'YourFont' });
</script>
<?php }
add_action('wp_head', 'childtheme_head');

// Load Child Theme js file, Google Analytics
function load_childtheme_js() {?>
<script type="text/javascript"> Cufon.now(); </script>
<?php }
add_action('thematic_after','load_childtheme_js');

Any comments or corrections, please shout in the comments!

22nd July 2011

I'm organising WP-Brighton!

I'm organising my first business event!

WP-Brighton - a WordPress event for everyone. Working with Michael Bailey and Paul Bunkham to organise this exciting event, which aims to bring together Brighton's digital and business communities.

I won't go on about it here, but if you want to check it out, here's the website: www.wp-brighton.org.uk

12th July 2011

The Raw Deli

The Raw Deli

This site was built for my brother's girlfriend's living foods business, to her own design and specification. I consulted with her to make sure the site would fulfil her business requirements then built it as a custom child theme of Thematic using WordPress, so she can easily update all aspects of the site and take bookings for her events.

11th July 2011

My Meeting Professional

My Meeting Professional

This site was built in conjunction with Liberate Media, a jolly nice and talented local agency. Upon request, I provisioned and project managed the creative graphic design element of the site, working with the talented Atelier Grafik, then built the site using WordPress by creating a custom child theme of Thematic.

27th June 2011

Madano

Madano Partnership

Designed and planned by the lovely folks at the Madano Partnership, this site uses WordPress and a custom child theme of Thematic to provide a number of different custom post types, carousels and neat functionality to convey effectively their commercial offering.

27th June 2011

Configuring WPML to work with Thematic WordPress theme

Hope this'll save someone the same painful process of Google searching leading to broken page links and out of date instructions/screenshots.

So, you've got WordPress installed, Thematic as your theme or parent theme and you've installed WPML (I'm using v2.3.2), selected your languages and options and are now in 'Theme and Plugins Localisation' in the WPML menu in the CMS.

Follow these steps:

  1. Choose 'Translate by .mo files', but don't select the 'automatically load' checkbox underneath.
  2. Save
  3. You'll see a table below with a list of translation files that the plugin is looking for with 'File not found' everywhere.
  4. Go to 'Theme Localisation' on the WPML site
  5. Download the language .mo files you want and save them to /wp-includes/languages
  6. Now that's the WordPress languages done - hopefully if you now refresh the CMS page we're on, you'll see 'File exists'. Ah, that feels good.
  7. Now for the Thematic language files.
  8. Go into thematic/library/languages and copy the .mo files you want to the root thematic folder
  9. Again, refresh the WPML settings page and BOOM! you should now see that all files exist.
  10. Wipe sweat from furrowed brow

I'm using WPML for a custom Thematic child theme, so I'll post back any further findings of interest.

17th June 2011

WordPress Function to Redirect All Incoming Domain Requests to the Primary Domain Variant

This is something that has bugged me for ages. Surely there's a way to redirect domain.com, *.domain.com, www.domain-variant.com, etc to the primary WordPress domain, www.domain.com using a WordPress function? Something that I can simply copy and paste for all my theme development without having to worry about the eventual web hosting environment or domain host.

We're assuming here that we need to do this within WordPress because:

  • The domain host doesn't provide enough web forwarding control
  • We're on shared hosting where we can't do an .htaccess redirect
  • We want to do it within WordPress for any other reason

I'm also assuming that all the domains and variants are already pointing at the correct server/virtual host.

I put a shout out to the http://www.wp-brighton.org.uk/ WordUp! mailing list to see what approaches people take. My favourite answer was from Tom Barrett, who suggested:

add_action('setup_theme', 'check_my_host');
function check_my_host(){
// Check host in _SERVER
// Find site_url
// Check protocol http/https
// String together pieces to compare with host
// Parse PATH_INFO (to deal with installs in sub directories)
// Use wp_redirect() and exit.
}

Now, I'm not as clever as Tom, so my code isn't as thorough as his, but as I don't tend to do sites that use SSL anyway, I decided to keep things simple and ignore that!

Here's my variant, totally inspired by Tom:

// Redirect all site requests to this virtual host to the siteurl address
function check_my_host() {
// Check host in $_SERVER
$incomingHost = 'http://' . $_SERVER['HTTP_HOST'];
$incomingQuery = $_SERVER['REQUEST_URI'];
// Find site_url
$primaryHost = get_bloginfo ( 'siteurl' );
$redirectTarget = $primaryHost . $incomingQuery;
// Compare incoming and primary hosts
if ( strtolower( $incomingHost !== $primaryHost ) ) {
// If they're not equal, use wp_redirect() and exit
wp_redirect( $redirectTarget, 301 ); exit;
}
}
add_action('template_redirect', 'check_my_host');

I've tested it and it seems to work solidly for redirecting both domain root and domain + query requests.

I've got no doubt this can be improved (to account for http/https protocols and various other clever checks) so please do leave comments and I'll update this function (with credits where appropriate).

7th June 2011

Da Costa Coaching

Da Costa Coaching

A simple but elegant site, designed by Atelier Grafik and realised as a custom WordPress theme.

25th May 2011

Our Solar Future

Our Solar Future

A fast-turnaround site to support the UK solar industry's campaign for increased government support for photovoltaic electricity production. I specified the project, bought Simon Bottrell of 7creative into the project to undertake the creative design work and then built the WordPress theme and delivered a functional website.

18th May 2011

Metal Packaging Europe

Metal Packaging Europe

Working with a London agency, for this project I subcontracted Atelier Grafik to complete graphic design phase, worked with the agency to specify the website in line with the client's requirements and then built this attractive and simple WordPress theme to realise the design and functionality. The most complex part of this project was an interactive map of Europe.

13th April 2011

Divorce Finance Toolkit

Divorce Finance Toolkit

One of two very light touch websites built for a local lawyer, this is a basic child theme for the Tarski theme framework.

13th April 2011

Larkin's Law

Larkin's Law

One of two very light touch websites built for a local lawyer, this is a basic child theme for the Tarski theme framework.

12th April 2011

The Malvern Group

The Malvern Group

A simple but elegantly-designed holding page for a new recruitment consultancy. The design was done by Simon Bottrell of 7creative, then realised by me as a WordPress theme. One notable inclusion is the use of Gravity Forms to sign-up users to a MailChimp list automatically.

5th March 2011

Diosa Media holding page

Diosa Holding Page

A great-looking, simple HTML, holding page built to a 3rd party design.

4th March 2011

Green Gauge Trust

Green Gauge Trust

Another quick and simple WordPress site to a 3rd party's design. Implemented as a custom Thematic child theme. Includes newsletter sign-up option on contact form via Gravity Forms and Mailchimp API add-on.

4th March 2011

Green Stripes

Green Stripes

Another quick and simple WordPress site to a 3rd party's design. Implemented as a custom Thematic child theme.

22nd February 2011

Bags of Luxury Newsletter

Bags of Luxury Newsletter (small)

An editable newsletter built using the Mailchimp platform, but with custom code. Text and all bag images are user-editable from within Mailchimp.

22nd February 2011

CSS Cache Buster for WordPress Themes

A little while ago, I expressed my joy at being able to avoid CSS cacheing-related issues on websites that could result in poor user experience, by using the CSS Cache Buster plugin.

Unfortunately, this has stopped working for me :( Not sure if it's the version of WordPress, or because I use child theming now. Either way, the demand for this fix maintained, so I've developed my own function for achieving this (leaning heavily on snippets from around the web, as always).


// Add date-modified query to stylesheet to prevent CSS caching when CSS has changed.
function wpi_stylesheet_uri($stylesheet_uri, $stylesheet_dir_uri){

if (!defined('STYLESHEETPATH'))
define('STYLESHEETPATH', get_stylesheet_directory());

$csslastmodified = filemtime(STYLESHEETPATH.'/style.css');

if (!$csslastmodified == '') {
return $stylesheet_dir_uri.'/style.css?' . $csslastmodified;
} else {
return $stylesheet_dir_uri.'/style.css';
}
}
add_filter('stylesheet_uri','wpi_stylesheet_uri',10,2);

As always, very happy to to be corrected, or for this to be improved upon, but it works great for me :)

21st February 2011

Sussex Eco Heating holding page

Sussex Eco Heating

A VERY quick and simple website designed simply to provide keywords and contact details as a temporary holding page whilst a full website is planned and implemented.

10th February 2011

Gravity Forms validation and jQuery watermark conflict

Using Gravity Forms for a client's website (not live yet), the design dictated that watermarks were used instead of labels.

No problem - I've used the jQuery watermark plugin before (for example on the Brandwatch site www.brandwatch.com/). Everything worked fine, until I submitted a form that failed validation. I had chosen the AJAX option for the GF form and on submission, the form validation removed the watermarks, leaving it impossible to tell which field was for what data.

Simple fix: turn AJAX off for the form - watermarks reappear. Hope this saves someone some time!

4th February 2011

All Unique

All Unique

A fairly quick and simple site for a start-up business, built as usual as a custom Thematic child theme. Uses Cufon font replacement with a free font.

3rd February 2011

WordPress Highlight Search Terms Plugin and Cufon Conflict Fix

Whilst implementing Highlight Search Terms (HLST) plugin for a client's website that also uses Cufon font replacement, I found that whenever the HLST plugin kicked in, the Cufon'd text disappeared.

The symptom was that Cufon fonts flash up but it looks like they then go 'invisible' when the HLST JS kicks in. I guessed that the insertion of the <span class="hilite"> element breaks Cufon's ability to manipulate the DOM (or something!)?

Tried a quick fix. Whacked Cufon.refresh(); in just before the end of the jQuery document.ready function - i.e. before the last })); in both compressed and uncompressed versions of the plugin's JS file.

Cross-posted from: http://wordpress.org/support/topic/plugin-highlight-search-terms-this-plug-in-create-problem-with-cufon-font-replacement?replies=8#post-1921792

Hope this helps someone!

26th January 2011

D3O Newsletter

D3O Newsletter

An HTML newsletter built for the Pure360 mailing service, to a design supplied by the client.

14th January 2011

Al Clarke

Al Clarke personal website

A quick and simple blog-centric WordPress site implemented to my own design as a Thematic child theme.

22nd December 2010

The Pure Package

The Pure Package

This site was by far and away the most challenging website I've ever built. The theme itself was medium complex, but the challenge here was to replicate a bespoke service ordering system with off-the-shelf WordPress components. Completed using Gravity Forms, PHPurchase (fixed and modified) and a lot of thinking.

22nd December 2010

Brighton Energy Cooperative

Brighton Energy Cooperative

I was over the moon to get the opportunity to be involved with this innovative renewable energy project. My role has been strategy consultancy, design, development and delivery. Not a massively complicated site, but one that meshes perfectly with their business needs.

16th December 2010

Sarah Elwick

Sarah Elwick

This great little site was originally built by @rootinteractive. I was asked to step in and help to take the site to the next progression: including dynamic product listings, product enquiry forms and optional click-throughs to a 3rd party e-commerce site.

12th December 2010

White Pepper

White Pepper

Designed by a top London designer and built with love for an old friend, this project was primarily about design, but does also feature a Flickr widget, custom post types and a custom menu. Check the site out to see this beautiful design in action.

9th December 2010

Brandwatch French site

Brandwatch FR

Just a French version of the Brandwatch site.

26th November 2010

Orion Partners

Orion Partners

I became involved with this project at the planning stage and helped to architect a sophisticated web publishing website that helps the business to use its content effectively and efficiently. Uses cufon, custom post types, custom menus and much more. Another custom child theme for thematic. Delivered to a tight deadline.

2nd November 2010

Myriad Newsletter

Myriad Newsletter

A newsletter built to my own design (using creative elements provided) on behalf of an agency.

1st November 2010

Adding a Pause Button to jCarousel (slight fix)

I was recently asked by a client to add a pause button to the jCarousel-powered carousel on their site.

To do this, I used this post by Jeremy Mikola (thanks Jeremy). Here's his code:


$(document).ready(function(){ 
  $('#jcarousel').jcarousel({ 
    vertical: true, 
    scroll: 1, 
    auto: 5, 
    initCallback: function(jc, state) { 
      if (state == 'init') { 
        // Insert a play/pause button between the prev/next buttons 
        $('div.jcarousel-prev-vertical').after('<div class="jcarousel- 
toggle-vertical" style="display:block;"></div>');   

        /* Override the internal startAuto() method, which is called 
after 
         * animations complete, to prevent next/prev buttons from 
reactivating 
         * the timer while in the pause state. 
         */ 
        jc.startAutoOrig = jc.startAuto; 
        jc.startAuto = function() { 
          if (!jc.paused) { 
            jc.startAutoOrig(); 
          } 
        } 

        jc.pause = function() { 
          $('div.jcarousel-toggle-vertical') 
            .removeClass('jcarousel-play-vertical') 
            .addClass('jcarousel-pause-vertical'); 
          jc.paused = true; 
          jc.stopAuto(); 
        }; 

        jc.play = function() { 
          $('div.jcarousel-toggle-vertical') 
            .removeClass('jcarousel-pause-vertical') 
            .addClass('jcarousel-play-vertical'); 
          jc.paused = false; 
          jc.startAuto(); 
        }; 

        // Click event for playback toggle button, conditionally calls 
play/pause 
        $('div.jcarousel-toggle-vertical').click(function(){ 
          if (this.timer === null) { 
            jc.play(); 
          } else { 
            jc.pause(); 
          } 
        }); 
      } 

      jc.play(); 
    } 
  }); 
});

However, I had a bit of trouble with it and had to make a change, as follows:


For some reason, "this.timer === null" wasn't working for me. 

I replaced that section with: 

jQuery('div.jcarousel-toggle').click(function(){ 
        if (jc.paused) { 
                jc.play(); 
        } else { 
                jc.pause(); 
        } 
}); 

Seemed logical and seems to work... 

Hope that helps someone. 

I did try to post this as a comment on Nabble, but it's still pending, so I'm posting here for now.

1st November 2010

Movember 2010

Help me to support Prostate Cancer research by sponsoring my Mo, here: http://uk.movember.com/mospace/21137/

Dave - Movember Day 1

Movember 2010 - Day 1 - clean shaven

Movember 2010 - week 2

Movember 2010 - Day 7 - tired but starting to take shape

Movember - week 2

Movember 2010 - Day 12 - starting to really stand proud now

26th October 2010

Desang

Desang

Responding to a plea for help, my role with Desang is to provide web strategy advice. Having recently concluded a process of consolidation, simplification and documentation including switching to WordPress websites and Google Apps for SaaS, the next step will be to migrate to a modern CRM system.

22nd October 2010

D3O

d3o screenshot

Designed by the very talented @puppa, this site required not only pixel-perfect build, but also a very lateral approach to delivering the solution that the client needed. The solution was developed as a custom child theme for Thematic, and features Salesforce web-to-lead integration, custom post types and custom menus as well as bespoke category pages and complex jCarousel interaction.

18th October 2010

Mantis Communications

Mantis Communications

A simple, lightweight site for a local journalist: focussed on providing a tool for him to keep his website up-to-date with his recent activities. I was involved with this site right from before the domain name was secured and set up Google Apps, the website and also provided strategy advice along the way.

12th October 2010

WP Maintenance Mode and Contact Form 7

Just a really quick post to say that I've wasted about a day trying to get these two plugins to work together and just can't do it.

An epiphany last night: just create a separate WP install with a very simple theme that shows a holding page with a contact form, then switch between the sites using Apache in order to achieve the maintenance page effect. Simple! Obviously this will only work if you:

  1. Have the ability to host more than one WP install at the same IP address
  2. Can play with Apache's vhosts.conf (or equivalent) to switch between sites
  3. Have a 'spare' URL pointing at the site which you can use whilst its in maintenance mode (and can swap the Home and SiteURL fields over in PHPMyAdmin)

I use a great little VPS so can achieve this. It's definitely not as much fun as just using WP Maintenance Mode, but it's definitely more fun than sweating over how to get it working with Contact Form 7!

So, if you're trying to get WP Maintenance Mode and Contact Form 7 to play nicely together - I wish you luck and if you achieve it, I'd love to learn how :)

8th October 2010

Lettuce Flowers

Portfolio screenshot - Lettuce Flowers

A quick and simple WordPress-powered build to a (great) pre-supplied design. Clean and simple markup using CSS, jQuery and some custom functions.

8th October 2010

TSR Insight v2

Portfolio screenshot - TSR Insight v2

Phase 2 for a valued and exciting client. This site was a particular challenge in terms of design where one pixel out of place would have ruined the design (it's even IE6 compatible!). Having been involved with the strategy and planning aspect of this build too, I was very pleased with the end result: a lightweight, content-focussed site that allows TSR Insight to generate traffic through genuinely interesting content, and then drive that traffic to their key calls to action. Technically, I worked with another developer to implement web-to-CRM functionality, including custom jQuery form styling and validation.

8th October 2010

The Pebble in the Pond

Portfolio screenshot - The Pebble in the Pond

An 'emergency rescue' project! The guys behind The Pebble in the Pond needed someone to resurrect their partially-complete website with a very short turn-around time. Introduced through a mutual connection, I managed to turn the site from a series of basic static page-save-outs and screengrabs into a fully-functioning, CMS (WordPress)-powered website within a few days. Although time was short, I also managed to slip in some advice about how to improve the architecture and navigation of the site and hope to continue this relationship into the future.

7th September 2010

Brandwatch - German site

Brandwatch German site

This was an exciting project with a great existing client. The requirement was for a German-language version of the site I'd previously built for them. Here the power of WordPress and Thematic really came to the fore. It was a relatively painless procedure to produce a copy of the theme for the German site. Once that was done, this project involved management in equal measure alongside development. Having been involved in foreign-language website builds before, this was definitely the most painless.

7th September 2010

Lamb to Slaughter

Lamb to Slaughter screenshot

A quick and simple custom child theme for Thematic using XHTML, CSS, a few PHP functions and a little jQuery.

7th September 2010

Bags of Luxury

Bags of Luxury screenshot

This was an unusual project, completed over a short timescale from brief to go-live. My client had previously commissioned a London agency to build the site for her based on design work previously done, but was very dissatisfied with both their service and quality of work. I then stripped the website's assets, took a full backup of the site, compiled a list of reasons why the website provided was not fit for purpose and then re-factored the website as a child theme for Thematic on top of WordPress. I kept the best of the design and stripped away complications and unnecessary functionality to realise the design as a fluid, intuitive and attractive website that's focussed on desired visitor outcomes, and on tracking those.

Technically, the site involved writing lots of new functions in PHP, then just my normal valid XHTML, optimised CSS and unobtrusive JavaScript using the jQuery library. This site uses the Custom WordPress Menus for Thematic function I wrote and posted here.

1st September 2010

WP-Newsletter Activation Causes Wampserver to Crash

Having paid for wp-newsletter, I've just spent three hours trying to get it to activate from the WordPress admin panel. When I first tried, I simply got a 404 error page and a Microsoft Windows (I'm on Vista 32bit Ultimate using Wampserver 2.0i) notification that Apache had crashed with the following details:

Problem signature:
Problem Event Name: APPCRASH
Application Name: httpd.exe
Application Version: 2.2.11.0
Application Timestamp: 493f5d44
Fault Module Name: php_mysql.dll
Fault Module Version: 5.3.0.0
Fault Module Timestamp: 4a492311
Exception Code: c0000005
Exception Offset: 00004a2a
OS Version: 6.0.6001.2.1.0.256.1
Locale ID: 2057
Additional Information 1: c7db
Additional Information 2: ae42b9a901477bc30e02003a5e74faf8
Additional Information 3: d49a
Additional Information 4: 762910875005615186a3604064d40157

I tried everything I could find. I set the max memory limit to half a GB. I went to the latest versions of Apache, PHP and MySQL through the wampserver menu. I tried installing the new 'unofficial' wampserver release. Nothing worked and in the end I've simply had to go back to the official wampserver and I'll find a different newsletter plugin.

Anyone else having this problem? Any chance anyone has a fix?

Cheers!

19th July 2010

WordPress 3 Custom Menu Support in Thematic

More thematic child theme functions goodness :)

Having read the comments on this page: http://themeshaper.com/wordpress-menu-tricks/ I couldn't find a definitive copy and paste guide - looks like the HTML and PHP tags were being stripped out. So, leaning heavily on Tony L's work (thanks Tony!), here is a copy-paste-edit example. Simply add this to your Thematic child theme's functions.php file and you should find that you can then use the 'Menus' tab under WP's Appearance menu in the CMS.


// Add support for WP3 custom menus
add_theme_support( 'nav-menus' );

// Remove Thematic default menu
function remove_thematic_menu() {
remove_action('thematic_header','thematic_access',9);
}
add_action('init','remove_thematic_menu');

// Register the custom menu with the theme
function register_custom_menu() {
register_nav_menu( 'primary-menu', __( 'Primary Menu' ) );
}
add_action( 'init', 'register_custom_menu' );

// Output the new menu to the thematic header
function childtheme_access(){
wp_nav_menu( array('primary-menu', 'menu_class' => 'sf-menu' ) );
}
add_action('thematic_header', 'childtheme_access', 4);

Any mistakes, omissions or bugs are my own and I'd love to hear your feedback in the comments. Thanks for reading :)

Update

George Irwin kindly sent me an improvement on the 'Output the new theme to the thematic header' function, as follows:


// Output the new 3.0 menu to the thematic header
function childtheme_access(){?>
<div id="access">
<div class="skip-link"><a href="#content" title="<?php _e('Skip navigation to the content', 'thematic'); ?>"><?php _e('Skip to content', 'thematic'); ?></a></div>
<?php wp_nav_menu( array('primary-menu', 'menu_class' => 'sf-menu' ) ); ?>
</div><!-- #access -->
<?php
}
add_action('thematic_header','childtheme_access',4);

As George rightly points out, this keeps the new custom menu in line with the original as defined by Ian Stewart in the Thematic header-extensions.php file so that you don't need to change your CSS. Much better George, thanks :)

Update 2

Thanks to skarab and Manxstef, there's a further improvement to this code :)


// Output the new 3.0 menu to the thematic header
function childtheme_access(){?>
<div id="access">
<div class="skip-link"><a href="#content" title="<?php _e('Skip navigation to the content', 'thematic'); ?>"><?php _e('Skip to content', 'thematic'); ?></a></div>
<?php wp_nav_menu( array('primary-menu', 'container_class' => 'menu', 'menu_class' => 'sf-menu') ); ?>
</div><!-- #access -->
<?php
}
add_action('thematic_header','childtheme_access',9);

These tweaks ensure that the custom menu is created on the page in exactly the same place and with the same DOM as the default Thematic menus. Thanks both!

16th July 2010

Product Review: SEC AnyWhere Lights

Solar-powered LED lights. Yawn. Seen them everywhere: home improvement stores, fuelling stations, supermarkets, pound stores and don't even talk to me about eBay (3,200 listings when I checked).

Background

In theory, solar-powered LED lights make a lot of sense. LEDs consume very little power so even a small solar panel can keep enough charge in a couple of AA batteries to keep the LEDs lit for a few hours at a time. Millions of solar-powered LEDs are sold each year: for garden lights, shed lights, camping lights, decorative lights. Even that old favourite playground joke of a solar-powered torch is now a serious product. I myself have three different types of solar LED light in the garden. I don't need to run mains cables everywhere, I don't need to worry about turning them on and off, they provide enough light to do the job.What's not sensible and sustainable about that?

Whilst the large scale picture seems simple and easy, once you start looking a little closer things get more difficult. LEDs are complicated. Photovoltaic panels are complicated. Batteries are complicated. Sticking them all together to get the best combination, well, you've guessed it. It's complicated.

There are ultraviolet LEDs, RGB LEDs, Phosphor-based LEDs, Organic LEDs (OLEDs), miniature LEDs, high power LEDs. AMOLEDs produce the best screens for mobile devices. You can now buy LED replacement bulbs for most domestic light fittings, and certainly that's going to be a huge market in years to come. But perhaps the best use for LED lighting is in the developing world. LEDs are robust, reliable, easy to manufacture (although not necessarily easy to manufacture well) and can last upwards of 20,000 hours usage. In the developed world, we worry about what temperature of light our light bulbs give out. In much of the developing world any chance to see anything after the sun has set is a huge step forwards.

The Product

SEC AnyWhere Light

SEC AnyWhere Light

It is for this market that SEC have primarily developed their AnyWhere range of solar-powered lights. The one I am going to review here is the AWL240-1 Solar Powered Light Kit. It includes a decent sized Photovoltaic panel, the AnyWhere light itself, terminal hub / junction box, 2 x 4.8 meter electric cable with simple twist-fit connections. The AnyWhere light is by far the most complicated component, composing not only the super efficient LED’s and three position dimmable switch but also high performance Lithium Ion battery with energy storage and management system.

Performance

Looking over the packaging, the first thing to strike me was the performance figures. They’re actually given, and in much detail with actual units of measurement. Not “lasts up to 3 hours on a single charge” but “At switch position 2, the light output will be 120 Lumens consuming 4 kJ/h and will last about 15 hours” the LED lights will last more than 10 years down to 75% of original brilliance.

Then I rewound a little. At position 1, the light produces 240 Lumens about the same as a mains powered 40 watt bulb. At full charge the AnyWhere light can produce those 240 Lumens for about 7.5 hours with a life expectancy, if used for 6 hours per day, of 9 years. That’s a lot of useful light, bright enough light to light a room well enough to read and write.

Usage

How long does the battery take to reach full charge? According to the packaging, about 4.5 hours of sun per day. That's not unrealistic, even in quite temperate climates.

This is a completely stand-alone lighting solution. There's nothing you need to replace, refill or reload. Just leave the solar panel out in the sun and it will recharge the battery for you. Then, when you need the light turn it on. When you've finished, turn it off. That's the beauty of the AnyWhere lights: really useful light in a really simple package.

Modularity

Modular Setup for SEC AnyWhere Light

Modular Setup for SEC AnyWhere Light

Another nice touch with the AnyWhere lights is the modularity. Through the use of the terminal hub, you can mix and match the components to arrive at the most suitable lighting solution for your house. These kits are available as:

1 x AWL240-1 Kit = 1 Light 1 Solar panel, 1 hub and 2 x 4.8 meter cable
2 x AWL240-2 Kit = 2 Light 1 Solar panel, 1 hub and 3 x 4.8 meter cable
3 x AWL240-3 Kit = 3 Light 1 Solar panel, 1 hub and 4 x 4.8 meter cable
4 x AWL240-2 Kit = 4 Light 1 Solar panel, 2 hub and 5 x 4.8 meter cable

With the Solar panel being left in the sun all day all the lights will be fully charged by nightfall.

Cost

If you were to run a 40 watt incandescent bulb for 6 hours a day for 9 years, that’d cost you roughly £90 (with out the cost of the bulbs). That pretty much the retail cost of a single AnyWhere Light kit. So, the cost is comparable with current mainstream with the bonus that with the AnyWhere light you end up with a high quality Solar panel with a life expectancy of 20-25 years, thus you could reasonably hypothesise that using AnyWhere lights will be cheaper over the long term.

Of course, many light bulbs sold these days are compact florescent (CFL) or LED rather than incandescent bulbs, so one must take that cost comparison loosely. However, it’s still pretty impressive that such a new and totally renewable lighting solution is fairly comprisable with today’s technology.

Cost Calculation

Assume 1 watt of electricity = £1 per year in electricity bills – currently about right for the UK.

40 watt x 0.25 years = £10 /year to run a 40 watt light bulb for 6 hours per day for a year

So £10 per year x 9 years = £90

AnyTime UPS Lighting Kit (Sister product)

There is a sister product called the AnyTime UPS Lighting Kit where a mains powered AC / DC 18 volt charger is used in place of the Solar panel. This light kit is designed to be used where ever the electricity is unreliable and or subject to frequent outage. The light is the same as used in the LED AnyWhere light but uses less than 10% of the electricity used by a 40 watt incandescent light thus reducing the household cost of lighting your house by 90% and is always available to provide light for up to 10 hours in a power outage.

There are two sizes of AnyTime UPS lighting kit equivalent to 40 & 80 watt incandescent bulb:

1 x ATL240-1 Kit = 1 Light, 1 AC / DC 18 volt 1 amp charger, 1 hub and 1 x 4.8 meter cable
1 x ATL240-2 Kit = 2 Light, 1 AC / DC 18 volt 1 amp charger, 1 hub and 2 x 4.8 meter cable
1 x ATL240-3 Kit = 3 Light, 1 AC / DC 18 volt 1 amp charger, 1 hub and 3 x 4.8 meter cable
1 x ATL240-4 Kit = 4 Light, 1 AC / DC 18 volt 1 amp charger, 1 hub and 4 x 4.8 meter cable

1 x ATL480-1 Kit = 1 Light, 1 AC / DC 18 volt 1 amp charger, 1 hub and 1 x 4.8 meter cable
1 x ATL480-2 Kit = 2 Light, 1 AC / DC 18 volt 1 amp charger, 1 hub and 2 x 4.8 meter cable

Note the ATL480-1 gives the same light output as an 80 watt incandescent bulb.

Criticisms/Improvements

I'd like to know how recyclable the kits are? How reliant on resources that aren't highly available from environmentally-sympathetic sources. How easy is it to e.g. replace a battery or LED set? Or is the strategy to simply swap out whole components? What is the end-of-life strategy for consumers? I don't know any of the answers to these questions, but I'd feel reassured about the sustainability of the product if I did.

My one major suggestion for improvement? A USB power socket either on the terminal hub or the lamp itself. That way, the units could be used to charge a wide range of electronics such as mobile phones as well as providing lighting. USB is such a wonderfully universal connector that it seems a shame to miss that opportunity. Maybe in the second iteration?

Conclusion

I’m impressed with this product. Very impressed. The bottom line with any product is performance, and these things just perform. Thanks to excellent design, the kits match technologies together that complement each other and combine to offer incredible efficiency and flexibility. The world needs technology like this to tackle some of the critical and fundamental gaps in peoples’ standards of living. For me, this light will make the best camping light ever, and make me the envy of the campsite. For an Indonesian family, it could mean the difference between children being literate or not.

Stop Press - Latest Minute Development

SEC have just announced the availability of a mobile (cell) phone charger that plugs into the hub with built in battery charged by the Solar panel

More information

Disclaimer: SEC is associated with LowCarbonEconomy.com, a company with which I am associated. But, I have no direct link with SEC and the facts and opinions in this post are honest and true to the best of my knowledge.

8th July 2010

Working Together Project

Working Together Project website screenshot

I worked on this project with the very talented Simon Bottrell of 7creative, who produced the website design in PSD format. I then translated this mockup into a custom child theme for the Thematic theme framework for WordPress. This build relied less on the use of plugins and more on the use of child theme functions to achieve custom category archives, booking forms and custom menu structure. The site makes use of both Cufon and a free Google Font (http://code.google.com/webfonts) to deliver a clean, simple and intuitive design that reflects the goals of the charity. There's some cool CSS stuff here - such as swapping out the header (including navigation) when on certain pages.

8th July 2010

Kindle Research

Kindle Research screenshot

For this job, I designed and then developed and implemented an upgrade to the existing WordPress-powered part of the Kindle Research website. The brief was to improve the impact and usability of the blog, and to connect it up with a simple workflow that would encourage the company to keep the blog updated regularly (such as via iPhone app and Posterous) and would then distribute that content across social networks such as Facebook, LinkedIn and Twitter.

I implemented the design by modifying the existing theme and incorporating plugins and widgets such as Feedburner, Cufon font replacement, a Twitter widget. As part of this process, I had to update to the current PHP release, the current version of WordPress and then had to fix various issues with the rest of the site that these changes bought about. I also performed some minor changes on the homepage to reflect the improvements made to the blog.

29th June 2010

Easy Thematic Favicons

Continuing with my modest efforts to post some useful Thematic/WordPress snippets, here's some code to provide favicons for WordPress sites using Thematic child themes. Simply add this code to your child theme's functions.php page:


// Add favicons to the child theme
function childFavicons() { ?>
<link rel="icon" type="image/png" href="/wp-content/themes/childtheme/images/favicon_16x16.png" />
<link rel="icon" type="image/png" href="/wp-content/themes/childtheme/images/favicon_32x32.png" />
<link rel="icon" type="image/png" href="/wp-content/themes/childtheme/images/favicon_64x64.png" />
<?php }
add_action('wp_head','childFavicons');

Here's a variation to provide different favicons for two different versions of the same site, for example for staging and live sites:


// Add favicons to the child theme
function childFavicons() {
//detect if is live site
if (strtolower($_SERVER["HTTP_HOST"] == "www.domain.com"))
{ ?>
<link rel="icon" type="image/png" href="/wp-content/themes/childtheme/images/favicon_16x16.png" />
<link rel="icon" type="image/png" href="/wp-content/themes/childtheme/images/favicon_32x32.png" />
<link rel="icon" type="image/png" href="/wp-content/themes/childtheme/images/favicon_64x64.png" />
<?php } elseif (strtolower($_SERVER["HTTP_HOST"] == "stg.domain.com"))
{ ?>
<link rel="icon" type="image/png" href="/wp-content/themes/childtheme/images/stg_favicon_16x16.png" />
<link rel="icon" type="image/png" href="/wp-content/themes/childtheme/images/stg_favicon_32x32.png" />
<link rel="icon" type="image/png" href="/wp-content/themes/childtheme/images/stg_favicon_64x64.png" />
<?php }
}
add_action('wp_head','childFavicons');

Should work OK - let me know in the comments if you have any probs.

11th June 2010

Cufón for Thematic with no plugins

UPDATE: a new, improved version of this post is available here: http://www.divydovy.com/2011/07/cufon-for-thematic-with-no-plugins-improved/

I like Cufón. As long as the page loads and the JavaScript executes quickly, it's a really slick solution to using any font you want (and have a license for) on your website. I haven't really used it for body text, but I used it on the Brandwatch site for headers, and I'm currently using it for another site (to be added to the portfolio soon).

Both times I've used it, I've initially relied on plugins: WP-Cufon and All-In-One Cufon, as they've seemed the only viable options. However, I've never been able to make All-In-One Cufon work, and WP-Cufon seems really unreliable. Often it would detect my font in the /fonts/ folder, but would not then add the font as a JavaScript call to the DOM. Obviously, without that, the Cufon didn't work.

I'm still using Thematic/child themes for most of my WordPress development and I realised by looking at what the plugins did to the DOM that it wouldn't be hard to do manually. So, in the end I decided just to use my child theme's functions.php file to add the necessary JavaScript. Turns out it's not that hard. Here it is:

// Cufon
	//Load Header JS files and stylings
	function load_cufon_js() {?>
	    <script type="text/javascript" src="<?php bloginfo('stylesheet_directory'); ?>/js/cufon-yui.js"></script> //Loads the main Cufon JS file
	    <script type="text/javascript" src="<?php bloginfo('stylesheet_directory'); ?>/js/vegur.font.js"></script> //Loads the font JS file
		<script type="text/javascript"> //Various arbitrary text replacement statements
			Cufon('h1#blog-title a', { hover: { color:'red' } });
			Cufon.replace('h1', { fontFamily: 'Vegur' });
			Cufon.replace('h2', { fontFamily: 'Vegur' });
		</script>
	<?php }
	add_action('wp_head','load_cufon_js'); //add the function to the head

	//Load Footer function call
	function load_cufon_call_js() {?>
	    <script type="text/javascript"> Cufon.now(); </script> //This shortens the conversion delay in IE
	<?php }
	add_action('thematic_after','load_cufon_call_js'); //Add it just before the body ends

Remember that any hover statements need to come FIRST, as described here.

Just copy and paste all that into your child theme's functions.php, then add the JS files to the right folder in your child theme.This worked straight away for me and seems simple and lightweight. No reliance on plugins that'll need to be updated (even when you can get them to work)!

If this helps, leave me a comment. It'll encourage me to post more juicy Thematic functions...

6th June 2010

Council Monitor

Council Monitor screenshot

This work was an extension to an existing website. My job was to pick up a JavaScript function callback from an existing Flash graph. Using the parameters passed in the JS function callback, I then had to construct and fetch an XML feed via a jQuery AJAX API call. When the result set loaded, I then constructed various HTML elements dynamically using jQuery to display the first ten results within a pop up window. A load more button allows for the remaining results to be dynamically loaded into the pop-up if desired.

This work was very challenging in and of itself, but was further complicated by various cross domain scripting security measures that I had to liaise closely with the client to work around. The result is an effective and functional pop-up and a happy client.

27th May 2010

Thematic: Custom Meta Descriptions without a Plugin

I'm really getting into developing child themes for Thematic. It's a really powerful theme framework.

I'll try to post some of the more interesting bits of code I write to help the Thematic community at large.

Here, I've used a nice little meta-description function from Life On Mars's WordPress SEO 101 article and turned it into a function that you can simply add to your childtheme's functions.php file:

// Add a custom meta-description
function childtheme_meta_description() { //divydovy: put the Life On Mars code in a wrapper function ?>
ID, "MetaDescription", true);
// checks to see if the custom field MetaDescription is not empty
if ($custommeta !=='') {echo $custommeta;}
// check if excerpt exists for the post and output it if it does
elseif (!empty($post->post_excerpt)) {the_excerpt();}
// if there's no custom field or excerpt output the post title
else {single_post_title('', true);}
}
// if category page output the category description
elseif (is_category()) {echo category_description();}

// if it's any other page display this generic description
else { echo 'add your generic description here';}
?>"
/>
add_action('wp_head', 'childtheme_meta_description'); //divydovy: add this function to the wp_head hook

Hey presto! A customisable meta-description facility with redundancy for your Thematic child theme :)

Props to Life On Mars.

18th May 2010

Philips TV update Q5492-0.26.75.0

My TV's just updated with this firmware package: Q5492-0.26.75.0. Does anyone know what it does?

No English references on Google...

29th April 2010

Brighton & Hove 10:10

A quick and simple build from designer's PSD. Built on WordPress using the Thematic theme framework and a custom child theme.

Brighton and Hove 10:10

27th April 2010

The Elise Project

A quick and simple conversion from a flat HTML site to a WordPress powered dynamic site. Additionally, added Google Analytics, a proper gig management plugin and blog functionality. Implemented as a child theme based on the Thematic framework.

The Elise Project - screenshot

22nd April 2010

Brandwatch

Built to the client's design, working very closely with the client. WordPress, Thematic, custom child theme, custom jCarousel, cufon font replacement, shadowbox JS for video overlay.

Portfolio Brandwatch

16th April 2010

Sometimes the world needs a hero

They said it, not me ;)

14th April 2010

Cufon :hover Fix

Just a quick post. I have implemented cufon for a client's website to replace the titles with a nice new non-web-safe font.

This code worked perfectly to replace the titles with the new font.


Cufon.replace('h1', { fontFamily: 'Helvetica Neue LT W1G' });
Cufon.replace('h2', { fontFamily: 'Helvetica Neue LT W1G' });
Cufon.replace('h3', { fontFamily: 'Helvetica Neue LT W1G' });

However, the client then asked for one of the titles (which was a link within an h3) to have a hover effect to show that it was a link. Fortunately cufon now supports :hover, so I was pleased to be able to implement this without resorting to separate JavaScript.

However, for the life of me I couldn't get the hover effect to work!


Cufon.replace('h1', { fontFamily: 'Helvetica Neue LT W1G' });
Cufon.replace('h2', { fontFamily: 'Helvetica Neue LT W1G' });
Cufon.replace('h3', { fontFamily: 'Helvetica Neue LT W1G' });
Cufon('#twitter-3 .widgettitle a', {
hover: {
color: 'aqua'
}
});

I had the right selector, the right syntax, everything. Finally, as a last resort, I scrapped the original code (top code excerpt to leave just the :hover replacement). Finally, it worked. So, I simply re-added the title replacement under the link :hover replacement, as below:


Cufon('#twitter-3 .widgettitle a', {
hover: {
color: 'aqua'
}
});
Cufon.replace('h1', { fontFamily: 'Helvetica Neue LT W1G' });
Cufon.replace('h2', { fontFamily: 'Helvetica Neue LT W1G' });
Cufon.replace('h3', { fontFamily: 'Helvetica Neue LT W1G' });

Hey presto - it worked :) It seems that cufon works back up your list of rules in reverse, so the h3 general replacement was overwriting the specific h3 anchor hover lines! It took me a while to work this out, so hopefully this'll help someone else.

Add a comment if you like - I'm sure the code above could be further optimised.

UPDATE

According to Rein (see comments below), cufon hover will only work on anchor (<a>) tags. I haven't tested that theory myself, but worth a note here - don't want to be the cause of lost time!

29th March 2010

TSR Insight

Heavy customisation of an off-the-shelf theme, virtually pixel-perfect to designer's specification. Includes custom registration/members-only functionality. Completed to client's absolute satisfaction within very tight two week deadline.

TSR Insight

17th March 2010

WordPress XPertMailer Fails to Send to Gmail SMTP on Local WAMP Install

I can't begin to tell you how frustrating this one was.

So, local WAMP install on Vista 32bit. Using XpertMailer plugin to use Gmail as SMTP host for outgoing WordPress emails. Something I've done with no problem on my VPS.

On my local machine, I just couldn't get the XpertMailer plugin past the submission 'Loading...' dialogue.

I made sure I could telnet to smtp.gmail.com on the right ports (465/587). I tried everything. Everything! Except making sure that the Open_SSL PHP extension was enabled in WAMP. This post made me think to check: http://www.vishalkumar.in/2009/06/php-mail-using-gmail-smtp-tutorial/

As soon as I enabled it, everything worked perfectly :)

Posting this because I didn't find the answer using any of my initial search terms. Hope it helps someone.

12th March 2010

Whisperer Walks

Brand new site build, working with a very new small business to establish basic web presence. Design, custom WordPress theme, nice plugins, Google Apps.

Whisperer Walks site screenshot

3rd March 2010

iPhone, Twitter & Smugmug

I would love an app that let me use Smugmug as a Twitter photo service.

Or, an iPhone->Smugmug photo uploader that automatically posts a link to Twitter.

Posterous - I'm looking at you. Smugmug - I'm keeping a hopeful eye open.

23rd February 2010

The Original Sin of Sustainability

Adam, Eve, Snake and Apple

Adam, Eve, Serpent, Apple, used under CC license from http://www.flickr.com/photos/pikaluk/

Were you born into a lifestyle in harmony and equilibrium with your environment?

It's unlikely that you were, whatever your background. Most of us were already being unsustainable before we could spell it. Think about that for a minute: You have never experienced a sustainable lifestyle. Very few people still alive today have.

None of us can control the lifestyle into which we're born, but we can control the lifestyle our children are born into. Many of us live with self-imposed lifestyle guilt, but remember that you didn't eat that first apple.

You've never experienced sustainability

What does this mean? That we need to stop feeling guilt about what's passed by already. The future depends on the choices we make going forwards now. We need to look forward to a positive vision of sustainability. There is no reverting or going back. The golden time at which humanity truly lived in sustainable harmony with its surroundings is too far away. We need to imagine and embrace a future that none of us have ever experienced, where technology and sustainability are married to the goal of a happy, productive and sustainable future for humanity.

How do we move past our original sin? By letting go of guilt. Speak to any sustainability expert and they'll tell you that the hardest part of any sustainability journey are the lifestyle and behavioural changes. There are fundamental psychological reasons why we're so resistant to changing our values and lifestyles. We're pre-programmed to make sustainability misjudgements.

Maybe our cultural rehabilitation program needs to start with an acceptance that we are (almost without exception) responsible for damaging our environment and ourselves, but that it's not our fault. Once the scorecard is clean, we can start the accounting afresh. I don't know whether that'll help us to refresh our cultural values, but I do know that without forgiving ourselves our original sin, we'll find it much harder to move forwards positively.

The future is the most exciting opportunity going - let's get excited about it.

17th February 2010

Carbon Reduction Commitment: Why The Game Changes in April 2010

Rudd Government Carbon Pollution Reductions Scheme means Business as Usual

Rudd Government Carbon Pollution Reductions Scheme means Business as Usual - used under CC license from: http://www.flickr.com/photos/takver/

I’m becoming increasingly interested in the Carbon Reduction Commitment, especially after a bit of hand-waving by master-hand-waver @monkchips.

Shamefully, I don’t know that much about this important piece of UK policy so I’m going to learn what I can about it and share my learning and insights on this blog (he says confidently). So first things first. From the horse's mouth:

The CRC Energy Efficiency Scheme (formerly known as the Carbon Reduction Commitment) is the UK's mandatory climate change and energy saving scheme, due to start in April 2010. It is central to the UK’s strategy for improving energy efficiency and reducing carbon dioxide (CO2) emissions, as set out in the Climate Change Act 2008. It has been designed to raise awareness in large organisations, especially at senior level, and encourage changes in behaviour and infrastructure. The scheme[']s amended title serves to better reflect the CRC’s focus on increasing energy efficiency.

So, it's a very important piece of legislation, aimed directly at the heavy emitters of UK business.

Here are some quick take-away facts:

  • It's a cap-and-trade framework
  • All proceeds will be distributed amongst participants
  • It will affect around 20,000 UK organisations
  • It's designed to tackle emissions not covered by either Climate Change Agreements or the EU ETS
  • Performance reporting will be by self-certification
  • The policy comes into force in April 2010

April 2010 - April 2011 is known as the 'Footprint Year'. This is the year against which future performance (over the 3 year life cycle of the policy) will be judged. Now, call me a cynic but if I owned a heavily-emitting business and knew I was going to be covered by the CRC, apart from the horrendous electric bills I must already be paying, I'd be hard-pressed to find economic reasons to make a big emissions reduction push this year. Surely making cuts this year would just make it harder to comply with the CRC in following years? Why did the government not just choose a year that's passed already so that we can start making reductions immediately?

Correct me if I'm missing anything here people? Otherwise, stay tuned for CRC - part 2 in weeks to come.

16th February 2010

The Sustainability Misjudgements We're Programmed to Make - Part 2

Continued from The Sustainability Misjudgements We're Programmed to Make - Part 1

5. Herd Mentality

Herd mentality is the tendency to adopt the opinions and follow the behaviors of the majority to feel safer and to avoid conflict.

I'm going to explore this one in more detail later: personally I think that herd mentality is actually an emergent behaviour caused by an altogether more interesting facet of human nature: social hierarchy.

4. Reactance

Reactance is the urge to do the opposite of what someone wants you to do out of a need to resist a perceived attempt to constrain your freedom of choice.

A big one. I believe that the transition to a sustainable civilisation is going to require that we challenge many of our deepest beliefs, values and cultural habits. We're going to find that difficult. We do things at the moment because we desire them (we live in indulgent times), they're easy, they're culturally-ingrained, or some mixture of all three. Our desires are like pressures inside us. If we don't do something we really desire, we can find ourselves blowing up. How will we react to being told to eat more vegetarian food and to take the bus? I'll bet that at least a few us will be tempted to drive our cars at top speed to the nearest burger joint and-the-environment-be-damned.

3. Hyperbolic Discounting

Hyperbolic discounting is the tendency for people to prefer a smaller, immediate payoff over a larger, delayed payoff.

Another big one. There are numerous studies under way that investigate the tension between discounting and sustainability. Every time we hunt a species to extinction, we are discounting the future: swapping the immediate reward of an easy meal of roast dodo for the promise of countless future roast dodos for us and our children through maintaining a breeding population. Historically, the hyperbolic discounting of our ancestors (our generation continuing where others have left off) is commonly attributed as the cause of The Sixth Extinction. In essence, the decline and extinction of the majority of the world's large mammals is contemporaneous with the great human diaspora out of Africa, starting around 100,000 years ago.

The dodos example also touches on another important facet of human psychology: the in-group/out-group dichotomy. Even as the dodo population was visibly failing, it is not hard to imagine that one ship-full of sailors thinking "Well if we don't eat these last few birds, that ship on the horizon is bound to anyway". Had that ship full of sailors been isolated on the island, would they have been more inclined to preserve a viable dodo population for the future? The crux of this question is a question that Jared Diamond explores thoroughly in his book Collapse.

2. Escalation of Commitment

Escalation of commitment is the tendency for people to continue to support previously unsuccessful endeavours.

Is the Copenhagen Accord an example of global escalation in commitment? I've previously argued that any policy or treaty that is not fair, simple and clear will be doomed to suffer from the Bikeshed Effect. COP15 was perhaps our best chance of learning from the difficulties of Kyoto, especially when it became clear that there was not unanimous support for it. Instead, a few powerful countries promulgated what is in effect an extension of the Kyoto Protocol. Whilst it's certainly not fair to accuse the Kyoto Protocol of being totally unsuccessful, neither is it unfair to say that there is significant room for improvement.

Are further examples of escalation of commitment the proposed construction of a new generation of nuclear power stations? Or the proposed extraction of ever-more-marginal fossil fuel reserves such as oil shale and slate? Each of these energy sources has so far been unsuccessful in securing sustainable energy for humanity's global civilisation.

Escalation of Commitment is something I've been thinking about more and more since drafting this post: I'm going to dedicate a whole post just to this soon.

1. Placebo Effect

Placebo

Placebo by http://www.flickr.com/photos/hannner/

The Placebo effect is when an ineffectual substance that is believed to have healing properties produces the desired effect.

Ironically, the number one item in the source article's list is also perhaps the least relevant to this post. After all, if we can find a placebo solution to sustainability, surely that's a win even if it is a misjudgement?

[So that's the end of the list that I drew from the source post. Forgive the silly numbering going onwards...]

0. Social Hierarchy and Dominance

As Thomas Friedman said at one of COP15's side events:

There's only one thing as powerful as Mother Nature and that's Father Greed

The theme of "greed" sweeps through many of the points we've covered, but for me it's still a symptom of a deeper pressure from the human psyche.

I always seem to recommend this book: The Lucifer Principle by Howard K. Bloom, but it's definitely the best exposition of the point I'm trying to make, so I'll repeat that recommendation here. The book explores the proclivity of the human mind to seek dominance over our peers. Everyone loves to win, and most people don't like losing. Why? It's simple: people that have more social dominance have more children, are happier, live longer and are healthier. These are make-or-break traits in evolutionary terms, so it's hardly surprising that the urge to win and succeed is so deeply entrenched in our psychology. It's natural selection in action, with a heavy peppering of sexual selection.

Are our desires for the latest fashion, Apple gadget or new-model Ferrari the human equivalent of the Peacock's feathers? Is our quest for the discovery of the New, the Best and the Greatest our way of showing that we're alert and successful? The Rat Race is very real, and undoubtedly affects our lives more than we wish to acknowledge (part of our social camouflage is the pretence that we don't feel pressure, that we're capable enough of taking everything in our stride and that our potential for future success is not in doubt). So where does the quest for success end and greed start?

Maybe some insight can be shed by Gore Vidal's quote:

It is not enough to succeed. Others must fail.

Are we predisposed to require a society where some must fail? Is greed a reflection of our wish not only to have more than others, but also to deprive others and thus amplify our position of dominance over them? Maybe Agent Smith was right?

Did you know that the first Matrix was designed to be a perfect human world? Where none suffered, where everyone would be happy. It was a disaster.

Whether my reasoning is right or wrong, it must be indisputable that greed is in our nature.

-1. The Bikeshed Effect

The Bikeshed Effect, as blogged here. How damaging is our faith that other people will take care of the big picture, leaving us free to argue about the details?

-2. Social Identity

The theory was originally developed to understand the psychological basis of intergroup discrimination

Quote source

Blood is thicker than water - that's social identity at its most basic level. Every organism is (by default) genetically predisposed to favour the survival of genes more similar to its own - that's the basic tenet of Richard Dawkin's "The Selfish Gene". This predisposition has extended itself into our societies in subtle and complex ways: from racism to religion and most notably in cultures. The way that we treat those in our "group" and those outside is incredibly dichotomous. We'll actively sacrifice ourselves for our children, but we (usually) have to be persuaded to give money to charity to help kids in Africa.

This mutual dichotomy (which obviously works both ways between groups) detracts from our ability to take collective responsibility for global issues. I reckon this is going to be one of our biggest challenges: In-groups are basically frameworks for trust. Our brains are (presumably) designed (by evolution) to be able to cope with really knowing only a few hundred people so that's typically the maximum size of our in-groups (Dunbar's number). How can we extend the trust that we offer to our in-groups to the whole of humanity in order to be able to take effective action on global issues?

Conclusions

Since I first drafted this post, I've done a LOT of thinking about the psychology of sustainability. I want to write follow-up posts looking at:

  • Escalation of Commitment
  • Possible solutions/mitigation

So I guess the conclusion is that I find this really interesting and will write more on it.

29th January 2010

VPS: Hosting WordPress and Flat Websites Together with Apache #2

I did say...

*Disclaimer: I’m not (and don’t claim to be) an expert. This could break things, upset your granny or otherwise not do what you want. I’m happy to receive corrections or improvements – or thanks if it works for you!*

Turns out I was overcomplicating things a bit. I assumed that something in the .htaccess file was over-riding my VirtualHosts settings in httpd-vhosts.conf: hence the .htaccess modifications.

In a classic bit of carelessness, it turns out I was editing the wrong httpd-vhosts.conf file - there are two in different folders :S

So, the following steps from the first post are still valid:

# Virtual hosts
#Include conf/extra/httpd-vhosts.conf

to

# Virtual hosts
Include conf/extra/httpd-vhosts.conf

Now, edit httpd-vhosts.conf to include a VirtualHost for your domain, e.g.

#
# Use name-based virtual hosting.
#

NameVirtualHost *:80

<VirtualHost *:80>
ServerAdmin <you@email.com>
ServerName theflatdomain.com
ServerAlias *.theflatdomain.com theflatdomain.co.uk *.theflatdomain.co.uk
DocumentRoot “www/flatsites/thisflatsite/”
</VirtualHost>

But, not instead of editing the .htaccess file, we just need to make a further entry in the httpd-vhosts.conf file, ABOVE the flat site virtual host(s):

<VirtualHost _default_:80>
DocumentRoot "www/wordpress/"
</VirtualHost>

You can then simply add further VirtualHosts UNDER your default catch-all VirtualHost for each flat site you need to host. This will leave the WordPress installation to deal with any domain names that aren't explicitly declared as separated flat sites. Note that I'm using Strider's Virtual Multiblog for WordPress to host lots of different blogs/domains at once.

Sweet :) Leave a comment if this was useful for you?

27th January 2010

VPS: Hosting WordPress and Flat Websites Together with Apache

UPDATE: Um. Turns out this isn't the best way to do this. See my second attempt here.

I have my own Virtual Private Server (VPS) on which I use the excellent Virtual Multiblog (d'oh - still haven't finished that post) to host multiple WordPress sites on one server. I then wanted to consolidate some other sites I'm responsible for onto this VPS and save some hosting fees. I didn't want to rewrite them as WordPress blogs though, and that left me trying to figure out how to host both types of site on one server using WAMP.

I couldn't find a tutorial to do this anywhere, so here's a go. I'm using Apache v2.2.11, and distinguishing between domain names, rather than IP addresses.

*Disclaimer: I'm not (and don't claim to be) an expert. This could break things, upset your granny or otherwise not do what you want. I'm happy to receive corrections or improvements - or thanks if it works for you!*

First, in Apache's httpd.conf, enable the VirtualHosts include by changing:

# Virtual hosts
#Include conf/extra/httpd-vhosts.conf

to

# Virtual hosts
Include conf/extra/httpd-vhosts.conf

Now, edit httpd-vhosts.conf to include a VirtualHost for your domain, e.g.

#
# Use name-based virtual hosting.
#

NameVirtualHost *:80

<VirtualHost *:80>
ServerAdmin <you@email.com>
ServerName theflatdomain.com
ServerAlias *.theflatdomain.com

19th January 2010

The Sustainability Misjudgements We're Programmed to Make - Part 1

I am constantly inspired and enthralled by the ingenuity, compassion and creativity of the people around me. For upright, naked apes we've come an awfully long way. Our collective model of the universe (our knowledge) spans orders of magnitude and scales which our minds can only barely imagine, let alone experience. Our technology is profoundly astonishing: it enhances our capabilities as a species far beyond our original abilities in almost every aspect of our lives.

And yet we seem determined to throw all this away. The vast majority of us aren't trying to poison ourselves, irreparably degrading our environment, consume the resources vital to our civilisation or generally jeopardise the survival of our species, and yet the net effect of our lifestyles, choices and actions leads directly to these outcomes. We're neither evil, nor stupid, so why is it that we seem incapable of addressing humanity's most important challenge: Sustainability? Wikipedia is pretty unambiguous on the meaning of sustainability:

Sustainability is the capacity to endure

Are we reducing our capacity to endure? That's something I want to blog about separately: It's quite a big topic in its own right. For now, I'm going to hypothesise that we are, simply to explore some of the behaviours that I think are generally undesirable, whatever the ultimate outcome. I've been thinking about this for a long time, and I guess it was this post: "Top 10 Common Faults In Human Thought" that finally prompted me to try and crystallise some of my thinking.

Judge Dredd

Judge Dredd, courtesy of Flickr user Psycho_Al - http://www.flickr.com/photos/psycho_al/

I guess a little background wouldn't hurt. I believe that humans are born with a brain that has been shaped by evolution to serve specific purposes and tackle specific challenges. The human brain is not a blank slate, its development completely dependent on what we expose it to. If you want to read up, I again recommend Stephen Pinker's "The Blank Slate". The brain's very success in carrying our species to this point leave it susceptible to mistakes in perception (optical illusions), logic (which we'll look at here) and memory (nostalgia!).

I'll follow the order in the original article and then add some others at the end. It's a long list, so I'll stretch this over a few posts.

10. Gambler's Fallacy

The Gambler’s fallacy is the tendency to think that future probabilities are altered by past events, when in reality, they are not.

Perhaps our greatest gamble is our reliance on technology. Thomas Malthus predicted as long ago as the 18th century that unhindered population growth would be "checked by disease, famine and widespread mortality". Up until now, technology (particularly the Haber process for creating artificial fertiliser) have kept humanity's food supplies in sufficient quantity (even if we don't choose to distribute it evenly). Medical technologies and practices have defended us against smallpox, tuberculosis and a host of human zoonoses, diseases and epidemics. We're gambling that using up our fossil fuel reserves now will allow us to develop replacement technologies in time to transition seamlessly and securely. Technology has always served us well up until now, so the chances are that it'll serve us well in the future too, right?

9. Reactivity

Reactivity is the tendency of people to act or appear differently when they know that they are being observed.

I don't think that this fault is necessarily the most important in terms of sustainability, but I'm sure we've all at some point caught ourselves being a little greener than usual in order to escape criticism from someone we think is greener than us. One example stays with me from my young and foolish university days. I dropped some litter (something my parents would have given me a scolding for) and a friend reprimanded me, embarrassing me to the point that I haven't knowingly littered since. So what harm is reactivity? Maybe just that it's hard for us to be honest with each other about some of our worst habits and behaviours.

8. Pareidolia

Pareidolia is when random images or sounds are perceived as significant.

It's snowing - so global warming has to be a hoax? Maybe the most important insight into our psychology that this phenomenon offers us is in fact recognising that our brains are not faultless computing machines: they're pattern-matching algorithms designed to interpret and predict our environment. We need to stay mindful of the need for rigour and method in our decision-making. This works both ways: we're equally as likely to see false positives as false negatives.

7. Self-Fulfilling Prophecy

Self-fulfilling prophecy is engaging in behaviors that obtain results that confirm existing attitudes.

As the source article says:

Economic Recessions are self-fulfilling prophecies. Because a recession is 2 quarters of Gross Domestic Product (GDP) decline, you cannot know you are in a recession until you are at least 6 months into one. Unfortunately, at the first sign of decreasing GDP, the media reports a possible recession, people panic and start a chain of events that actually cause a recession.

Will the same be true for an environmental recession? Will the first signs of resource scarcity cause resource grabs or wars which exacerbate the situation and lead to real resource shortages? Do films like The Road and Children of Men give life to fears that our civilisation will inevitably end in a decline into chaos and desperation? Are there expressions of hope and a positive future that are as compelling?

This short YouTube video is worth a watch. It's palindromic in that the phrases can be read in reverse order and the result would be the same. It's a fantastic little illustration of how closely hope and fear are related, and the importance of perception: http://www.youtube.com/watch?v=42E2fAWM6rA#

6. Halo Effect

The Halo effect is the tendency for an individual’s positive or negative trait to “spill over” to other areas of their personality in others’ perceptions of them.

The Halo Effect is perhaps most harmful at a corporate level. "Surely this company which makes such good _____ and has a glossy web page explaining its commitment to sustainability must be a safe bet. I like their products so much that I simply can't believe that they'd be engaged in harmful and unsustainable activities."

I'm not saying that all companies are bad: I'm just saying that just because a company is carbon-neutral and recyclable doesn't mean that it's not flying fresh fruit from all over the world, lobbying government for policies that have favourable loopholes or are investing their profits indirectly in arms manufacture.

I'd love to hear what you think in the comments. The second post in the series is in progress, more to follow soon...

*Update: The second post on this topic is here.*

15th January 2010

Psychology Experts

Website design and build from logo and site text. This is my first WordPress site to go live with a completely custom theme, although I've got a few still in process... Incorporates Google Apps and a contact form as well as full backup and analytics.

8th January 2010

Happy Inn menu, Brighton

If you're looking for the menu for Happy Inn chinese takeaway in Westdene, Brighton then you're in luck: here it is!

Happy Inn menu - Front

Happy Inn menu - Back

8th January 2010

The Copenhagen Bikeshed

I've been trying to put Copenhagen's COP15 into perspective, to synthesise the whole experience into something I can hang on a peg.

The more I think about it, the more it resonates with a post I've been meaning to write for a while about "The Bikeshed Effect".

"Why Should I Care What Color the Bikeshed Is?

The really, really short answer is that you should not."

http://bikeshed.com/

A bikeshed in Copenhagen

The whole Copenhagen effect was a great example of the Bikeshed Effect in action. I listened to a LOT of speeches at COP15, including the opening ceremony High Level Segment with Prince Charles, Yvo de Boer, Ban Ki Moon and all the climate A-listers. Every speech I heard said: "We need to agree a strong and fair international agreement to tackle climate change, now". Think "Yes, we all agree, we need a new bikeshed".

That's fantastic, a really clear signal of intention and consensus. But that's where the agreement stopped.

Should the agreement be an international carbon tax? Cap and Trade? Kyoto-based? Contraction and Convergence? Green? Brown? Orange? Polka Dot? And the roof: Should that be the same colour? Felted? Or tiled perhaps? Maybe a green roof.

And that's where we are now. A rough agreement to build a bikeshed that most countries have agreed should not be pink or orange, but probably a greenish colour, with some kind of waterproof roof. But,

7th January 2010

Running Away from Camera Redux

Inspired by runningfromcamera.blogspot.com/

Running Away - the Squirrel Portrait

Inspired by http://divydovy.posterous.com/squirrel-portrait-photo

Running Away - Ima let you finish, but...<flash>

Got any more mashup ideas? Contact me - divydovy@everywhere

16th December 2009

Contraction and Convergence

The climate change policy platform that's floating just under the surface of negotiations

I was privileged to attend COP15 in Copenhagen this week as a member of the Global Commons Institute delegation, headed by Aubrey Meyer. During our attendance, I spent a fair bit of time talking about C&C theory with Aubrey, and felt motivated to share what I've learnt and the synthesis that this has led me to. Essentially, I think it's the only sensible framework on which to base an international treaty that aims to be effective, simple and equitable - in this post I want to explain why.

It's worth reading the Wikipedia page about contraction and convergence before going further with this post.

Remember that the objective is to reduce atmospheric carbon levels through reducing net carbon emissions.

Remember also the importance of equity in securing a workable policy framework. The only really fair deal would give every person in the world equal entitlement to emit carbon.

Banana LeafLet's do a quick mental exercise. Work out the total amount of carbon that can be emitted over a set time (say 50 years) to avoid Catastrophic Anthropogenic Climate Change (CACC). Create a simple graph of carbon emissions over time, where the area under the line of the graph is less than or equal to the maximum amount of carbon that can be emitted to avoid CACC - that line will necessarily be heading down and to the right, as we're currently emitting too much carbon - that's contraction. Adjust the rate of contraction to suit a realistic carbon emission reduction schedule. Divide the amount of carbon under the line of the graph by the number of people in the world to arrive at per capita emissions entitlements.

Then, it's simple. Nations emitting more carbon per capita than their entitlement need to reduce their emissions, or trade entitlements with nations who are under their entitlement. This provides a stable and workable framework for carbon credit trading. Nations can either reduce their carbon emissions per capita, trade to increase their per-capita entitlement, or (importantly) reduce their population to increase the per-capita amount of carbon. Inevitably due to market forces (yes this is capitalism people - but in a sensible framework),

6th December 2009

Google or Tea? Introducing the Carbon:Value Ratio

Outside World by scr47chy on flickr

"Outside World" by scr47chy on flickr

I'm not even sure this is worth blogging it seems so obvious.

I guess the thing that crystallised this concept in my mind was that whole two-Google-searches-is-the-energy-equivalent-of-boiling-a-kettle nonsense, precipitated by a journalist from The Times doing some bad research and choosing a sensationalist headline which ensured that the story did the rounds for weeks online. Apart from the whole misleading aspect of the story, it made me think about the value of doing a Google search.

What's easy to take for granted is the speed and power of the web in general, and search engines in particular. The web represents a pretty good approximation of the sum total of public human knowledge (with continual updating), and search engines make that information and knowledge accessible in a fraction of a second. That's really profound. What is the value of that? Of course there is a carbon footprint involved. But what about the carbon footprint of the alternative? Going to the library and searching for hours for information? Never finding it? How much carbon is saved by saving people time?

3rd December 2009

Are You the Bug in the Rug?

Ever feel lost, powerless or generally adrift? This is a poem that's always struck a chord with me. Hope it does the same for you:

People who fly have a different view of the world than those who spend their lives on the ground. A very wise man once wrote a poem while he was flying, and he called this poem "The God's Eye View," and he said that this view was entirely different than the view he always had on the ground, which he called "The Bug's Eye View."

Out there, somewhere, in the air we fly through, exists an old Persian legend much like this poem about a bug who spent his entire life in the world's most beautifully designed Persian rug. All the bug ever saw in his lifetime were his problems. They stood up all around him. He couldn't see over the top of them, and he had to fight his way through these tufts of wool in the rug to find the crumbs that people had spilled on the rug. And the tragedy of the story of the bug in the rug was this: that he lived and he died in the world's most beautifully designed rug, but he never once knew that he spent his life inside something which had a pattern. Even if he, this bug, had even once gotten above the rug so that he could have seen all of it, he would have discovered something - that the very things he called his problems were a part of the pattern.

Have you ever felt like that bug in the rug? That you are so surrounded by your problems that you can't see any pattern to the world in which you live? Have you heard anybody say lately that the world is a total mess? That, my friends, is the Bug's Eye View, and seeing only a little of the world, me might be inclined to think that this is true.

I first heard this poem on the Cold Krush Cuts album from Ninja Tune many years ago - it remains one of my favourite albums. Thanks to birdonmyshoulder for the transcript.

3rd December 2009

Power without Responsibility

This phrase has been rattling around my brain for a long time now. One of the first times I said it out loud, James Governor asked me for a link to where I'd blogged about it. I hadn't: Oh! the shame.

Dubai World

Dubai World - photo by djumbo - http://www.flickr.com/photos/dumbo/249924295/

Power

It's hard to look around without seeing signs of humanity's power. Financial, military, energy, influence/social control, resources, technology - power over our environment.

Almost every aspects of our lives and lifestyles sit at the top of a vast and complex web of technology. Many of us wouldn't be alive today were it not for the direct intervention of medical technology and knowledge.

We think nothing of travelling hundreds or even thousands of miles in a few hours. I get the feeling that only the most humble of us think daily about the food we're eating, the coffee we drink or the complexities behind sending an email or checking out a web page.

Now I'm going to pick on Dubai. Within a generation, the peoples of the UAE have come into possession of power beyond their fathers' wildest dreams. The power to hire a workforce to build cities out of the desert, to own planes, yachts and residences (OK so that one's in Abu Dhabi), but where is the responsibility to balance that power?

30th November 2009

Why I'm Sad to See My Mo Go

I've been taking part in Movember 2009 - a worldwide initiative to raise awareness of prostate cancer through the growing of moustaches ("mo"s).

My top lip hasn't seen a razor blade in 30 days now, and I figure that's long enough to think about and mention. What effect has it had on me, how do I feel about it?

I wanted to participate to help raise money (through sponsorship) for a good cause, but equally as importantly, it's a pretty easy thing to do in terms of raising sponsorship money. No running, jumping, swimming, eating nasty things or sitting in baked beans. I also wanted to do it because I thought it'd be fun. The month has lived up to expectation: it's been easy, rewarding and amusing in equal measure.

It has been easy: for 95% of the time, I've totally forgotten about it. When it comes to shaving, it's quicker and easier than normal. I've saved marginal amounts of shaving foam and wear and tear on my razor.

It has been rewarding: I've had a lot of love for the Mo. I've spoken to random people, been given attaboys by people I've never met before and I've definitely helped to raise awareness of prostate cancer in my own small way.

It has been fun: OK, so I said I forget about my Mo for 95% of the time. The other 5% is where the fun resides. Those second looks from people on the street, the laughs from friends on first sight of the Mo, the (admiring?) sideways glances. I'm positive that my Mo has had a subconscious effect on people I've met. If nothing else, my Mo has added an edge and subtle flavour to my life over the last month, and I've enjoyed that.

So, yes, I will be sad to see my Mo go. I'm looking forward to next year and maybe a more ambitious Mo.

Remember, there's still time to sponsor me (just): http://uk.movember.com/mospace/21137

UPDATE: It's now 3rd December. I still have my Mo. Maybe it'll go next time I shave, but for now I'm quite happy letting it keep my top lip warm!

Here's a look back at some of this month's great MOments:

Week 1 - "the Chav"

Week 1 - "MOstly Chavvy"

Week 2 - Wilderness Mo

Week 2 - Wilderness Mo

Week 3 - Extreme Mose-Up

Week 3 - Extreme MOse-Up

Week 4 - MOst Serious

Week 4 - MOst Serious

30th November 2009

Using Carbon for Competitive Advantage

The Good, The Bad and The Ugly

As the topic of carbon emissions continues to become more and more visible on the public stage, it's inevitable that it will feature increasingly in various marketing activities.

A story on the LowCarbonEconomy.com website today about easyJet's call for emissions standards prompted me to think a little more about how and why carbon emissions will be used in marketing.

The Good - BSkyB

http://corporate.sky.com/documents/pdf/press_releases/18_05_06_bskyb_is_carbon_neutral.pdf (PDF)

BSkyB was one of the first large organisations I heard of that asked its employees all to watch 'An Inconvenient Truth' together and to make a top-down decision to become a carbon neutral company. What's interesting about the way BSkyB approached climate change is that as far as I can tell, they decided it was an issue that couldn't be ignored because it constituted a significant business risk, as well as a matter of CSR imperative.

My favourite part of the BSkyB story (without wanting to sound too Fanboi) is that they took a very hard line with their supply chain, and essentially told them that if they weren't carbon neutral by a certain date too, that they would be in very real danger of losing their contracts with Sky at the next renewal. I have since read case studies from several of Sky's major suppliers (such as the Commercial group) that shows the positive and galvanising effect that Sky's mandate had on their own businesses.

This is marketing through leadership, and undertaking something for the right reasons. Either that, or I just can't see the ulterior motive.

The Bad - easyJet

http://corporate.easyjet.com/en/media/latest-news/news-year-2009/26-11-09.aspx

The story that prompted my post. easyJet demanding emissions standards for air transport. Don't get me wrong, this in itself is not a bad thing. Of course we should be pushing for higher emissions standards in every arena, but this isn't selfless moralism by easyJet - it just suits their business because they own one of the newest fleets in the world. Guaranteed if there was a call for emissions standards that did not suit their own interests, they would be on the other side of the fence, lobbying and fighting as hard as they could.

This is not a call for progress or action on carbon emissions, this is greenwash facilitated by benefit of the fact that their fleet is newer than that of other operators.

The Ugly - America's Power

http://www.americaspower.org/

Yuk, this is just ugly. One of their pages is called '77% cleaner', which sounds great. Except that they base this claim on five compounds and doesn't include carbon emissions, or environmental impact in general. Coal is just a dirty fuel, causing as many health problems as environmental ones. It's ugly because it's just untrue. At least easyJet is being disingenuous rather than plain deceitful. Neither is a sustainable competitive advantage, but the death throes of the coal industry are particularly distasteful.

From reading the America's Power site, you'd figure that the coal industry were a group of concerned environmentalists, forced to mine coal against their strongest desires. The reality is that their sole interest is their profit margin, and the moment that there is the possibility of being forced to clean up the environmental disasters they cause, they are very happy to restructure a business to put the clean-up costs on the public purse.

And in case you're thinking that sounds familiar, here in the UK, we as the taxpayer are footing a

2nd October 2009

Planet India, Brighton - The Menu

Planet India in Brighton is one of my favourite restaurants.

Here's their takeaway menu as of May 2012.

Bon appetit!

15th September 2009

URL Shorteners and SEO/PageRank

Whilst browsing around on Twitter last night when I should really have been browsing the inside of my eyelids, I saw an interesting question from @euan:

Wondering if shortened url's count towards Google page rank ....

http://twitter.com/euan/status/3982135076

Now my immediate thoughts were (1) no of course they can't, because otherwise nearly every website in the world would be getting an SEO bump and that doesn't make any sense and (2) If (for example) bit.ly has a PageRank of say 7, then that PageRank would be split between millions of URLs, so it wouldn't actually be worth anything anyway.

My response:

@euan RE: shortened URLs/PageRank. Negligible effect if any. Their PR juice is spread amongst ALL outgoing links. Like PR/1,000,000

http://twitter.com/divydovy/status/3989799032

One day I WILL learn to think things through thoroughly before twittering. Then I thought some more and realised that if shortened URL links didn't confer any SEO value, the search engines would be missing a lot of the power of social media. Now, I know that search engines strive to keep their algorithms as simple as possible - i.e. they include as few exceptions and special rules as possible. So, how could they judge the value of an incoming shortened URL?

Duh - by looking at the page it comes from. Somehow, the SEO value of the link must 'bypass' the shortened URL to be conferred to the target URL. How does this usually happen with websites? A webmaster's best friend: the 301 redirect. In fact, that's exactly how all the URL shorteners I've tested so far work (bit.ly, is.gd and tinyurl - not the most comprehensive testing I know).

Try it yourself - put a shortened URL into: http://www.webconfs.com/redirect-check.php - I bet it comes back as a search engine friendly redirect.

So, in answer to @euan's original question - shortened URLs DO count towards SEO/Google PageRank, but they amount to which they do so depends entirely on the page(s) where the shortened URL is found. It's the only way it could work really.

A final aside: when I've previously used 301 redirects to confer PageRank from one domain to another, it's taken anything up to 3 months for that PageRank to have visibly transferred. I'm guessing that this is an artefact of the fact that the big G only updates PageRanks every few months, not continually. I bet that the SEO value is conferred almost immediately, both in domain redirect 301s and shortened URL 301s.

Was this all totally obvious? Am I wrong? Let me know in the comments.

29th July 2009

Seamless CSS Updates

If you run a website, sometimes you need to make changes to the (X)HTML/CSS to fix or improve your website's styling.

Sometimes these changes can be pretty drastic in terms of layout changes. Browsers commonly cache CSS files. If a visitor's browser has cached the old version of your CSS file, they may see a very ugly version of your site, applying the old stylesheet to the new markup.

There's a cunning way to make sure that visitors always see your site using the latest CSS (I guess this would work with any other cached files e.g. JavaScript too). I ran across it here: http://www.alistercameron.com/2008/09/12/wordpress-plugin-css-cache-buster/ whilst in the world of wordpress.

The principle is simple. just use a query string on your CSS call - e.g.

<link href="/css/your.css?date" type="text/css" rel="stylesheet" />

Every time you update the CSS file, simply change the query string to that date. This forces any browser to download the new file, which it will cache until the next time you update your query string, or until something else makes the cache expire.

Cool trick!

26th June 2009

First Post - Installing WordPress Multiblog on WAMP

- this post is under construction! -

I've been using a wordpress.com site up until now, but I've recently got a nice VPS of my own from www.bizarc.com and I've just finished installing Virtual Multiblog for WordPress on this WAMP-configured server. These are the steps I took to get here, standing on the shoulders of giant geeks ;)

1. Install WAMP as here: http://wordpressgarage.com/good-blogging-practice/how-to-set-up-wordpress-on-a-wampserver/
2. Uninstall IIS
3. Edit root directory + dependents in Apache to the root of the wordpress folder
4. Edit datadir in C:\wamp\bin\mysql\mysql5.1.33\my.ini
5. Create new database - 'wordpress'
6. Create new user for the database
7. Follow these instructions: http://striderweb.com/wp-content/multiblog/multiblog-readme.htm
8. Set-up VHOSTS to the hostnames
9. Install MySQL Service and Start it: http://forge.mysql.com/wiki/Error2003-CantConnectToMySQLServer and http://dev.mysql.com/doc/refman/5.1/en/windows-start-service.html (C:\wamp\bin\mysql\mysql5.1.33\bin\mysqld --install)
10. It actually works.

5th June 2009

The Ethical Occasions Company (v2)

This was a build to design job which really stretched my abilities, especially in terms of JavaScript and DHTML. I also managed to manipulate the form facility on Google Docs to allow for a contact form that requires no server-side scripting on the site.

10th May 2009

Highland House (v2)

Building on the Rehab-Search template, I used my well-honed CSS skills to produce a visually clean and simple site that focuses on content and allows for very intuitive navigation. I'm no longer managing this site and it's changed pretty significantly.

Highland House (v2)
6th May 2009

ASP.NET, RSS feeds, Validation, Misconfigured servers and Content-Length

A very frustrating problem! We've had an RSS feed available at www.lowcarboneconomy.com/GetRSS.xml for ages to syndicate our news feed. I monitor it daily using Netvibes to ensure that it's working. The other day, I created a LinkedIn and FriendFeed page for LowCarbonEconomy.com and neither would accept the RSS feed.

So, W3 validator to the rescue again. Or not. I got a 'misconfigured server' error. I couldn't find any info on this via Google, so tried a different validator. This time, I got a couple of warnings, but a valid feed result :)

So, to cut a long story short, I narrowed it down to some kind of HTTP Header or compression problem and asked Andre to check it out. I'll leave him to pick up the story: http://drayblog.gotdns.com/...

(SPOILER: In case his blog goes offline, it's all about IIS compression and setting a Content-Length in the header to avoid chunked compression by turning the content from dynamic into static)

10th February 2009

Brighton & Hove Building Green (v2)

Pro bono migration of a small Brighton non-profit organisation's website from my own custom flat HTML to a self-hosted WordPress-based site with custom theme and Flickr integration.

Brighton & Hove Building Green (v2)

3rd February 2009

Windows Live Mesh - Website Folder Sync Workaround

See this thread: http://social.microsoft.com/Forums/en-US/LiveMesh/thread/de97cae2-1ab6-481c-be9d-311dff79b8f7/?ffpr=0 for more details, but the simple solution is...

Right click the website folder, choose the customize tab, and change the icon back to a normal folder icon. That's it. Your website will still work as such, but now it will sync too :)

23rd January 2009

Send Email to Gmail Groups - Why no UK support?

I've read a couple of posts online about how to send email to contact groups in Gmail. Apparently this is quite possible in Australia and the US (or at least it was at some point). Why can't we do it in the UK? Don't you trust us Google?

If somone sends me a funny that I want to send on to my friends, I have to copy the message, go to my contacts, find the group, select to email them, then paste the email/attachments in and send. It would be nice to be able to click 'forward', type the group name and go.

Would love to know any quick ways to do this, or any idea from the Gmail team as to when and if this is coming to the UK?

*UPDATE 11/02/09*

W00t! It just worked for me - thanks Gmail team!

*UPDATE 09/03/09*

Gah! It's stopped working again now. I'm not sure whether I'm trying to do it differently this time, or whether they've taken support away again - I'll keep looking and post if I find anything.

*UDPATE 01/03/10*

OK - so it seems to me some kind of intermittent problem. On dodgy connections, I often find that the group send functionality isn't available. But, if I sign out and back in, it reappears. Perhaps it's a JavaScript issue. Either way, a good old sign out/in seems to be the fix.

9th January 2009

Multiple Accounts for Delicious in Firefox 3

Despite too much looking, I couldn't find a Firefox extension or combination of extensions that managed to allow me to post bookmarks to two different delicious accounts without logging in and out of the delicious website.

In the end I've gone for my work delicious account on Firefox 3 with the official delicious add-on, and Google Chrome with a bookmarklet for my personal account. Bit of a pain, but a decent workaround.

Why on earth no one has updated Firefox Complete for FF3 I don't know.

12th December 2008

Digsby Failed to Connect to Gmail

Just a quick one really. Restarted my computer after some standard Windows Update installs and since I started my computer today my Digsby won't connect to Gmail.

It had trouble connnecting to twitter too, but got there in the end.

From the Digsby forums it looks like a restart might solve the problem. I'll post back if it does.

UPDATE

Digsby announcement - it's gmail's servers apparently. Looking forward to getting the update.

UPDATE 9th Jan 09

I thought I'd updated this post :S Digsby update came out quickly, worked great - well done Digsby.

3rd December 2008

Google Sites and HTM/HTML files

I recently wrote a couple of UWA widgets that allow users to display photos from a SmugMug feed on their netvibes/iGoogle/Vista sidebar.

I was trying to find somewhere I could host the .htm widget files and was hoping to be able to use Google Sites (because I'm cheap and it's free).

Frustrated to find that after setting everything up, you can't upload .htm files to your Google Site :(

6th November 2008

Troublesome Opacity in IE7

So, you've worked out that IE7 isn't standards-compliant WRT the opacity property in CSS, so you've used the 'filter:alpha' method - and the opacity's still not working?

IE7 needs an element to be positioned before opacity will work. If you don't want to use positioning, apply zoom:1; to the element in CSS (both standard and :hover) and that should get it working...

3rd October 2008

The Ethical Occasions Company

very quick and simple website for a friend's start-up business. Design and build. This site has been superceded by a new one - please see above.

The Ethical Occasions Company

30th August 2008

My Rehab / Carter Gordon Clinics / Highland House

Build to design and specification of a large and fairly complex website: embedded video, pop-up JavaScript functionality using overlib.js library, sliding doors menu, extensive CSS, flash banner, multiple contact forms, Google Website Optimiser, Google Adwords. This screenshot shows the second, re-branded incarnation. Quite a big project, and one that certainly honed my skills in CSS. This site has been superceded by a new one.

Highland House

29th August 2008

SQL Server: Using Parameters and Local Variables

I was trying to get a stored procedure in SQL Server to run using a mixture of parameters passed from an ASP.NET page and a local variable which I wanted to declare in order to modify one of the parameters received.

I couldn't figure out where to put the local variable in relation to the parameters, until I found this page:

http://www.sqlteam.com/article/introduction-to-dynamic-sql-part-2

The parameters go before the 'AS' statement, the local variable after, but before the 'BEGIN' statement if you use it.

21st August 2008

Two Connections for One Wireless Network?

I've been having this weird problem at home with my wireless network. I have a Windows Vista Ultimate laptop (Lenovo Thinkpad T61p) and a Netgear RangeMax WNR854T wireless router. In 'Network & Sharing Centre' on Vista, it shows that I have two network connections to the same wireless network. Both show I'm connected to local and internet. One connection is continuously identified as an 'Unidentified Network', the other is as it should be with my settings in place.

View Status shows the same status, and Disconnect disconnects both connections. When I reconnect, it creates the dual network connections again. This would be just a curiosity but it seems to be really slowing my connection, so I'm going to have to find out what's going on.

So, success at last with a solution but not a reason that I can pinpoint.

Having tried turning on and off IPv4 and IPv6 connectivity, NETBIOS, file and print sharing and just about every other combination I could come up with, I tried a static IP and low and behold I now only have one wireless network connection and the speed is back to normal.

Very strange, but at least it's resolved.

21st August 2008

TyTn II Won't Go Into Standby

I've had my TyTn II for about 7 months now and yesterday it just started playing up. I made no software or hardware changes or did anything unusual. It just wouldn't go into standby, and when it did, it was a Standby Of Death (SOD). Also, when I slid the keyboard out, the screen wouldn't flip to horizontal.

I've checked about a bit for Windows Mobile 6.1 update for this device (T-mobile Vario III) and it's not released yet. Anyway, after many soft resets it seems to be playing nice again so I'll post again if it redevelops.

This was a useful post about it all: http://forum.xda-developers.com/archive/index.php/t-332088.html

*UPDATE*

So, I lived with this problem for a while and in the end bit the bullet and did a hard-reset. This worked and the keyboard is now behaving :)

18th March 2008

Rehab-Search

Part design and build of a fairly simple lead-generation focussed website for a small consortium of rehab businesses. Unfortunately, the consortium did not last long, and the website has now been taken down. Although not the most complex of projects, this was my first venture into XHTML, and I ended up with a template that I thought worked well and has since formed the basis for further sites.

Rehab-Search

26th February 2008

Netvibes Widgets

See all my widgets here. This was my first foray into XML and widgets, and a good learning curve. It earnt me a free lifetime pro account on SmugMug, an excellent photo sharing site and one I have been using for years. I ended up building these widgets because I couldn't find one out there to bring my photos into Netvibes from the site.

Netvibes Widgets

17th September 2007

Dr Lockie Self Help Homeopathy

My late father's self-help homeopathy site, upgraded from a very old, flat HTML site after my father's death to the current, dynamic site. A massive undertaking - essentially transforming a whole book into a dynamic website!

Dr Lockie Self Help Homeopathy

26th August 2007

MCA Directors

Asked to upgrade a friend's company website. Resulted in further work for The Ethical Presentations Company. Again, built to design on the same architecture as www.drlockie.com. During this project I greatly increased my knowledge and understanding of CSS in web design, implementing a sliding doors rollover effect for the menu.

MCA Directors

8th June 2007

The Ethical Presentations Company

A friend's start-up business website providing ethical presentation skills to non-profit organisations. This is the first site I built (to design) as a standalone HTML/CSS site from scratch and thus represented a great leap forward in my understanding of HTML and CSS.

The Ethical Presentations Company

26th February 2007

Brighton & Hove Building Green

Website design and build for a small Brighton non-profit organisation aiming to increase awareness of the benefits of green roofs and walls. Built upon my initial experiences with HTML and CSS to produce a bigger and more complex site. Also included logo design.

Brighton & Hove Building Green

26th January 2007

Wilson Lodge

A family friend's business, built on the same architecture as www.drlockie.com. I coordinated security and consolidation of domain names, DNS and email communication to facilitate their business processes and I also remastered the corporate branding and produced branded stationnery and literature for the business.

Wilson Lodge website screenshot