Curiouser and curiouser

Here’s an excellent Nature article by Ahmed Zewail. Extract:

Some believe that more can be achieved through tightly managed research — as if we can predict the future. I believe this is an unfortunate misconception that affects and infects research funding.

I’ve always liked Einstein’s comment that “if we knew what we were doing, it wouldn’t be called research”.

Veni, vidi, wiki?

There’s a good post on the Economist blog about the WikiLeaks affair:

My gripe against Mr Assange is that he takes advantage of the protections of liberal democracies, but refuses to submit himself to them. If he wants to use the libel protections guaranteed by New York State, then he should live in New York, and commit himself to all of the safety and consequences of America’s constitution. If he wants to use Sweden’s whistleblower laws, then he should return to Sweden and let its justice system take its course.

It’s a bit of an over-simplification: if you’re an an anarchist, where should you live, since we no longer have Australia set aside for that purpose? But it’s basically a good point.

This makes me think of the observations by Dawkins et al that those who will flatly deny the validity of the scientific process when it challenges their view of the creation of the earth, or the efficacy of alternative medicines, will then happily get on a plane to fly home, where every minute of their very lives depend on hundreds of years of that same process.

This is the point at which, by the way, if you haven’t seen it, you should watch Louis CK’s comments on ‘Everything’s Amazing and Nobody’s Happy’:

Anyway, back to WikiLeaks: The other thing that bugs me is that the feeling that some of those who revel most enthusiastically in the WikiLeaks revelations would be those who would protest most loudly if their own privacy were compromised.

Just as ‘superstition’ is often the name we use for somebody else’s religion – and they for ours – so ‘freedom of information’ is often the name we give to invasion of someone else’s privacy, and, one day, might be used for invasion of ours.

Be careful what you wish for… You may get it!

Update: I should perhaps emphasise that I’m an advocate of freedom of information in general! But we’re starting to hear stories which remind me of what we’ve seen with the Human Rights Act in the past: the more such good intentions get formalised into legal structures, the more people come to think of them as unassailable rights in all circumstances, and the more they can be misused by those wanting to make a quick buck or write a sensational story.

Brand confusion

An elderly colleague turned to me at lunch yesterday.

“Tell me”, he said. “you’re a computer expert… All of these leaks must mean that nobody in government will be able to use email ever again. Just what are the political motivations of an organisation like Wikipedia?”

Tweetiquette?

Here’s a question for the socially-sensitive internet denizens of today:

Is it bad form to ask people to retweet your post?

I see plenty of tweets with ‘Please RT!’ on the end, and it seems… well… a bit off to me, but what’s more, it implies that the content doesn’t have sufficient merit of its own to inspire you to do this…

After all, we wouldn’t send out emails saying “Please tell all your eligible friends how good-looking I am!” or “Please vote for my brother’s political party!”. At least, not if we’re English.

So where should we draw the line? At what point is it impolite to tell people that they should really think the same as you do, and that they should tell their friends to do the same?

Or did I just spend too much of my youth reading Debrett?

Feel free to add your thoughts in the comments!

Traditional grid system

One of the monthly invoices I get by email (from those nice people at VoIPtalk) starts with:

Please view this with a fixed-width font.

And indeed, all the columns line up much more tidily if you do that, but come on, chaps, times have moved on! Even people like me are no longer using Pine to read their email, and you can bet that the vast majority of your customers won’t even know how to set their email reader into a fixed-width font.

Ironically, if you want people to view your message in Courier nowadays, you probably need to send it as HTML!

Against the grain

Just discovered Miguel Fernandez’s site, Gegen den Strich, which, if my decidedly rusty German is to be trusted, means ‘Against the Grain’.

Miguel is a cartoonist, and, though the site is in German, a fair selection of them will work across linguistic boundaries. I like these:

This is one of his, but doesn’t appear to be on his site at present:

Thanks to Nick van Someren for the original link.

Not to be mist

There have been a couple of beautiful autumnal mornings in Newnham recently.

More misty pics here.

Take that, Powerpoint!

Dennis Dutton’s TED talk on an evolutionary theory of beauty is very interesting in its own right, but it’s also illustrated by Andrew Park in a phenomenally clever way.

This is about as far from slides full of bullet points as you can get. Wonderful stuff. Worth watching full-screen…

Unfair criticism

Friends and family sometimes tease me because of their belief that I can’t cook.  

This is of course ridiculous.

I have a 100% success rate on all recipes which begin ‘Remove outer packaging and pierce film lid’…

Flushing your DNS cache

OK – a really geeky little tutorial, this one. If you’ve never felt the urge to flush your DNS cache, then don’t worry, that’s quite normal, many people live long and happy lives without ever doing so, and you should feel free to ignore this post and go about your other business.

A little bit of background…

DNS lookups, as many of my readers will be aware, are cached. The whole DNS system would crumble and fall if, whenever your PC needed to look up statusq.org, say, it had to go back to the domain’s name server to discover that the name corresponded to the IP address 74.55.156.82. It would need to do before it could even start to get anything from the server, so every connection would also be painfully slow. To avoid this, the information, once you’ve asked for it the first time, is probably cached by your browser, and your machine, and, if you’re at work, your company’s DNS server, and their ISP’s DNS server… and it’s only if none of those know the answer that it will go back to the statusq.org domain’s official name server – GoDaddy, in this case – to find out what’s what.

Of course, all machines need to do that from time to time, anyway, because the information may change and their copy may be out of date. Each entry in the DNS system therefore can be given a TTL – a ‘Time To Live’ – which is guidance on how frequently the cached information should be flushed away and re-fetched from the source.

On Godaddy, this defaults to one hour – really rather a short period, and since they’re the largest DNS registrar, this probably causes a lot of unnecessary traffic on the net as a whole. If you’re confident that your server is going to stay on the same IP address for a good long time, you should set your TTLs to something more substantial – perhaps a day, or even a week. This will help to distribute the load on the network, reduce the likelihood of failed connections, and, on average, speed up interactions with your server. The reason people don’t regularly set their TTL to something long is that, when you do need to change the mapping, perhaps because your server has died and you’ve had to move to a new machine, the old values may hang around in everybody’s caches for quite a while, and that can be a nuisance.

It’s useful to think about this when making DNS changes, because you, at least, will want to check fairly swiftly that the new values work OK. There’s nothing worse than making a typo in the IP address of an entry with a long TTL, and having all of your customers going to somebody else’s site for a week.

So, if you know you’re going to be making changes in the near future, shorten the TTL on your entries a few days in advance. Machines picking up the old value will then know to treat it as more temporary. You can lengthen the TTLs again once you know everything is happy.

Secondly, just before you make the change, try to avoid using the old address, for example by pointing your browser at it. This goes for new domains, too – the domain provider will probably set the DNS entry to point at some temporary page initially – and if you try out your shiny new domain name immediately, you’ll then have to wait a couple of hours before you can access your real server that way. Make the DNS change immediately, before your machine has ever looked it up and so put it in it cache and any intervening ones.

Finally, once you’ve made a change, you may be able to encourage your machines to use the new value more quickly by flushing their local caches. This won’t help so much if they are retrieving it via an ISP’s caching proxy, for example, but it’s worth a try.

Here’s how you can use the command line to flush the cache on a few different platforms. Please feel free to add any others in the comments:

On recent versions of Mac OS X:

sudo dscacheutil -flushcache

On older versions of OS X:

sudo lookupd -flushcache

On Windows:

ipconfig /flushdns

On Linux, if your machine is running the ncsd daemon:

sudo /etc/rc.d/init.d/nscd restart

If you’re actually running a DNS server, for example for your organisation’s local network:

On Linux running bind9:

rndc flush

On Linux running bind8:

ndc flush

On Ubuntu/Debian running named:

/etc/init.d/named restart

Know thine email recipient

In an ideal world, you’d create and format your emails, send them off, and the recipient would see just what you meant them to see. Sadly, it’s not an ideal world. For simple messages, obviously, everything works fine, but for more sophisticated emails, it can be less straightforward.

For Mac users, in particular, it’s worth remembering that your recipients may well be using Microsoft Outlook or Outlook Express and so won’t be able to see some of the nice features that Mac users take for granted. A couple of examples:

Attachments in the middle of the email

If you know you’re sending to a Mac user, you can be reasonably sure that their email app will support the standards that allow you to insert and refer to images, documents and other attachments inline as part of the text. Microsoft users, on the other hand, will probably just see these bunched together at the top or bottom of the message. More importantly, if you put any text after them in your message, it may become a text attachment in Outlook. I have seen conversations get very confused when Mac users didn’t realise that PC users had only seen the first half of an email.

Inline PDFs

Since Macs are native speakers of PDF, some graphics apps will naturally output that format and use it, for example, when copying and pasting to other apps. Remember that a PDF, unless it has multiple pages, will embed in an email like any other image on a Mac. On Windows, even if the mail program can display inline images, PDFs will probably appear as attachments, so it’s best not to use them for putting your logo in your signature, for example.

I’m not purely criticising Outlook here; Gmail has some of the same limitations, for example, but Outlook does seem to cause more than its fair share of problems. (See the TNEF issues, for example). Nor am I saying that Apple Mail is perfect – I wish, amongst other things, that it allowed more manipulation of HTML styling. But the Apple Mail/MS Outlook differences are the ones that most people are likely to see most often, so that’s why I’m highlighting them here.

Anyway, Apple users who know they are sending to PC users should therefore probably take advantage of the options under Mail’s ‘Edit > Attachments’ menu, which let you send attachments in a more Windows-friendly way, and force them to be at the end of the message.

If, on the other hand, you’re using a Mac and you know your recipient is also likely to be using a Mac, then you can take advantage of some of these features and, for example, put explanatory paragraphs around your attachments:

But how, other than through your estimate of the recipient’s, or their organisation’s, general level of street cred, can you guess what kind of a mail program they’re using?

There are one or two things that will give you a clue immediately. If they have mysterious ‘J’ characters in their messages, for example, it’s because Outlook uses a somewhat strange, or at least very dated, method of encoding smileys, which seldom displays correctly elsewhere. For ‘J’, read :-).

But you can almost always get a definite answer by asking your mail app to show you the full headers, or perhaps the raw text, of the email message. (On Apple Mail, go to View > Message > Long Headers.)

Most email programs will insert a header named X-Mailer which will identify the source as being, for example, ‘Microsoft Outlook 14.0’, or ‘Apple Mail (2.1081)’.

If a message doesn’t have that header, then it probably didn’t come from a desktop app, and you may get a clue from other headers that it came from Hotmail, GMail, or a mailing list. The iPad Mail app doesn’t add X-Mailer, but it does identify itself in the Mime-Version, so take a look at the other headers too.

In addition to helping you plan complex email messages, I’ve used this in the past to guess whether somebody is using a Mac, Windows or Linux machine before recommending a piece of software that might not work on their platform.

© Copyright Quentin Stafford-Fraser