Two interesting snippets from New Scientist about smell

A tip for the Cellar:

…when Hendrick Schifferstein from Delft University of Technology and colleagues pumped the smell of orange, seawater or peppermint into a club, the revellers partied harder – they danced more, rated their night as more enjoyable, and even thought the music was better.

And at once surprising and not:

Yaara Yeshun and team at the Weizmann Institute found that the imperceptible smell of women’s tears decreases sexual arousal in men.

8 steps to putting your café on the internet

I see two reasons for a local business, such as a café, to have an internet presence – discovery and engagement.

Discovery is easier and is the “classic” reason – it’s to help new customers discover your existence and while traditionally that might mean a website, these days it’s going to be more about appearance on map sites like Google Maps. Engagement is to build a relationship with customers outside of the café so that they will frequent you more regularly / mention you to other new customers.

0. (Buy a domain name and sort out an e-mail account on that domain)

I’m not of the opinion that you need a website for a local service like a café as a website isn’t going to be best at engagement or for discovery. But if you’re going to get one, then get one first because nearly every other service you will sign up for will give you the opportunity to enter an address and an e-mail and you’ll save loads of time if you’ve got these sorted already. Just add the simplest page with contact details (including address) and opening times and worry about anything flashier later.

1. Get yourself listed on map services

So that people using them on mobile will be able to see you, and be directed to you if they search for “coffee”. Start with Google Maps, then Apple Maps (you’ll need an iPhone), then Bing Maps. This is approximately in ascending order of difficulty as well – Google is dead easy, Bing is cryptic.

2. Consider TripAdvisor listing

The TripAdvisor app has a great functionality for restaurants “near me now”. If food is a strong point of yours, consider getting listed.

3. Get yourself on any vertical/specialist directories.

For example, if you offer free Wi-Fi then look for websites that list Wi-Fi locations and get yourself listed. (A word of warning, it shouldn’t cost more than a few quid to get on these).

Are you suitable for services like Just Eat?

4. Decide how you’re going to engage with customers outside the café

This is quite critical, because it’s not worth doing anything about engagement if you don’t think you’ve got anything to say and you’re not going to bother saying it. It can be a simple notification about the “sandwich of the day”, or you could do internet-only offers (free upgrade to large if you say today’s password), or first person to answer a trivia question in-store gets a free drink. Be creative!

5. Get Twitter and Facebook accounts

You can keep your work down by linking these accounts – and I prefer setting Twitter to post to Facebook because you can use services like Twuffer to set up Tweets to come out at certain times. If you’re going to post more than 3 times a day, it might be worth keeping them separate though as Twitter users expect more traffic than Facebook.

6. Publicise Twitter & Facebook on site

If you’ve got these accounts, the people you need to start following you are those who have been in at least once – not friends and family scattered across the country! Entice customers by hinting at what you may be posting (offers? events? local news? jokes?)

7. Respond to incoming messages through Twitter / Facebook

Finally, if you do get a following, remember to politely respond to anything they say to you.

8. Build a website – keep an eye on mobile functionality

Finally, build a website! Make sure that it’s going to look good on a mobile screen as users coming from the mapping services are likely to be mobile users. Ensure opening times, location and contact number are prominently displayed. If you’re putting a menu up, remember to keep it up to date or label it “sample menu”. If you’re using Twitter you could put your latest tweets up – although it will look worse if you’ve got a Twitter feed and the latest tweet was months ago…

Storing arbitrary key/value pairs (like hashtable or dictionary) in Azure table storage

Azure table storage allows you to store different data structures in the same table, but the standard routines for getting data in and out require you to know that structure at compile time – as you have to define the entity (class) to be persisted.

There are some very clever implementations that use the dynamic object features of C# to create objects with run-time defined properties. But what if you just want to store “some additional data” in key/value pairs but you don’t really need them to be properties on an object? There’s nothing out of the box for that, but you can override that by altering the Read/WriteEntity methods on TableEntity.

Here’s a naive implementation (it assumes string data, doesn’t limit number of data items, etc.)

public class TestEntity : TableEntity {

	public TestEntity(string a, string b) {
		PartitionKey = a;
		RowKey = b;
		DataItems = new Dictionary<string, string>();
		DataItems.Add("foo", "bar");
		DataItems.Add("Jacob", "Xander");
	}

	public Dictionary<string, string> DataItems { get; set; }

	public override IDictionary<string, EntityProperty> WriteEntity(OperationContext operationContext) {
		var results = base.WriteEntity(operationContext);
		foreach (var item in DataItems) {
			results.Add("D_" + item.Key, new EntityProperty(item.Value));
		}
		return results;
	}

	public override void ReadEntity(IDictionary<string, EntityProperty> properties, OperationContext operationContext) {
		DataItems = new Dictionary<string, string>();

		foreach (var item in properties) {
			if (item.Key == "Timestamp") {
				Timestamp = item.Value.DateTimeOffsetValue.Value;
			} else if (item.Key == "RowKey") {
				RowKey = item.Value.StringValue;
			} else if (item.Key == "PartitionKey") {
				PartitionKey = item.Value.StringValue;
			} else if (item.Key.StartsWith("D_")) {
				string realKey = item.Key.Substring(2);
				ItemData[realKey] = item.Value.StringValue;
			}
		}
	}
}

First key thing to remember – Azure table storage can only store a total of 255 key/value pairs – or 252 custom ones once you’ve taken PartitionKey, etc. into account.

I’d welcome any comments, improvements, or just drop me a note if you’ve used this in your own project – thanks!

It lives!

Many years after the old home-brewed blog died I’ve caved in and installed WordPress. Luckily I can import my old posts from my interim BlogSpot (what was I thinking?) account but there may be a few errors, it especially doesn’t seem to like the XML that I’d added on some posts and it’ll take me a little while to fix this.

Skylon, London – 23 June 2012

With Jo Shock.

Lovely location – really huge panoramic window views over the Thames to Embankment. The day was a bit grey but the Thames was roiling after heavy rainfall.

Got there 30 minutes before Jo due to timing mishap – had a Vesper and a Skylon’s Fifth. They were quite nice, not amazing. Jo had a red fruit Bellini.

Amuse bouche: Chicken profiterole and blue cheese mousse on a poppadum.


Starter: I had scallops with black pudding with confit granny smiths and roast apple pureep. Scallops were perfectly cooked and the black pudding was so soft it melted. Jo had gazpacho soup (which I didn’t try).

Main: I had ballotine of chicken with foie gras in a … sauce with some sort of grain. Jo had fish with vegetables and orgasmic aubergine purée.

Palate cleanser: Lemongrass and basil granite. Worked very well.

Dessert: I have strawberry things arranged like a plant and Jo had pear things in a pear shaped sugar candy cage covered in chocolate.

6 cheeses including one that was matured in wine. I had a sweet wine taster and Jo had coffee with petite fours.

Getting “track” attribute to validate with w3 validator

So I return to our “unit” tests (which do HTML validation through a locally installed w3 validator service, ssh, it’s useful if not fast) and I find that loads of stuff isn’t validating any more. One of our custom bits of JavaScript has been responsible for liberally splashing a custom “track” attribute over a lot of our links and buttons on so-on.

Dig around the internet and I get to this useful and ancient article on A List Apart about custom DTDs.

Upshot – add this to the beginning of your page when validating – a quick check on Firefox suggests you can’t really have it on your live site. Ho hum.

<!DOCTYPE html PUBLIC
"-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"
[
<!ATTLIST a track CDATA #IMPLIED>
<!ATTLIST input track CDATA #IMPLIED>
]>
<html xmlns="http://www.w3.org/1999/xhtml">

Thoughts on brand loyalty

I’ve spent a lot of time in meetings where we were discussing brand loyalty – various schemes to try and lock users in to our service – to penalise them for leaving. At no point did we discuss any brand loyalty we would get by treating our customers better – for example, not spamming them every week. The companies I’m really connected to are those where I’ve had a good experience with, and I’m rewarded for loyalty – not those who treat me like rubbish and would penalise me if I left.