In my recent talk to Big Data London I said that memcached can’t count. Turns out that’s not really true, and the problem lies somewhere else.
Here’s the original evidence memcached has counting issues, using Python & pylibmc:
In : cache.set('wibble', 0)
In : cache.get('wibble')
In : cache.decr('wibble', 1)
In : cache.incr('wibble', 1)
In : cache.incr('wibble', -1)
Incrementing by -1 has resulted in memcached incrementing by 2^32-1 – a classic signed/unsigned conversion problem.
But hang on – according to the memcached spec, incr takes unsigned 64bit integers – and it’s an error to send a signed number.
Sure enough, using the ASCII protocol (with memcached 1.4.9):
VALUE wibble 0 1
incr wibble -1
CLIENT_ERROR invalid numeric delta argument
It seems memcached can count after all, or at least refuse to do operations it might get wrong. It’s another question why memcached won’t deal with signed numbers…
So where’s the weird behaviour above coming from? It’s a couple of bugs in pylibmc – bug 74 and bug 73.
The good news? Both bugs are now fixed in the latest github version, so very soon memcached and pylibmc will be able to count. Three cheers – hooray, hooray!
Yesterday I went to a User Experience Sketching session hosted by Devin Hunt from Lyst. I had no idea what UX Sketching was about, but it sounded interesting and some people I follow on Lanyrd were going, so what the heck.
If you haven’t heard of UX Sketching either, it turns out to be a way to see inside the minds of your users and experience your site/product through their eyes. Even better, it’s really simple:
- Find a user
- Ask them to quickly sketch the page/feature/item of interest
- Look at what they draw – and what they don’t draw
- Repeat until you’ve got a bunch of data points
By getting the user to draw from memory, you find out what’s most important/salient to them. One example from Devin – on Lyst they had a “Love” feature. Click metrics said people were clicking on it – but it never showed up in sketches. Turns out when they dropped the feature, no-one noticed – it was only being clicked because it was there, not because it was useful.
So when is this tool useful? Obviously, you have to have some users who have some familiarity with the site/feature. It’s no use if they haven’t seen it – so it can’t start a design process for a new feature.
What it can do is tell you where your design is working, or where it’s not. Perhaps you want reviews to be central to a buying page, but users aren’t sketching them. That could trigger a round of design work, mockups, A/B testing etc to see what raises the awareness. Maybe you’re trying to figure out where on a page things should go – looking at where users sketch them will tell you where they intuitively think they should go.
I think seeing through others eyes is one of the hardest things to do in design, so this seems like a great quick, easy way to do it.
Now off to get some users sketching…
I spoke at the London Big Data meetup a couple of weeks ago about counting, and how difficult it is if you want to count things very very fast. My slides from this are now up here and on Slideshare.
More on the joy of counting soon, including why Memcached can’t count.