Latest posts

Easy data URIs in PHP

A data URI can be used to embed files directly in HTML or CSS as base64 encoded strings. Here is a quick PHP function to do just that.

Read more

Mostly default

You might have noticed that the current iteration of my site doesn’t have much in the way of design. In most respects, it is mostly text and mostly default. But choosing to avoid additional code and customization has had a number of benefits, not least in performance and accessibility.

Read more

Bulletproof content management

Building a website with a content management system is hard. An over-enthusiastic client with a WYSIWYG editor and too much experience of Microsoft Word can wreak havoc on your design. Here are a few lessons I have learned about building sites that clients can update, but not break.

Read more

Sass, media queries, and IE8

Mobile first responsive design applies progressive enhancement to layout, using media queries to add complexity only when the screen is large enough to use it. The lack of support for media queries in IE8 can be a problem, but one you can work around with a little bit of Sass.

Read more

Just what is it that you want to do?

Jeremy Keith makes an excellent point about progressive enhancement and properly identifying the core function of a site. It can be easy to get hung up on a single tool (e.g. a camera) and forget about what you actually want to achieve (e.g. an image). Sometimes you just need to take a step back and ask “Just what is it …

Read more

On parenthood

I stumbled across this post by Jeff Atwood on parenthood the other day and it sounded about right to me. It contains the most accurate pie chart I have ever seen. I link to it here mostly for my own amusement.

Read more

The terminal

Here is a really useful list of terminal commands from Craig Hockenberry. For anyone who likes that sort of thing.

Read more

Standard Markdown

Markdown is a great way of writing HTML, but every implementation is slightly different. But perhaps not any more. CommonMark aims to prepare a definite Markdown syntax that can be used anywhere. Now Markdown is being used everywhere from README files to content management systems, this can only be a good thing.

Read more

Writing JavaScript for WordPress

When you are writing JavaScript for a WordPress site, it is tempting to shove script elements straight into the header. However, you can avoid a lot of problems by enqueueing scripts properly. This way, you can always be sure your code will load in the right order and without duplicating dependencies.

Read more

Is it safe?

Naming collisions and missing dependencies are common issues with JavaScript on the web. However, with a little care, you can write code that anticipates and works around them. Simply checking something is safe to use before trying to use it can save you a headache and keep your site up and running.

Read more

If at first you don’t succeed, give up

Recursion is a useful programming technique, but it does risk creating an infinite loop. If your code tries doing the same thing again and again, at some point you have to tell it to stop. It should be obvious, but I find it easy to forget.

Read more

Inspiration

Anno Dracula by Kim Newman is a great book, extending Bram Stoker’s world to create something entirely new and thoroughly entertaining. I loved it. It also made me think about how inspiration should work, whether you are writing a novel or designing a website.

Read more

Vertical align anything with just 3 lines of CSS

Here is an excellent tip from Sebastian Ekström on vertical aligning elements with CSS. It even works when you don’t know how tall they are. Thanks to SitePoint Versioning for sharing the link.

Read more

Stay still

On the web, like everywhere else, advertising is a necessary evil. Someone has to pay for stuff and if it’s not you, the chances are it’s a company that wants to sell you something. That’s fine. I accept that. I like to think my intelligent brain filters it all out, but I can’t be sure it doesn’t work on some …

Read more

Give realistic UI feedback on :active

CSS transitions mean that we can animate practically anything, but that doesn’t mean that we should. Frederico Brigante argues that applying them to :active elements makes the UI feel slow and unresponsive. A click feels instant and the UI should reflect that.

Read more

Responsive misconceptions

Responsive web design has become a familiar part of our industry over the last few years. Like it or loathe it, at least we all know what it means. However, that doesn’t mean that the average non-developer or non-designer knows what it means.

Read more

Future imperfect

I don’t update this site very often. I am easily distracted, I don’t have much time, and inspiration can be hard to find. But the real reason is a lack of confidence. I want to write perfect posts, but instead I write nothing at all. Obviously, this is getting me nowhere. At DotYork a few weeks ago, Rachel Shillcock talked …

Read more

Placeholders in form fields are harmful

Katie Sherwin at Nielsen Norman Group has posted a great explanation of why placeholders should never be used as replacements for labels in form fields. Thanks to James Young for sharing the link.

Read more

Windows XP

The death of Windows XP has been a cause of celebration among web developers. At long last, we can create ambitious designs and write lean code for people using modern browsers, right? Not quite.

Read more

WordPress redirect page

Sometimes a page isn’t really a page, it is a container for other pages. This WordPress template automatically redirects to the first child page so any page can be a container without content.

Read more

Archive