PostgreSQL count_estimate() function for large tables and views

I once found all admin pages of a web app were taking 100ms longer than they should due to a count query on a huge table. I couldn’t remove the feature but as admins only needed a rough idea of how many rows there were I could substitute an estimate 🔮

Rails surprisingly executes DELETE on build_association

It was all the seemingly innocuous build_#{name}

Searching Discontinuous Dates in Elasticsearch using Lucene Expression Script

Elasticsearch is powerful, but very different to SQL and its scripting capabilities are limited in cloud hosting environments. This makes it appear impossible to use for certain sum of script and threshold queries—for example on discontinuous date ranges—but with some clever query structuring this can be done.

Designing a Font with Code

Years ago I started using a very simple SG made up of lines as my "logo". I evolved this over time and thought it would be even better if I had a whole font in the style of it. So here's how I created my personal font with code and refined my logo in the process.

why Ruby Symbol​#to_proc works, and more.()

Lets embark on a _why themed quest through Ruby's magical Symbol#to_proc. We will slay syntax dragons by deflating politicians, battle understanding with chrysanthemums, and journey further to cook up some funky fresh fish.

Designing User Interfaces for Hemispatial Neglect

Hemispatial neglect, also known as unilateral / spatial / side neglect, is a neuropsychological condition causing a lack of awareness and attention to one side of the body. This may make the patient act oblivious to one side of space, such as reading only one side of text on a website. I could find no information on design or UX for hemispatial neglect, so the ideas in this post could be breaking new ground.

Designing to Aid Reading with Dyslexia

For people with dyslexia reading web pages can be difficult, but there are things designers can do to make it easier. They are quite simple changes, but may require sacrificing some design freedom.

Designing for Color not just Blindness

Designing for colorblindness is important as 8% of people have it. But there are many other reasons color might be hard to see so good design should be baked in from the start. A colorblind "mode" shouldn't be tacked on as an afterthought. There are several tools and techniques to help make designs better for everyone, colorblind included.

TIX Clock WIFI Hack

Years ago I got given a TIX clock. I like its stylish design and interesting way of representing time. Like a regular digital clock it tells time in hours and minutes, each broken up into tens and units. However instead of using characters it uses the corresponding number of lit up dots. To read the time you simply count the dots. It's slower to read, but a good conversation starter.

Bootstrap Web Content Accessibility

I've been working on a University of Hertfordshire project which aims to be used by people with a range of disabilities. There are a set of standards for this called the Web Content Accessibility Guidelines (WCAG). Version 1 was introduced in 1999 and version 2 in 2008. As these guidelines are a W3C standard and have been around for a long time I hope designers are aware of and try to follow them whenever possible.

CSS Animation Using the Cicada Principle

I wanted to add some interest to my homepage with movement. I decided to use only CSS as JavaScript seemed like overkill for a design flare. But how to create interesting animation that can seamlessly loop forever within the constraints of CSS. The problem is that CSS is a declarative styling language with no randomness. Usually it is randomness that stops animations from looking repetitive.

How to Format a USB Stick or SD card with UDF Filesystem on OS X and its Advantages

My internal SSD was getting a bit full so I decided to offload some media onto large SD cards as my MacBook has a built in reader, SD cards are more portable than hard drives and less likely to snap off than a USB stick. I had a problem, however, when I tried to put a bigger than 4GB film onto the card as FAT32 doesn't support larger files. Obviously I'd need to use a different filesystem format, but what? I looked into the common options most often mentioned:

Case Insensitive Usernames with PostgreSQL citext

It's polite to refer to people by capitalising the first letter of their name (Joe Blogs). I think web apps should allow capitals in their usernames (JoeBlogs) too.

Enhancing Web UX Design Consistency with Sniffux

Which sides should I put my Cancel and OK buttons on? This is a question of the honourable subject, USER EXPERIENCE. Read on to find out that the answer is neither and both!

Nobody Knows Why

A tribute to Why The Lucky Stiff.

3D Print Show London

Late last week I heard about a 3D printer show in London and quickly bought a ticket. Today I went and it was an amazing experience.