About Me

portrait of author

Where shall I start? It's best to begin at the beginning and go on till I come to the end: then stop.

1997 was my first year at university. There, I used the World Wide Web for the first time. The 20th century web was a shallow experience...

Read more...

About this project

This website follows the “mobile first responsive design” philosophy.

The starting points were elements of Andy Clarke's 320 & Up and Mobile Boilerplate and from there I turned it up to 11; including writing a new script, SVG Plug, as a solution for the lack of native support for Scalable Vector Graphics in a number of popular browsers.

Read more...

Contact Me

Please get in contact for coding enquiries. You'll find a more thorough CV on my stackoverlow Careers 2.0 profile

Events

Redbridge College Course:
Foundation Internet Marketing

Speakers: Andy Walpole and Rob Keating

Are you starting a business or already running a business? Are you frustrated that your competitors outrank you on Google? If you are unhappy with your current online marketing or just want to find out more come along to our workshop. It has been designed for small to medium-sized businesses and is delivered by two industry experts. The aim of this two hour workshop is to teach you both the theory and practice of some key aspects of online marketing.

Read more...

Projects

project montage
Read more...

Blog

The blog of London-based web coder Andy Walpole. Covers both front and backend development.
Hide CSS in Internet Explorer 8 and below
April 8th, 2012

There is, of course, an easy of way of targeting certain versions of Internet Explorer by using conditional comments. This allows you to separate your CSS into different files based on browser version.

:focus pseudo-class feature detection
April 5th, 2012

javascript logo

Centring elements horizontally and vertically with the CSS3 calc() function
April 2nd, 2012

Another month arrives and more CSS3 comes into play. March was witness to calc() being incorporated into the Webkit engine.

Read more...

Twitter

andywalpole

user image

Music, politics and tech. Coder: HTML, CSS, PHP, JavaScript, I am the walrus, goo goo g'joob g'goo goo g'joob. London Town, kind of. http://andywalpole.me/

8:45, May 18th, 2012

The Alan Partridge TV show was in 2003. Doesn't seem that long ago

Read more...

GitHub

TCotton pushed to master at TCotton/Wordpress-plugin-Affiliate-Hoover

14:10, May 18th, 2012

TCotton pushed to master at TCotton/Wordpress-plugin-Affiliate-Hoover May 18, 2012 TCotton committed 1fdb6ff friday update

TCotton pushed to master at TCotton/Wordpress-plugin-Affiliate-Hoover

16:12, May 16th, 2012

TCotton pushed to master at TCotton/Wordpress-plugin-Affiliate-Hoover May 16, 2012 TCotton committed 8f96fb5 may 16

TCotton pushed to master at TCotton/Wordpress-plugin-Affiliate-Hoover

10:52, May 14th, 2012

TCotton pushed to master at TCotton/Wordpress-plugin-Affiliate-Hoover May 14, 2012 TCotton committed b785d6c monday update

Read more...

Forrst

AndyW

user image

Freelance coder from the pit bull infested Essex / London border lowlands.

HTML, CSS, JavaScript, PHP

Current personal projects include building my own set of Wordpress developer classes, working on my CodeIgniter-based CMS, CodeSharp; and expanding my JavaScript knowledge to include new object methods from ECMAScript 5.

Goals for this year: more Drupal, more Wordpress, tackling Symphony PHP framework and to start using backbone.js / underscore.js

Avante!

Read more...
member of the drupal association

Dial-up, not broadband. BBC.co.uk consisted of a TV guide. And nothing more. “By the end of the day users from America will be logging on so you'll notice that the internet will be running more slowly”.

Skip forward to 2003. A publishing company in east London. No takers for updating the company web site, so I was given the responsibility. And that was it. The moment of genesis. Lift off. Houston, all engines are go. I sought union with binary digits. I dreamt in code. Isolation. Expansion. Conquering lion.

The 21st century web is a communication medium for inspiring ideas, innovation and change. It's ultra-modernity delivered at 2000mph.

It's impossible not to feel passionate in return.

Coding is my passion

Skillset: HTML, CSS, JavaScript, PHP, SEO, SQL, Git, SVN, Photoshop, Fireworks, Drupal, Wordpress, jQuery, CodeIgniter

close pageclose

“We’re all just trying to work this out”

Back in the Autumn of 2009 Luke Wroblewski wrote a short blog post entitled Mobile First in which he laid the foundation to a new design approach as an answer to rapidly changing technology platforms.

When Ethan Marcotte penned his seminal article Responsive Web Design during the spring of the following year, this new, experimental creative strategy was fleshed out further.

Today it is a growing discipline that uses the latest HTML5 and CSS3 code so as to meet the demands of a complex spectrum of user devices.

As an evolving practice there is still much discussion amongst its participants.

“Mobile first” is more than about code but also about the rationalisation of content – do you really need that long article? Can't you cut it down to a few paragraphs? It is about stripping away the superfluous.

Media queries

But advanced methods do require advanced coding practices, in particular, the use of CSS3 media queries; and with much of CSS3 comes the lack of support in Internet Explorer versions 8 and below.

There are a couple of polyfills that are designed to plug this gap in support. I tried both Respond.js and CSS3 Media Queries but both are buggy and prone to clashing with other scripts and I wouldn't consider either fit for commercial use. After some frustrating experiences I abandoned any hope of using advanced media queries on the legacy browsers.

Scalable Vector Images (SVG)

A new front for design considerations has also been opened: the increase of dots per inch. On the desktop 72 dpi is standard while for the print 300 dpi rules. Mobile devices can be anywhere up to 326 dpi and which leaves images created at 72 dpi looking fuzzy.

A solution to this problem is using Scalable Vector Images (SVG) which, after 10 years in existence, are finding a reason to be widely adopted.

Again, just like media queries, there is no support in Internet Explorer versions 8 and below.

After examining the various workarounds and polyfills and I decided that all were deficient and so I created a script called SVG Plug. This code swaps images for SVG in non-supporting browsers. For a full explanation read my blog post Using SVG in web design.

Conclusion

So a success then?!

In some ways yes, in other ways no. Experimenting with solutions often leads to more questions. But that's okay:

“Responsive Web Design is REALLY NEW and NOBODY knows how to do it properly/right/appropriately yet! We’re all just experimenting.
And THAT’S FINE!” - Mark Boulton

This project was built with a little help from my friends: 320 and Up, Mobile Boilerplate, LABjs Script Loader, Modernizr, Animator.js, DOMAssistant, Selectivizr and feedback from the droogs on Forrst who pointed out the difference between heaven and hell.

close pageclose

Scripts

Elegant Alert

elegant alert screenshot

The default browser JavaScript alert is fine for debugging but awful for users when used in form submission. This script creates a more pleasant means of user feedback.

See a demo here or grab the code on GitHub.

CodeSharp CMS

codesharp cms screenshot

Based upon a CodeIgniter base, this CMS is intended for uses where a full-blown solution like Drupal or ExpressionEngine would be overkill.

There is a heavy dependency on JavaScript in the admin area (jQuery and AJAX) but it degrades gracefully.

Grab the code on GitHub here.

Little Colour Boxes jQuery plugin

little colour boxes

A jQuery plugin to create little pretty boxes over an image on page load. See a demo here or grab the code on GitHub.

Design and Development

Code examples

Lets cut the bullshit and go to some easy accessible recent code examples: PHP, JavaScript, CSS and for HTML look at the source code for this site.

Wordpress plugin Affiliate Hoover

affiliate hoover screenshot

This plugin allows affiliate marketing publishers to import CSV or XML files so as to create individual posts from the content.

It is fully intergrated with Wordpress but uses a number of PEAR modules including XML Serializer, CSV Parser, XML Utilities and XML Parser.

A Guide to Keyman Insurance

This is a design for an unorthodox insurance web site

Keyman insurance is aimed at businesses who need cover for directors or important employees in the event of a tragedy.

The client wanted a site as a means to generate leads but only had thin content. I worked with them in writing a 2,000 word guide on the subject so as to provide some expansive text for the search engines that could draw people in.

The website is hand-coded from scratch while the fonts used are Salsbury for headlines and FF Meta Serif Web Pro for the body. jQuery is used for the script with the wonderful Backstretch plugin used on the background image.

close pageclose

TCotton pushed to master at TCotton/Wordpress-plugin-Affiliate-Hoover

14:10, May 18th, 2012

TCotton pushed to master at TCotton/Wordpress-plugin-Affiliate-Hoover May 18, 2012 TCotton committed 1fdb6ff friday update

TCotton pushed to master at TCotton/Wordpress-plugin-Affiliate-Hoover

16:12, May 16th, 2012

TCotton pushed to master at TCotton/Wordpress-plugin-Affiliate-Hoover May 16, 2012 TCotton committed 8f96fb5 may 16

TCotton pushed to master at TCotton/Wordpress-plugin-Affiliate-Hoover

10:52, May 14th, 2012

TCotton pushed to master at TCotton/Wordpress-plugin-Affiliate-Hoover May 14, 2012 TCotton committed b785d6c monday update

TCotton pushed to master at TCotton/Wordpress-plugin-Affiliate-Hoover

16:07, May 13th, 2012

TCotton pushed to master at TCotton/Wordpress-plugin-Affiliate-Hoover May 13, 2012 TCotton committed 8a8bac6 another sunday update

TCotton pushed to master at TCotton/Wordpress-plugin-Affiliate-Hoover

10:27, May 13th, 2012

TCotton pushed to master at TCotton/Wordpress-plugin-Affiliate-Hoover May 13, 2012 TCotton committed f346f96 sunday update

TCotton pushed to master at TCotton/Wordpress-plugin-Affiliate-Hoover

12:25, May 12th, 2012

TCotton pushed to master at TCotton/Wordpress-plugin-Affiliate-Hoover May 12, 2012 TCotton committed 8c4ac43 remove files

TCotton pushed to master at TCotton/Wordpress-plugin-Affiliate-Hoover

12:17, May 12th, 2012

TCotton pushed to master at TCotton/Wordpress-plugin-Affiliate-Hoover May 12, 2012 TCotton committed a06d88f remove

TCotton pushed to master at TCotton/Wordpress-plugin-Affiliate-Hoover

12:17, May 12th, 2012

TCotton pushed to master at TCotton/Wordpress-plugin-Affiliate-Hoover May 12, 2012 TCotton committed f113237 new update

TCotton pushed to master at TCotton/Wordpress-plugin-Affiliate-Hoover

6:50, May 10th, 2012

TCotton pushed to master at TCotton/Wordpress-plugin-Affiliate-Hoover May 10, 2012 TCotton committed b6611b5 new readme

TCotton pushed to master at TCotton/Wordpress-plugin-Affiliate-Hoover

6:45, May 10th, 2012

TCotton pushed to master at TCotton/Wordpress-plugin-Affiliate-Hoover May 10, 2012 TCotton committed 0820b12 first commit

close pageclose
Hide CSS in Internet Explorer 8 and below
April 8th, 2012

There is, of course, an easy of way of targeting certain versions of Internet Explorer by using conditional comments. This allows you to separate your CSS into different files based on browser version.

:focus pseudo-class feature detection
April 5th, 2012

javascript logo

Centring elements horizontally and vertically with the CSS3 calc() function
April 2nd, 2012

Another month arrives and more CSS3 comes into play. March was witness to calc() being incorporated into the Webkit engine.

Using cookies instead of wp_localize_script()
March 29th, 2012

Wordpress logo

Setting up Eclipse IDE for JavaScript and PHP development
March 20th, 2012

Everybody has their own IDE of choice with Sublime Text seemingly the most popular at the moment. A good IDE should be solid, stable software with full features and UX which leaves you, the coder, freedom to concentrate on the job in hand.

Checking for unique values in a multidimensional array
March 10th, 2012

PHP elephant

Using PHP to parse XML, RSS or CVS files which are compressed with ZIP or GZIP
February 23rd, 2012

Reading and creating XML, RSS and CVS files is essential knowledge when it comes to using PHP because they are all formats commonly used for a wide range of purposes.

Using advanced JavaScript array methods
February 22nd, 2012

Advanced is an adjective used subjectively here because you may be already using the methods below on a regular basis, but in by using the term advanced I am referring to JavaScript from versions 1.6 to 1.8 that are not available in Internet Explorer versions 8 and below.

Resources for learning CodeIgniter
February 10th, 2012

It could be argued that CodeIgniter is the most popular Open Source PHP framework around. It certainly features heavily on developer and designer sites like Forrst.

Some more tips on learning JavaScript
February 9th, 2012

In February 2011 Think Vitamin published an article written by me entitled Tips on Learning JavaScript. In 2010 I had added learning JavaScript to my “things to do list” for that year, and the Think Vitamin item offered feedback on my progress so far. Re-reading my article nearly all the advice I gave out is correct but I did write: “I would now classify my skills as intermediate”. I was a little hasty in making that statement.

Pushing CSS to its limits
February 6th, 2012

As CSS3 roars ahead in spite of the old Internet Explorer legacy browsers acting like a drag weight on faster adoption, there have been some really fascinating experiments with CSS3 properties and values which have created design styles far beyond what the original participants behind the W3C CSS modules could have imagined.

close pageclose

Freelance coder from the pit bull infested Essex / London border lowlands.

HTML, CSS, JavaScript, PHP

Current personal projects include building my own set of Wordpress developer classes, working on my CodeIgniter-based CMS, CodeSharp; and expanding my JavaScript knowledge to include new object methods from ECMAScript 5.

Goals for this year: more Drupal, more Wordpress, tackling Symphony PHP framework and to start using backbone.js / underscore.js

Avante!

New Wordpress addon, Affiliate Hoover

May 14th, 2012

wordpress.org/extend/plugins/affiliate-hoover/

I can't begin to tell you how many man hours I've put into this

It started off last year when I had a client who had previously integrated some god-awful commercial script with Wordpress. I thought, I can write better code than this with a blindfold on.

This year I wanted to familiarise myself more with the Wordpress codex so I started it as a project.

And 5k lines of code later (written without a blindfold) and here it is.

On a related note, if there are any designers or developers who want to collaborate on commercial projects please get in touch.

Best CSS formatter

May 10th, 2012

A lot of CSS formatters can't handle CSS3, but this one can.

It's comes from Sencha Labs.

You can take a look at one of my CSS files here to see how beautifully it handles CSS animation: github.com/TCotton/Lightbox-Ultra/blob/master/styles/…

I wondered if there was a Sublime plugin for but I can't seem to find one

Your most used JavaScript pattern?

May 4th, 2012

After trying out various singleton / module formations I've settled on Addy Osmani's module / facade:

var module = (function() {
var _private = {
    i:5,
    get : function() {
        console.log('current value:' + this.i);
    },
    set : function( val ) {
        this.i = val;
    },
    run : function() {
        console.log( 'running' );
    },
    jump: function(){
        console.log( 'jumping' );
    }
};
return {
    facade : function( args ) {
        _private.set(args.val);
        _private.get();
        if ( args.run ) {
            _private.run();
        }
    }
}
}());

module.facade({run: true, val:10});
//outputs current value: 10, running

What I like about the pattern is that you can use private / public methods and attributes, getters / setters and it is easy to fit in a sub / pub too.

What do you use most frequently?

close pageclose

8:45, May 18th, 2012

The Alan Partridge TV show was in 2003. Doesn't seem that long ago

20:49, May 17th, 2012

Good doc: BBC iPlayer - The Two-Thousand-Year-Old Computer - http://t.co/9CR91nvS

19:55, May 17th, 2012

Anybody who claims "music today isn't as good as the old days" should be forced to watch the 1977 Top of the Pops special

19:47, May 17th, 2012

this track in top of the pops 70s now. It's really bad. Like really bad

19:10, May 17th, 2012

Using the SVN on Wordpress can quite traumatic. It's far easier to make mistakes than GIT

14:11, May 17th, 2012

This is what you end up looking like if you live in LA for too long --> http://t.co/gTsYb9TU

9:01, May 17th, 2012

I'm not sure what's more alarming. Tweets from @RealTimeWWII about the collapse of Europe in WWII or contemp. rolling news about today

6:43, May 17th, 2012

Right, who's got a spare trillion they can lend the British economy? Apparently we are going to need in the need couple of months

17:00, May 16th, 2012

Not sure what high street shop I would compare Twitter to

16:59, May 16th, 2012

Goolge Plus is like Costa Coffee. You'd go in there now and again but once you've drunk your coffee you wouldn't hang around for long

16:58, May 16th, 2012

Facebook has all the atmosphere of a Sainsburys superstore

close pageclose