<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Paul Adam Davis</title>
	<atom:link href="http://pauladamdavis.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://pauladamdavis.com</link>
	<description>Web developer and laid-back thinker.</description>
	<lastBuildDate>Fri, 26 Apr 2013 16:09:56 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.5.1</generator>
		<item>
		<title>Memoirs of a Coder #9</title>
		<link>http://pauladamdavis.com/blog/2013/04/memoirs-of-a-coder-9/</link>
		<comments>http://pauladamdavis.com/blog/2013/04/memoirs-of-a-coder-9/#comments</comments>
		<pubDate>Fri, 26 Apr 2013 16:09:56 +0000</pubDate>
		<dc:creator>pauladamdavis</dc:creator>
				<category><![CDATA[Memoirs of a Coder]]></category>

		<guid isPermaLink="false">http://pauladamdavis.com/?p=2122</guid>
		<description><![CDATA[Mr Michael Rose drew my avatar using the iPad app, Paper. It&#8217;s awesome! Take a look. I spoke at my first conference in a year. I spoke about stuff we can do today in responsive web design. It was a blast. Here&#8217;s my slides, I also wrote about it. I also spoke at a great&#160;<a href="http://pauladamdavis.com/blog/2013/04/memoirs-of-a-coder-9/">Read more</a>]]></description>
				<content:encoded><![CDATA[<ol>
<li>Mr Michael Rose drew my avatar using the iPad app, Paper. It&#8217;s awesome! <a href="https://twitter.com/mmistakes/status/325031332730245121">Take a look</a>.</li>
<li>I spoke at my first conference in a year. I spoke about stuff we can do today in responsive web design. It was a blast. Here&#8217;s my slides, I also <a href="http://pauladamdavis.com/blog/2013/04/building-rwd/">wrote about it</a>.</li>
<li>I also spoke at a great monthly meetup in London called Geeky. I ranted for 2 minutes, not as planned, it should&#8217;ve been 10 minutes. I got some laughs though, for the right reason.</li>
<li>As ever, Gavin Elliot put on a great conference in Newcastle, this time called Industry. Everything about it was just so good.</li>
<li>The amazing <a href="http://girlwithacamera.co.uk/">Ashley Baxter</a> took some photos of yours truely! You can see <a href="http://girlwithacamera.co.uk/industry-conf/">two here</a>.</li>
<li>I&#8217;m working on a completely re-designed &amp; re-built theme for this blog. It&#8217;s gonna be awesome. Hold tight.</li>
</ol>
]]></content:encoded>
			<wfw:commentRss>http://pauladamdavis.com/blog/2013/04/memoirs-of-a-coder-9/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Useful WordPress Snippets #1</title>
		<link>http://pauladamdavis.com/blog/2013/04/useful-wordpress-snippets-1/</link>
		<comments>http://pauladamdavis.com/blog/2013/04/useful-wordpress-snippets-1/#comments</comments>
		<pubDate>Wed, 24 Apr 2013 11:20:46 +0000</pubDate>
		<dc:creator>pauladamdavis</dc:creator>
				<category><![CDATA[Tools & Tips]]></category>
		<category><![CDATA[WordPress]]></category>

		<guid isPermaLink="false">http://pauladamdavis.com/?p=2105</guid>
		<description><![CDATA[The little-known CMS &#38; blogging platform, WordPress, has paid my bills for 4 years now. It&#8217;s the only open-source CMS I&#8217;ve ever used. In those 4 years, the amount of snippets I have in Kodery for it is just huge. Here, I want to share some cool ones that will probably help on a vast&#160;<a href="http://pauladamdavis.com/blog/2013/04/useful-wordpress-snippets-1/">Read more</a>]]></description>
				<content:encoded><![CDATA[<p>The little-known CMS &amp; blogging platform, WordPress, has paid my bills for 4 years now. It&#8217;s the only open-source CMS I&#8217;ve ever used. In those 4 years, the amount of snippets I have in <a href="http://kodery.com">Kodery</a> for it is just huge. Here, I want to share some cool ones that will probably help on a vast majority of sites with a completely bespoke theme.</p>

<h2>&#8216;Post&#8217; to &#8216;Article&#8217; in the back-end</h2>

<p>Most of the blog-type themes I&#8217;ve built have been designed to replace an existing (usually bespoke) archaic CMS, where the editors refered to (what we know as Posts) as Articles. It&#8217;s easy to add and helps people understand what things are.</p>

<pre><code>// functions.php
// hook the translation filters
add_filter('gettext', 'change_post_to_article');
add_filter('ngettext', 'change_post_to_article');
function change_post_to_article($translated) {
     $translated = str_ireplace('Post',  'Article',  $translated);  // ireplace is PHP5 only
     return $translated;
}
</code></pre>

<h2><code>/?s=</code> to <code>/search/</code> in URLs</h2>

<p>It seems silly that WordPress gives us a powerfull pretty-url system, but still shows the get var name in the URL for searches. Let&#8217;s fix that.</p>

<pre><code>// functions.php
// Changes ?s=term to /search/term
function change_search_url_rewrite() {
    if (is_search() &amp;&amp; ! empty( $_GET['s'])) {
        wp_redirect(home_url("/search/") . urlencode( get_query_var('s')));
        exit();
    }
}
add_action( 'template_redirect', 'change_search_url_rewrite' );
</code></pre>

<p><em>Note, this will only work if you aren&#8217;t using the default &#8216;out of the box&#8217; URls. Meaning, if you see ?uestion marks in normal page URLs, this won&#8217;t work.</em></p>

<h2>Change default Gravatar</h2>

<p>So we all know that WordPress uses the Gravatar system for avatars, that makes complete sense, the same company make it, but not everyone has a gravatar. I&#8217;d suggest most people don&#8217;t. The grey default WordPress provides for those people probably suits most ocasions, but when it doesent, another snippet will rescue you. You can set the source for the image as well as its name which appears in the &#8216;Discussions&#8217; page in the back-end.</p>

<pre><code>// functions.php
// Change default gravatar
if ( !function_exists('custom_gravatar') ) {
    function custom_gravatar( $avatar_defaults ) {
        $myavatar = get_bloginfo('template_directory') . '/images/gravatar.gif';
        $avatar_defaults[$myavatar] = 'Custom Gravatar';

        return $avatar_defaults;
    }

    add_filter( 'avatar_defaults', 'custom_gravatar' );
}
</code></pre>

<h2>Define URLs</h2>

<p>I&#8217;m sure we&#8217;re all migrated a WordPress site before, and needed to go into the SQL mid-migration and find &amp; replace the old URL for the new one. It&#8217;s a pain in the ass. This will help.</p>

<pre><code>define('WP_SITEURL', 'http://' . $_SERVER['HTTP_HOST']);
define('WP_HOME', 'http://' . $_SERVER['HTTP_HOST']);
define('WP_CONTENT_DIR', $_SERVER['DOCUMENT_ROOT'] . '/wp-content');
</code></pre>

<p>What it does, is makes every reauest for a URL use the one you provided. The code above takes the domain from whatever is in the URL and uses that, ideal for using the same database on multiple enviroments where everyone will have their own local URL for it. You can of course set it to use a hard-coded URL too.</p>

<h2>Get the template name</h2>

<p>This is a rather niche thing to do, but let&#8217;s say you need to know what template a page is made to use.</p>

<pre><code>$template = get_post_meta($post-&gt;ID, '_wp_page_template', true);
</code></pre>

<p>That&#8217;ll return &#8216;page-my-special-template.php&#8217;.</p>

<h2>Hide &#8216;Posts&#8217; menu in the back-end</h2>

<p>Not every WordPress site will have a blog in it. To make it easier for the admins to use, we should really clean up the menus.</p>

<pre><code>function remove_menu_item() { 
    global $menu;
    $restricted = array(__('Posts'));
    end ($menu);
    while (prev($menu)){
        $value = explode(' ',$menu[key($menu)][0]);
        if(in_array($value[0] != NULL?$value[0]:"" , $restricted)) {
            unset($menu[key($menu)]);
        }
    }
}
add_action('admin_menu', 'remove_menu_item');
</code></pre>

<h2>Remove other menu items in the back-end</h2>

<p>On a similar vein to the previous snippet, we should remove other menu items we know arent going to be used.</p>

<pre><code>add_action( 'admin_menu', 'my_admin_menu' );
function my_admin_menu() {
     remove_menu_page('link-manager.php');
     remove_submenu_page('edit.php?post_type=standard', 'post-new.php?post_type=standard');
}
</code></pre>

<p>To remove other menu items, you just need to add the URL for it. It works on default pages as well as submenu items, even in custom post types. To remove a submenu, you provide its parent URL and then the child you want to remove.</p>

<h2>Add a TinyMCE editor anywhere</h2>

<p>People like to be able to add links, bold stuff &amp; what-have-you themselves, without writing code. So if you&#8217;ve added a <code>textarea</code> to anything, anywhere, help them out a bit by making it easy for them to format text.</p>

<p>So this gets the data, either from a global <code>option</code> (the first one) or from a posts meta data, or custom field data (the second one).</p>

<pre><code>// Using option data (global)
$data = get_option('standard_intro_copy');

// Using post meta data
$data = get_post_meta($post-&gt;ID, 'home_video_text', true);
</code></pre>

<p>And this below is the editor its self. <code>standard_intro_copy</code> is the field name, be it global of meta data. Set <code>media_buttons</code> to true if you want to enable admins to add images &amp; such. Also, set <code>teeny</code> to false if you want to give them <em>full</em> controll over things like colour. Screemshots below of <code>teeny</code> set to true and false.</p>

<pre><code>$settings = array(
    'teeny' =&gt; true,
    'textarea_rows' =&gt; 12,
    'tabindex' =&gt; 1,
    'media_buttons' =&gt; false
);
wp_editor($data, 'standard_intro_copy', $settings); // data, textarea name, settings
</code></pre>

<p>Teeny: <code>true</code></p>

<p><img src="http://pauladamdavis.com/wp-content/uploads/2013/04/is-teeny.png" alt="image" /></p>

<p>Teeny: <code>false</code></p>

<p><img src="http://pauladamdavis.com/wp-content/uploads/2013/04/not-teeny.png" alt="image" /></p>

<hr />

<p>Hopefully some of those will help you out. :)</p>
]]></content:encoded>
			<wfw:commentRss>http://pauladamdavis.com/blog/2013/04/useful-wordpress-snippets-1/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Building RWD</title>
		<link>http://pauladamdavis.com/blog/2013/04/building-rwd/</link>
		<comments>http://pauladamdavis.com/blog/2013/04/building-rwd/#comments</comments>
		<pubDate>Fri, 19 Apr 2013 10:11:44 +0000</pubDate>
		<dc:creator>pauladamdavis</dc:creator>
				<category><![CDATA[Tools & Tips]]></category>

		<guid isPermaLink="false">http://pauladamdavis.com/?p=2088</guid>
		<description><![CDATA[This is the useful bits of info I shared in a talk I did at The Digital Pond in London last night. A talk, as a blog post. I&#8217;ll re-visit this at some point and make it more of a blog post than transcribed talk. HTML5 Forms There’s a load of new form elements that&#160;<a href="http://pauladamdavis.com/blog/2013/04/building-rwd/">Read more</a>]]></description>
				<content:encoded><![CDATA[<p>This is the useful bits of info I shared in a talk I did at <a href="http://thedigitalpond.com">The Digital Pond</a> in London last night. A talk, as a blog post. I&#8217;ll re-visit this at some point and make it more of a blog post than transcribed talk.</p>

<h2>HTML5 Forms</h2>

<p>There’s a load of new form elements that came in HTML5. Here’s most of them. Each has a slightly different way of entering data and looks slightly different in the browser.</p>

<ul>
<li>file</li>
<li>text</li>
<li>url</li>
<li>checkbox</li>
<li>hidden</li>
<li>tel</li>
<li>email</li>
<li>range number</li>
<li>search</li>
<li>date</li>
<li>password</li>
<li>radio</li>
<li>color</li>
<li>time</li>
</ul>

<h3>&lt;input type=&#8221;email&#8221; /&gt;</h3>

<p><img src="http://pauladamdavis.com/wp-content/uploads/2013/04/email_ios_android.png" alt="image" /></p>

<p>Mobile devices make good use of these, changing the keyboard layout to make entering the data they’re meant to accept, easier. Notice how the @ symbol and the dot are already there? It just makes entering emails a little easier. Browsers also do a little validation on these too.</p>

<h3>&lt;input type=&#8221;tel&#8221; /&gt;</h3>

<p><img src="http://pauladamdavis.com/wp-content/uploads/2013/04/telephone_ios_android.png" alt="image" /></p>

<p>Other things happen when the input type is set differently, such as a number pad showing then the input it set to ‘tel’.</p>

<h3>&lt;input type=&#8221;date&#8221; /&gt;</h3>

<p><img src="http://pauladamdavis.com/wp-content/uploads/2013/04/date-type-input-mobile.png" alt="image" /></p>

<p>Now, this is fairly common knowledge. We’ve been able to do this for a few years now. Where things get interesting is when using things like <code>&lt;input type=”date” /&gt;</code> You’ve all seen one of those popup boxes where you can select a date. It works fine on the desktop where you have a mouse and can precisely select what you want. Ever tried to use one on a phone though? It’s just painful. Same goes for dropdown boxes, or select elements if you know some code.</p>

<p>This is where JavaScript comes to play.</p>

<pre><code>if (!Modernizr.inputtypes.date &amp;&amp; !Modernizr.touch) {
    // Load your JS date picker
}
</code></pre>

<p>If you’re a developer, you’ve heard of Modernizr, i’m sure. For those who haven&#8217;t, it’s a library that detects if the browser supports certain things, letting us add or remove functionality, depending on the capabilities of the browser.</p>

<p>In this case, it means the date picker that’s really made for mouses, only gets loaded on devices that don’t have a native date picker, and aren&#8217;t touch devices. So, basically, a normal generic desktop.</p>

<p>You could omit the touch detection, but chances are, on the desktop, you’d want the date picker to be the same. Native date pickers are bloody hard to style.</p>

<p>The moral of the story here is, if the browser has a far better method of inputting data that’s better suited to the device, use it. Desktop == mouse, mobile is touch. Detect it, don’t assume anything, and you’ll have happier users.</p>

<h2>CSS3 Columns</h2>

<p>Next up, columns.</p>

<p>The feature you really want here, is the ability to split what would normally be a single vertical column of content into more than one.</p>

<pre><code>&lt;div class="content"&gt;
    &lt;div class="item"&gt;
        &lt;!-- Stuff --&gt;
    &lt;/div&gt;
    &lt;div class="item"&gt;
        &lt;!-- Stuff --&gt;
    &lt;/div&gt;
    &lt;div class="item"&gt;
        &lt;!-- Stuff --&gt;
    &lt;/div&gt;
    &lt;div class="item"&gt;
        &lt;!-- Stuff --&gt;
    &lt;/div&gt;
    &lt;div class="item"&gt;
        &lt;!-- Stuff --&gt;
    &lt;/div&gt;
&lt;/div&gt;
</code></pre>

<p><img src="http://pauladamdavis.com/wp-content/uploads/2013/04/1-col.png" alt="image" /></p>

<p>So imagine how these boxes would stack up if they had no style. They could be paragraph elements, lists, images, almost anything.</p>

<p>With no styling, they stack up on top of eachother. Let’s do something interesting.</p>

<pre><code>.content {
  column-count: 2;
  column-gap: 20px;
}
</code></pre>

<p>CSS3 gave us columns. This is as basic an example as you can get.</p>

<p>It’s kind of like floating elements to the left, but horizontally, kind of. An example will help.</p>

<p><img src="http://pauladamdavis.com/wp-content/uploads/2013/04/2-cols.png" alt="image" /></p>

<p>So this is what it gives us. It <em>may</em> be what you want, but notice how the 3rd box is split to make each column the same height?</p>

<pre><code>.item {
  display: inline-block;
}
</code></pre>

<p>This one chunk of CSS will help. It could be applied to each block of content, or just specific things like lists. Some slightly older browsers will split images too, so you might as well as it there as well, just to be sure. Let’s see what it does.</p>

<p><img src="http://pauladamdavis.com/wp-content/uploads/2013/04/2-cols-fixed.png" alt="image" /></p>

<p>Ah. Brilliant. Just what we wanted.</p>

<p>Of course, the columns are horizontally fluid too. But they will get too thin at some point. So media queries to the rescue! We’re just setting the column count to one on screen widths less than 400px wide, or most phoned these days.</p>

<pre><code>@media (max-width: 400px){
    .content {
        column-count: 1;
    }
}
</code></pre>

<h2>:hover on mobile</h2>

<p>The hover psdueo selector doesn&#8217;t exist on touch-only (apart from one device now) devices like the phone you have in your pocket. You’ll probably see the effect, after you’ve clicked on something. On mobile, we have tap events instead, which exist in both CSS and JavaScript. If you wanted the tap instantly, use this:</p>

<pre><code>-webkit-tap-highlight-color: rgba(255,0,0,0.5);
</code></pre>

<p>Here’s the 3 events you’ll care about in JavaScript. Take a look at that link for a little more info, if you’re a developer. You can do amazing things when combining them like detecting swipes in any direction, and how long something is tapped for, for drag &amp; drop interfaces.</p>

<pre><code>touchstart
touchend
touchmove
</code></pre>

<p>Here’s how you’d apply those in jQuery because jQuery is JavaScript these days.</p>

<p>We’re just detecting a tap event on a element inside a container. The tap is detected immediately, therefor, there’s no delay at all, where as with a traditional desktop click event, there’s a delay of approximately 300 milliseconds which feels like an eternity sometimes.</p>

<pre><code>$(“#container”).on(“touchend”, “.element”, function(){
    my.awesome.function();
});
</code></pre>

<h2>Retina</h2>

<p>You’re here, so I’m just gonna guess that you understand the importance of resolution independence. The ‘too long, didn&#8217;t read’ version would be, ‘non retina sites look like junk on my Mac, get with the program’.</p>

<p>Resolution, size, device &amp; input independence is kinda why we’re here. Let’s talk about resolution though.</p>

<h3>Icon Fonts</h3>

<p>I would take a guess and say most of the images on the web these days are icons for things, like social icons, the house and search icons. This is where icon fonts can help. For content images, photos, we have other options. More on that later.</p>

<p>Icon fonts are by far the best way to make your site somewhat resolution independent. For those of you here who aren&#8217;t too clued up on this, icon fonts act the same way regular text does. It’s like an infinitely scalable icon, just the same way text it. It <em>is</em> text, but shaped like an icon.</p>

<p>If you have the skills or have access to someone who can make fonts, you’re in luck. You can have a complete bespokely designed icon font. That said, you can convert vectors to fonts.</p>

<p>The alternative for most people, is using a pre-made icon font. I’m a strong advocate for GitHub’s Font Awesome. It’s aimed to be used on GitHub’s own apps, but, being open-source, others have added icons and it’s very usable for many types of websites.</p>

<p>I mention this, because wouldn&#8217;t it be great if non-coder designers, knew about this font and used it in designs? It’s almost like retina assets for free!</p>

<p><img src="http://pauladamdavis.com/wp-content/uploads/2013/04/fonts.png" alt="image" /></p>

<p><strong>The downsides? Tricks?</strong></p>

<p>I guess that icon fonts are inherently flat and need a solid colour.</p>

<p>You can do some great stuff with CSS gradients &amp; shadows. That said, if you’re sneaky, you can layer them up. If you use pseudo elements with the icon character’s unicode value as its content value, you can give different icons different colours and other treatments. You need a font that’s made for this though.</p>

<h3>Image Sprites</h3>

<p>Chances are though, you’ll need to add an image fo r things like the logo and maybe some other icons, or all of the icons.</p>

<p>Depending on how anal you get about serving the right assets to the right device, you could serve sprites for each pixel density to each device, or if you want to, you can group them, so send a 2x sprite to every device above a certain density (say, 1.3x). if you set a background-size on the sprite, you’ve covered all bases.</p>

<p>Pretty much every mobile browser in common use today will know what to do with background-size property in CSS anyway. For desktop though, older browsers, namely IE 8 and below, don’t know what it is, so it will show sprite assets at the resolution they are in the sprite, which would be twice as big in this case.</p>

<p>if you use a CSS pre-processor like Sass, it handles image sprites at different resolutions for you, providing you add the correct modules to Compass. That’s another talk altogether.</p>

<pre><code>@media (-webkit-min-device-pixel-ratio: 2), only screen and (min-device-pixel-ratio: 2) {
    background-image: url('sprite_2x.png');
}
</code></pre>

<h3>Content Images</h3>

<p>So that’s icon fonts &amp; sprites covered, what about the rest of the images of people in suits standing around a computer smiling?</p>

<p>Well, there’s still a lot of arguing about this happening around the web. Rather than talk about all of them, I’ll quickly touch on the proposed spec as it stands today.</p>

<pre><code>&lt;picture alt="Description of image subject."&gt;
    &lt;source srcset="small.jpg 1x, small-highres.jpg 2x"&gt;
    &lt;source media="(min-width: 18em)" srcset="med.jpg 1x, med-highres.jpg 2x"&gt;
    &lt;source media="(min-width: 45em)" srcset="large.jpg 1x, large-highres.jpg 2x"&gt;
    &lt;img src="small.jpg" alt="Description of image subject."&gt;
&lt;/picture&gt;
</code></pre>

<p>This is an example lifted directly from the spec, it’s a new element, the <picture> element. The alt tag that ordinarily goes on <img> tags goes on the <picture> tag and the different sized images go inside it.</p>

<p>As is now with HTML, if an element isn&#8217;t supported, the browser skips it and jumps straight inside it and renders what it can.</p>

<p>One day, browsers will natively support it, but if you added this to your code now, the <img> element inside the <picture> element would be shown, as it’s all the browser shows you.</p>

<p>You can polyfill it with JavaScript, but you’ll end up doubling the HTTP requests and ultimately slow the site down. And if the JS is slow to load, uses will see tiny images until the JS kicks in.</p>

<p>I’d just say leave normal square content images as 1x. Photos don’t look that bad at all when views on a higher DPI screen.</p>

<h3>Vertical Alignment, sans floats</h3>

<p>Quite often on product feature pages, you’ll have a list of stuff the thing does, usually in the form of images next to a bunch of text. If you’re only supporting IE8 and up, which you should, you can use tables to do this.
Now, before you scoff at me for suggesting table layouts are a good thing, I do mean CSS tables, not HTML tables. Your regular, semantic markup structure can remain. :)</p>

<p>Now,  It means whatever is in the box, be it an image, list, text or video, is in the middle of the box, vertically, without you needing to set where it sits.</p>

<p>Let’s see an example.</p>

<p><img src="http://pauladamdavis.com/wp-content/uploads/2013/04/apple.jpg" alt="image" /></p>

<p>This is from the iPad mini overview page. It’s a perfect example of what I mean. And it’s check off the requirement of an obligatory ‘Apple in a slide deck about design’.</p>

<p>I would’ve used animated cat gifs, but I’m not gonna sink that low.</p>

<p>So how do we do it.</p>

<p><img src="http://pauladamdavis.com/wp-content/uploads/2013/04/1.jpg" alt="image" /></p>

<p>So this is how it may look if you hard-code it to sit, say 100px from the top.</p>

<p><img src="http://pauladamdavis.com/wp-content/uploads/2013/04/2.jpg" alt="image" /></p>

<p>But if you re-size it, the text still sits 100px from the top. Yes, you could fix it with a media query, but that’s a pain in the ass and ultimately, not very flexible or maintainable, especially if the content is controlled by a CMS.</p>

<p><img src="http://pauladamdavis.com/wp-content/uploads/2013/04/3.jpg" alt="image" /></p>

<p>So this is out intended result when the box is a little smaller. So how do we do it? Out good friend, tables!</p>

<p>CSS tables that is. A very different beast to HTML tables, but the same kind of power that we want, with none of the extra fluff.</p>

<p><strong>The HTML</strong></p>

<pre><code>&lt;div class="table"&gt;
    &lt;div class="cell"&gt;
        &lt;img src="me.jpg" /&gt;
    &lt;/div&gt;
    &lt;div class="cell"&gt;
        &lt;p&gt;Lorem ipsum dolor sit amet, consectetu.&lt;/p&gt;
    &lt;/div&gt;
&lt;/div&gt;
</code></pre>

<p><strong>The CSS</strong></p>

<pre><code>.table {
    display: table;
    width: 100%;
}
.cell {
    display: table-cell;
    vertical-align: middle;
}
</code></pre>

<p>This is the equivalent HTML table, it should help you understand how the CSS related to the divs we had a moment ago.</p>

<p>Don’t use this, unless you’re doing emails or something else hacky.</p>

<pre><code>&lt;table&gt;
    &lt;tr&gt;
        &lt;td&gt;
            &lt;img src="me.jpg" /&gt;
        &lt;/td&gt;
        &lt;td&gt;
            &lt;p&gt;Lorem ipsum dolor sit amet, consectetu.&lt;/p&gt;
        &lt;/td&gt;
    &lt;/tr&gt;
&lt;/table&gt;
</code></pre>

<p><strong>So there we have it. Hope you learnt something new. :)</strong></p>
]]></content:encoded>
			<wfw:commentRss>http://pauladamdavis.com/blog/2013/04/building-rwd/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Memoirs of a Coder #8</title>
		<link>http://pauladamdavis.com/blog/2013/04/memoirs-of-a-coder-8/</link>
		<comments>http://pauladamdavis.com/blog/2013/04/memoirs-of-a-coder-8/#comments</comments>
		<pubDate>Sat, 06 Apr 2013 17:17:16 +0000</pubDate>
		<dc:creator>pauladamdavis</dc:creator>
				<category><![CDATA[Memoirs of a Coder]]></category>

		<guid isPermaLink="false">http://pauladamdavis.com/?p=2058</guid>
		<description><![CDATA[A site I started building a while went live. Enjoy. Speciality Breads Interesting, this. If you want a comment to appear in compressed CSS (in Codekit&#8217;s YUI mode at least), open is like /*! comment */. Notice the ! ? Magic. Useful for licenses that need to be in the code, wherever it is. Less&#160;<a href="http://pauladamdavis.com/blog/2013/04/memoirs-of-a-coder-8/">Read more</a>]]></description>
				<content:encoded><![CDATA[<ol>
<li>A site I started building a while went live. Enjoy. <a href="http://specialitybreads.co.uk">Speciality Breads</a></li>
<li>Interesting, this. If you want a comment to appear in compressed CSS (in Codekit&#8217;s YUI mode at least), open is like <code>/*! comment */</code>. Notice the <code>!</code> ? Magic. Useful for licenses that need to be in the code, wherever it is.</li>
<li><a href="http://lessthanbang.com">Less Than Bang</a>, the podcast I do with <a href="https://twitter.com/phuunet">Tom Ashworth</a> is alive. Go give it some love. And a listen.</li>
<li>Notice that little ad to the right? I know I&#8217;ve spoken a lot about them being silly and returning almost no money, but I get enough readers now that I can warrant it. Click them if you like, it helps me. :)</li>
<li>If you&#8217;re a developer, or anyone who writes any sort of text for that matter, you should really do your eyes a favor and get a high res screen, such a Retina MacBook pro. It makes staring a text so much nicer for long periods of time.</li>
<li>I have <em>2</em> talks coming up in near future, and one in October. I made a special <a href="/appearances/">Appearances</a> page for them. One is on RWD, the next is a rant and the third is a good look at my last couple of years. They&#8217;ve been quite a ride.</li>
</ol>
]]></content:encoded>
			<wfw:commentRss>http://pauladamdavis.com/blog/2013/04/memoirs-of-a-coder-8/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>The Industry Is Not Fucked</title>
		<link>http://pauladamdavis.com/blog/2013/04/the-industry-is-not-fucked/</link>
		<comments>http://pauladamdavis.com/blog/2013/04/the-industry-is-not-fucked/#comments</comments>
		<pubDate>Mon, 01 Apr 2013 11:59:00 +0000</pubDate>
		<dc:creator>pauladamdavis</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://pauladamdavis.com/?p=2030</guid>
		<description><![CDATA[As a response to sexism, everyone and their dog is ranting about how our industry is broken. It&#8217;s not. People are broken. I&#8217;m sure every industry has the same issues, we just have far more ways to find out about it. People in the building industry don&#8217;t have the same casual access to Twitter that&#160;<a href="http://pauladamdavis.com/blog/2013/04/the-industry-is-not-fucked/">Read more</a>]]></description>
				<content:encoded><![CDATA[<p>As a response to sexism, everyone and their dog is ranting about how our industry is broken. <strong>It&#8217;s not</strong>. People are broken. I&#8217;m sure every industry has the same issues, we just have far more ways to find out about it. People in the building industry  don&#8217;t have the same casual access to Twitter that we do, we hear much less about the issues, but we know they&#8217;re there.</p>

<p>What use is ranting going to do? We <strong><em>all</em></strong> know there are prehistoric-idiots out there. Giving fuel to their fire isn&#8217;t gonna help. <em>We</em> know they&#8217;re idiots, we <em>know</em> to ignore them. Don&#8217;t give them they attention they crave.</p>
]]></content:encoded>
			<wfw:commentRss>http://pauladamdavis.com/blog/2013/04/the-industry-is-not-fucked/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Memoirs of a Coder #7</title>
		<link>http://pauladamdavis.com/blog/2013/04/memoirs-of-a-coder-7/</link>
		<comments>http://pauladamdavis.com/blog/2013/04/memoirs-of-a-coder-7/#comments</comments>
		<pubDate>Mon, 01 Apr 2013 01:06:40 +0000</pubDate>
		<dc:creator>pauladamdavis</dc:creator>
				<category><![CDATA[Memoirs of a Coder]]></category>

		<guid isPermaLink="false">http://pauladamdavis.com/?p=1988</guid>
		<description><![CDATA[I recently bought a new 13&#8243; rMBP after the SSD in my MBA which I&#8217;ve had since November 2010 started to die. It&#8217;s amazing. Anyone who writes text for a living needs a retina screen. I chucked this blogs theme source on GitHub. Feel free to have a dig around. PixelPerc, my pixel-width to percentage&#160;<a href="http://pauladamdavis.com/blog/2013/04/memoirs-of-a-coder-7/">Read more</a>]]></description>
				<content:encoded><![CDATA[<ol>
<li>I recently bought a new 13&#8243; rMBP after the SSD in my MBA which I&#8217;ve had since November 2010 started to die. It&#8217;s amazing. Anyone who writes text for a living needs a retina screen.</li>
<li>I chucked this blogs <a href="https://github.com/PaulAdamDavis/pauladamdavis.com-WP-Theme">theme source</a> on GitHub. Feel free to have a dig around.</li>
<li><a href="http://pixelperc.com">PixelPerc</a>, my pixel-width to percentage converter, saw some updates, sporting some cleaner code, and now running on GitHub pages.</li>
<li>I&#8217;m experimenting a lot more with Ruby and Sinatra. I&#8217;m my ever-lasting quest to build a solid API for Kodery, Sinatra is my next step.</li>
<li>I wrote about some stuff I&#8217;ve learnt in <a href="/blog/2013/03/one-year-in/">one year of freelancing</a>. Seems well recieved.</li>
</ol>
]]></content:encoded>
			<wfw:commentRss>http://pauladamdavis.com/blog/2013/04/memoirs-of-a-coder-7/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>One Year In</title>
		<link>http://pauladamdavis.com/blog/2013/03/one-year-in/</link>
		<comments>http://pauladamdavis.com/blog/2013/03/one-year-in/#comments</comments>
		<pubDate>Sun, 31 Mar 2013 15:56:19 +0000</pubDate>
		<dc:creator>pauladamdavis</dc:creator>
				<category><![CDATA[Business]]></category>
		<category><![CDATA[Life]]></category>

		<guid isPermaLink="false">http://pauladamdavis.com/?p=1977</guid>
		<description><![CDATA[So… On the second of April 2012 at 9am GMT, I started a new full-time job as a full-time freelancer. I&#8217;ve detailed why and how before, so I&#8217;ll let you read those in your own time if you havent. Now though, I want to go over my experience in the last year, what I&#8217;ve learnt,&#160;<a href="http://pauladamdavis.com/blog/2013/03/one-year-in/">Read more</a>]]></description>
				<content:encoded><![CDATA[<p>So… On the second of April 2012 at 9am GMT, I started a new full-time job as a full-time freelancer. I&#8217;ve detailed <a href="/blog/2012/02/going-freelance/">why</a> and <a href="/blog/2012/05/my-freelance-lifestyle/">how</a> before, so I&#8217;ll let you read those in your own time if you havent. Now though, I want to go over my experience in the last year, what I&#8217;ve learnt, what I would do better if I had another chance, and also what my plans are.</p>

<h2>The Work</h2>

<p>I&#8217;ve learnt a lot about code in the last year. Not just bullshit &#8216;look at this great plugin&#8217; crap, but real code that makes my clients money.</p>

<p>I structure my code in a set way, make it as object-orientated as I can, and comment well. Starting a complete new build every few weeks means I need to code as best I can. That said, I don&#8217;t do it perfectly. I just don&#8217;t have time to follow the latest &amp; greatest method some designer thinks I should follow.</p>

<p>My side projects like Kodery and a couple templates I use for daily work have fallen by the wayside. They get updated, I use them but I&#8217;m yet to combine the various improvements and add to the <a href="http://github.com/pauladamdavis">GitHub</a> repo.</p>

<h2>Getting Work</h2>

<p>All of my work is for design agencies and full-service agencies who need a little more specialised skill. This has been the same for a year and I intend on keeping it this way. I can manage teams of people I have close contact with and have done this in a past full-time job, not managing a clients expectations and keeping on the right side of them. (Aside, my first hire when I start my agency is someone who <em>is</em> good at client management.)</p>

<p>I was unfairly lucky when I started freelancing. I still had good press from getting <a href="/blog/2011/11/young-developer-of-the-year/">that award</a>. The attention slowly disappeared and I had the same struggle as everyone else, albeit with a decent head start.</p>

<p>Around June, 3 months in, I had a steady stream of work coming in, some jobs which spanned a couple of weeks, most a few days. Nowadays, I tend to work on projects spanning a month or so, sometimes a week or so. It&#8217;s rare I do a tiny job now.</p>

<p>I like it this way. Longer jobs mean less time switching my brain around, less admin, less talking to clients about possible work, and therefore, more money because I&#8217;m working, not pitching. A year in, I&#8217;d say my monthly income is around 50% higher than it was last year, almost all due to having longer projects.</p>

<p>Now, I don&#8217;t need to find work. It finds me. I like to think that&#8217;s a combination of good work, good reputation, casual attitude, and consistent recommendations from existing clients.</p>

<h2>Scheduling &amp; Quoting</h2>

<p>I&#8217;ve said this a lot in recent months; quoting is hard, <strong>it does get easier</strong>. Make no mistake, it does take time, but it does get easier. I&#8217;m still getting better at it now. I&#8217;m still not great. I tend to work a day or more over my quoted time on projects, but that&#8217;s fine. It&#8217;s my fault for under-quoting on my time. I learn from it still. I was far worse to begin with, like all new freelancers. My 3 years agency experience somewhat helped, but not that much. I know my estimates there a little low there too.</p>

<h2>Scepticism</h2>

<p>I hinted at this earlier, but I am very sceptical about adopting the latest &amp; greatest techniques. I don&#8217;t have time to piss around implementing whatever the cool kids are doing, then the fallback to it for every other browser. I need things to work first time, solidly across many browsers. Don&#8217;t get me wrong, I do use many features of CSS3 and parts of HTML5, but those are (more often than not) visual, and fallbacks are easy to provide. Implementing new units like <code>rem</code> and <code>vw</code> require a few fallbacks for most browsers. I just don&#8217;t want the hassle.</p>

<p>I am also sceptical about outsourcing stuff now. I&#8217;ve done this a couple of times and always had bad experiences, loosing a long-term client in one case. The lesson here is don&#8217;t guess that someone who apparently knows their stuff actually knows their stuff. Of course, no names and no specifics here. I may be a cunt sometimes, but y&#8217;know, I&#8217;m not that much of a cunt.</p>

<p>In the interests of disclosure, I have also been on the other side of the outsourcing fence. It wasn&#8217;t pretty, none of it sits in my portfolio and I found the whole experience tougher than working with my regular agency clients.</p>

<h2>Cashflow</h2>

<p>Doing slightly longer projects spanning between a couple of weeks and a month means I get paid more, but not as often. I would guess I&#8217;m typical in not having the well-proposed 3 months of cash. I would love to have that, but I started freelancing on a rather bad financial note. I&#8217;m in a little bit of debt from a prior life. I&#8217;m getting better and saving more, but it takes time to save the £8k I&#8217;d need to live comfortably for 3 months.</p>

<h2>Room For Improvement</h2>

<p>I want to improve a lot over the next year, who doesn&#8217;t. I actually have a list, which should be fairly self-explanatory.</p>

<ol>
<li>Get a saving account and fill it to the brim for rainy days</li>
<li>Work more common hours and only work in those hours. Leave procrastinating to out-of-office hours</li>
<li>Move out of my parents house and rent somewhere cool</li>
<li>Save £15k and buy a newer car. (BMW 335i convertible for those who care)</li>
<li>Work on things that provide a passive income</li>
</ol>

<p>Some things on that list require time, some require effort and a change of thinking. I have no idea what will happen with that list, and what order they will happen, or even of any will happen. Time will tell, but without big goals, what do I have to aim for. I have always dreamt big, with an even split of success and failure. I must try though.</p>
]]></content:encoded>
			<wfw:commentRss>http://pauladamdavis.com/blog/2013/03/one-year-in/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Memoirs of a Coder #6</title>
		<link>http://pauladamdavis.com/blog/2013/03/memoirs-of-a-coder-6/</link>
		<comments>http://pauladamdavis.com/blog/2013/03/memoirs-of-a-coder-6/#comments</comments>
		<pubDate>Thu, 21 Mar 2013 18:00:44 +0000</pubDate>
		<dc:creator>pauladamdavis</dc:creator>
				<category><![CDATA[Memoirs of a Coder]]></category>

		<guid isPermaLink="false">http://pauladamdavis.com/?p=1963</guid>
		<description><![CDATA[Having a higher than average day-rate means i&#8217;m generally not asked to do little jobs. I like this. Being a dick about payment terms (like not starting work until a deposit has cleared) doesn&#8217;t hurt business, it means your well positioned in the working relationship, power is balanced, not one-sided. Talking about code and the&#160;<a href="http://pauladamdavis.com/blog/2013/03/memoirs-of-a-coder-6/">Read more</a>]]></description>
				<content:encoded><![CDATA[<ol>
<li>Having a higher than average day-rate means i&#8217;m generally not asked to do little jobs. I like this.</li>
<li>Being a dick about payment terms (like not starting work until a deposit has cleared) doesn&#8217;t hurt business, it means your well positioned in the working relationship, power is <strong>balanced</strong>, not one-sided.</li>
<li>Talking about code and the &#8216;proper&#8217; way of doing things doesn&#8217;t mean you&#8217;re good, it means you&#8217;ve read  a lot and can talk about it well.</li>
<li>I know new freelancers can find it a little tough to get work. A solid stream of work comes in time, don&#8217;t worry. Have your three months of cash stashed away and you&#8217;ll ride out any quiet patches easily.</li>
</ol>
]]></content:encoded>
			<wfw:commentRss>http://pauladamdavis.com/blog/2013/03/memoirs-of-a-coder-6/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Dev Drive &#8211; Gauging Interest</title>
		<link>http://pauladamdavis.com/blog/2013/03/dev-drive-gauging-interest/</link>
		<comments>http://pauladamdavis.com/blog/2013/03/dev-drive-gauging-interest/#comments</comments>
		<pubDate>Mon, 18 Mar 2013 08:45:18 +0000</pubDate>
		<dc:creator>pauladamdavis</dc:creator>
				<category><![CDATA[Dev Drive]]></category>

		<guid isPermaLink="false">http://pauladamdavis.com/?p=1943</guid>
		<description><![CDATA[For a long time, I&#8217;ve wanted to drive around the UK with a load of like-minded people. I want to drive for the pleasure of driving on good roads, not race around. I want designers, developers, UXers, IAers, copywriters, nerds, and people with other regular jobs to join me for the journey. The Route Here&#8217;s&#160;<a href="http://pauladamdavis.com/blog/2013/03/dev-drive-gauging-interest/">Read more</a>]]></description>
				<content:encoded><![CDATA[<p>For a long time, I&#8217;ve wanted to drive around the UK with a load of like-minded people. I want to drive for the pleasure of driving on good roads, not race around.</p>

<p>I want designers, developers, UXers, IAers, copywriters, nerds, and people with other regular jobs to join me for the journey.</p>

<h2>The Route</h2>

<p>Here&#8217;s the alpha route. It&#8217;s around <strong><em>2000</em></strong> miles. (The green points on don&#8217;t have any real meaning.) I want suggestions on <em>great</em> roads we <strong>need</strong> to drive down and points of interest along the way.</p>

<p><a href="http://bit.ly/16CWMpr"><img src="http://pauladamdavis.com/wp-content/uploads/2013/03/map.jpg" alt="image" /></a></p>

<h2>How It&#8217;ll Work</h2>

<p>I imagine there&#8217;s be more people signing up in groups for one car, so that&#8217;s all fine. But for those who want to drive but have no one to come with (either as a driver of co-pilot/passenger), i&#8217;ll make a list of each so you can pair up. Drivers will of-course have the right to refuse and limit the number of people in their car. I myself will have one passenger.</p>

<p>There will be no entrance fee, no money will be given to me for this whatsoever. I would like to list a few things for passengers though.</p>

<ul>
<li>Pay your petrol share for every leg of the journey you make, to whoever drives you, or at least buy them dinner. You can agree the details between you.</li>
<li>Don&#8217;t be a bad passenger. No one likes a sticky person.</li>
</ul>

<h2>Joining &amp; Leaving</h2>

<p>I can fully appreciate a few people might not want to do this from start to finish. I have no problems with people wanting to join further up the country, we just need to know before we leave each morning so we know where to stop off for lunch for you to join us. Or you can meet up wherever we end up staying that night and start the next day. We will be tweeting the whole thing.</p>

<h2>Costs &amp; Timings</h2>

<p>In my car, a fairly typical 2.0 petrol, Google says it&#8217;ll cost about <strong>£460</strong>. And food, hotels, beer and daily snacks, I estimate this will cost about <strong>£1000</strong> over all, and would ideally take a week.</p>

<p>I know this will not be the cheapest of weeks, but I really hope it&#8217;ll be one to remember as a week of camaraderie, laughs, good sights and great roads.</p>

<p>I reckon this will be a lot of fun in the summer. So maybe <strong>mid July</strong> would be ideal. That works well for me at least.</p>

<h2>Communication</h2>

<p>The whole thing will be posted on Twitter for anyone who wants to join us, either digitally or actually come along for the ride.</p>

<p>For drivers talking to each other , I thing it would be amazing if each driver had a CB radio, so if someone breaks down, we can all stop and help. Whatever happens, driving keeping in contact would be rather crucial. A basic CB radio can be <a href="http://www.4x4cb.com/public/menu.cfm">purchased quite cheaply</a>. They are <a href="http://www.4x4cb.com/public/page.cfm?CatID=653">UK road-legal</a> too. I&#8217;m open to advice here. Comment please. :)</p>

<h2>Interested?</h2>

<p>Pop me an email to <a href="mailto:pauladamdavis@gmail.com?subject=Dev&nbsp;Drive">pauladamdavis@gmail.com</a> with the subject &#8216;Dev Drive&#8217;. Just tell me where your from, whether you&#8217;re a driver or passenger.</p>

<p>I may have forgotten some crucial details, so please chime in with the comments and let me know. I want to flesh-out the idea before I solidly set the date, route and stop-offs.</p>

<hr />

<h3>Update 1 &#8211; 17:48 &#8211; 18th March 2013</h3>

<p>Stephen Fulljames has suggested a <a href="http://goo.gl/maps/ppJtO">route through Wales</a></p>
]]></content:encoded>
			<wfw:commentRss>http://pauladamdavis.com/blog/2013/03/dev-drive-gauging-interest/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Freelance Business</title>
		<link>http://pauladamdavis.com/blog/2013/02/freelance-business/</link>
		<comments>http://pauladamdavis.com/blog/2013/02/freelance-business/#comments</comments>
		<pubDate>Tue, 26 Feb 2013 23:01:59 +0000</pubDate>
		<dc:creator>pauladamdavis</dc:creator>
				<category><![CDATA[Business]]></category>

		<guid isPermaLink="false">http://pauladamdavis.com/?p=1934</guid>
		<description><![CDATA[In this post, I&#8217;ll detail how I work with people from first contact to the project going live and what happens after that. Disclaimer: This post details how I work as a freelancer. There may be better ways, mine may be the wrong way, but ti works for me as a full-time freelancer and has&#160;<a href="http://pauladamdavis.com/blog/2013/02/freelance-business/">Read more</a>]]></description>
				<content:encoded><![CDATA[<p>In this post, I&#8217;ll detail how I work with people from first contact to the project going live and what happens after that.</p>

<p>Disclaimer: This post details how <em>I</em> work as a freelancer. There <em>may</em> be better ways, mine <em>may</em> be the wrong way, but ti works for me as a full-time freelancer and has done for well over a year. Now…</p>

<h2>First Contact</h2>

<p>I&#8217;m very lucky that I never have to actively look for work, though I sometimes reach out to cool people &amp; agencies, but inly to get my foot in the door. I have made good connection with a lot of people over the years of going to conferences, pads clients recommend me a lot, and add my clients are generally design agencies, their friends are design agencies too, so the pool of people who might want to work with me is ever-growing. But like I say. I have been lucky.</p>

<p>When I get that first email with an introduction, I typically read it over a few times and try to work out if it&#8217;s a blanket email sent to many people or a personal one to me, then I try &amp; work out if they&#8217;re just fishing for prices.</p>

<p>If all is well, I take a look at any links or assets they may have sent then briefly reply, mentioning what they have said &amp; shown to show them I did actually read what they said. I include my rate (even if they don&#8217;t ask, £1600 a week scares lots of people away), availability, any thoughts I have about their project.</p>

<p>I&#8217;m try to always fit in a little joke or smiley face somewhere. This breaks the ice a bit and tells them I&#8217;m very casual about it all. I know they&#8217;re spending a lot of money with me, but it&#8217;s nice to know I&#8217;m not a corporate stooge about it all. But the casualness needs to be kept at a maintainable level. You may need to be an arse at some point. More on that later.</p>

<p>If they don&#8217;t seem that good and wrote a personal email, I reply with something like:</p>

<blockquote>
  <p>Hello Name,</p>
  
  <p>Thanks for getting in touch.</p>
  
  <p>After reading your message and doing some thinking, I&#8217;m not sure I am the right freelancer for you.
  I&#8217;m not the guy you need to build a Facebook clone for £50, even if the exposure if great.</p>
  
  <p>All the best.
  -Paul</p>
</blockquote>

<p>If they sent a blanket email with no reference to who I am at all, I just delete it. If I wasn&#8217;t worth their time to at leaf put my name on it, they&#8217;re not worth my time in replying, no matter who it is.</p>

<h2>Agreements</h2>

<p>When the email chain has increased in size a bit and the ideas &amp; rates are flowing freely between us, I ask them to check and agree to my <a href="http://codebymonkey.com/terms">terms</a> in writing. An email is suffice. This just makes sure they know how I work, and even if they don&#8217;t read them but agree, you have them agree in writing; protecting yourself. If they don&#8217;t agree, you can either kill off the relationship or adjust the terms to fit the project.</p>

<p>Sometimes I need to sign an NDA (Non-disclosure agreement) which generally means me sending a letter with a few duplicates of the NDA to the companies legal team.</p>

<p>Don&#8217;t see the words NDA and cower in fear. More often than not, it&#8217;s a company policy, not them distrusting you.</p>

<h2>Spec</h2>

<p>Quote often, I go to see the client at their office, this helps me get a sense of scale to how they work. Seeing them face-to-face and meeting the team is great too. When we have that meeting, we generally go over the project again ion person as things may have changed from when we first chatted in email. At this point, I would get a full spec and designs.</p>

<p>When I return to the office, I would go over the files and write my own technical specification and then go through that and write a full quote for the client with a timeline and cost. I would then email this to the client. Quote often, I get a one work reply either saying &#8220;Awesome!&#8221; or &#8220;Shit.&#8221;. Depending how that goes, I go onto invoicing.</p>

<h2>Invoicing</h2>

<p>I generally work on a two-part payment. Before the project starts, even before I open a code editor, I fire off an invoice for 50% of the total, this should be paid before I start any work. Some clients are awesome and pay the our they get the invoice, some are not so awesome and insist on having a 30 day buffer. This scares me, says they don&#8217;t have the cash flowing around. Upon insisting I won&#8217;t start work until I see that cash though, shows them I mean business. Insisting <em>usually</em> works.</p>

<p>The build goes on and a tremendous amount of email happens between us through the project. Then comes the nit-picking. bug-fixing stage, the it goes live.</p>

<p>After the go-live, I send the second 50% deposit. I always have control over the hosting environment, so if they don;t pay the second invoice in a reasonable time, I can always close the site. This hasn&#8217;t happened yet, but if the client even needs a kick in the arse to pay me, this will work.</p>

<p>Even if the clients client has not paid them and therefore not paid you, don&#8217;t be afraid to be a dick about payment. <em>Your</em> client has hired you, not <em>their</em> client. They knew before the hired you how much it would cost, they should have that cash in their account them they agree to hire you.</p>

<p>Sometimes the work spans are long enough time that invoicing in two parts isn&#8217;t really practical, which I can understand. Or it may be that you&#8217;re working on-site and nobody is entirely sure how long you&#8217;ll be there. In this situation, I would invoice weekly, ideally with the payment on receipt mentioned earlier.</p>

<p>If the client goes silent on you, do you best to get in con act with them. Tell them you&#8217;re going to et in contact with others who work with them, ask those others if they have has trouble contacting them. The prospect of being made to look like an idiot will scare people into contacting you or just silently paying you. Keep professional though, you don&#8217;t want to give them any reason to ignore you further. I for one hate abusive emails. I just delete them as soon as I see anything bad in there.</p>

<h2>Bad clients</h2>

<p>Sometimes the working relationship can go sour. Here&#8217;s a list of reasons I would call a client <em>bad</em>:</p>

<ul>
<li>They keep slipping in little features that are significantly add to the build time</li>
<li>The spec wasn&#8217;t as tight as you thought and they keep changing their mind</li>
<li>Cultural or political situations have changed and working with them goes against your beliefs</li>
<li>They demand more of your time than you can give</li>
<li>They treat you as an on-site employee</li>
</ul>

<p>If any of the above happen, I finish the feature I&#8217;m working on (if I can) and confront them highlighting the issue. There may be chance you can fix the issue and continue work. If not, leaving the project at that point may be the best thing to do. I&#8217;ll leave the decision as to whether to bill up to that point or not up to you.</p>

<p>I have been in this situation before and personally felt invoicing for three days work after dropping them into a pile of shit (needing to find another dev willing to take the build on, mid way through) a bad choice, so I didn&#8217;t.</p>

<p>Some clients will take being fired rather badly. Deal with it as best you can, but remain graceful. You&#8217;re stopping the working relationship for solid reasons, <strong>stick to them</strong>.</p>

<p>Some clients will take being fired better than other and have a backup plan. The nice people will be gracious and ask for help in finding someone to help where you left off. I would try to help them out as best as I can. Don&#8217;t do any more work though, unless you figure something out like a new spec, in which case the working relationship is back on.</p>

<h2>After</h2>

<p>With some projects, the email I send thanking them for paying the final invoice will be the last communication between us. But most of the projects I&#8217;ve been involved with, the last email usually involves an introduction to the next project with them, see my introduction.</p>

<p>If I&#8217;m proud of the project and it looks great, I ask if I can feature the project in my portfolio. If they say yes, I them go and do this and tweet about it.</p>

<p>The cycle happens again.</p>
]]></content:encoded>
			<wfw:commentRss>http://pauladamdavis.com/blog/2013/02/freelance-business/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>
