Category Archives: Internet

That syncing feeling…

Just setting up a new laptop here, readers, and enabling Address Book’s built-in sync with Google Contacts so as to bring all my contacts over and… aargh! What is this I see? For some reason, the syncing system has decided that the new, empty address book with zero contacts is the up-to-date version, and so has deleted all my contacts from my Google account to make it match! Woe is me!

Now, I was about to write this up as a cautionary tale of cloud computing: if I didn’t have my own local copy of my data here, I might have been in quite a pickle. But then I discovered that the good folks at Google hadn’t allowed data just to vapourise… there’s a handy option in the More Actions menu of Google Contacts, which lets you restore your lost contacts.

Phew!

Wouldn’t you rather be drizzling?

The instructions for this pizza tell me that it’s very important that I drizzle a tablespoon of olive oil on it before putting it in the oven. I’m not aware of having consciously drizzled anything before, but shall do my best.

As I pondered this challenge, it occurred to me that Drizzle sounds like the name of a dot-com company. I don’t know what it would do – weather forecasting, probably – but it just sounds so right. “Hang on, I’ll just upload it to Drizzle…”, or perhaps “My free Drizzle account is about to expire – shall I pay for the full Downpour edition?”

(Well, it turns out, of course, that there is both a Drizzle.com and a Drizzle.org, and you can investigate them for yourself if so inclined.)

It’s only a decade ago that we were pondering the name ‘Google’ with some amusement – it’s a deliberate misspelling of “googol“, in case you wondered, and even that was a bit esoteric.

We Brits sometimes joke about American English that “there is no noun that cannot be verbed”, but it turned out to be very handy that the founders picked quite such an adaptable word and it has passed so easily into daily use. It’s funny, though, to think that they could have picked almost any other random name and we would all now be saying, “Yes, I know about that, I Wiggled you before I came over”.

OK, gotta go… pizza’s ready…

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!

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.

The nightmare that is IE

If you ask any web designer what would constitute their dreams coming true, they will probably say something along the lines of “Internet Explorer vanishing from the face of the earth, never to be seen again”. Web development has for many years consisted of building your beautiful online creation and then polluting it with all kinds of hacks to get around the bugs and quirks in the various versions of IE.

We’ve just run into a nice issue with IE8, where a site running on our intranet will render completely differently from a deployed site running on a public server. The HTML and CSS is identical, it’s just that IE recognises that one is in the intranet zone and, for some completely unfathomable reason, decides that it should therefore be displayed differently.

For any sysadmins who haven’t yet replaced IE on their users’ desktops, this helpful page by Henri Sivonen gives a hint of the problems that you are helping to perpetuate. This is not a rant, it’s a useful guide to what designers have to think about, just to make their pages display properly, because you’re not using Safari, Firefox, Opera or Chrome.

An excerpt:

IE8 has four modes: IE 5.5 quirks mode, IE 7 standards mode, IE 8 almost standards mode and IE 8 standards mode. The choice of mode depends on data from various sources: doctype, a meta element, an HTTP header, periodically downloaded data from Microsoft, the intranet zone, settings made by the user, settings made by an intranet administrator, the mode of the frame parent if any and a UI button togglable by the user. (With other apps that embed the engine, the mode also depends on the embedding application.)

The lucky thing is that IE8 uses doctype sniffing roughly like other browsers if:

  • There is no X-UA-Compatible HTTP header set by the author.
  • There is no X-UA-Compatible meta tag set by the author.
  • Microsoft has not placed the domain name of the site on a blacklist.
  • An intranet admin has not placed the site on a blacklist.
  • The user has not pressed the Compatibility View button (or otherwise added the domain to a user-specific blacklist).
  • The site is not in the intranet zone.
  • The user has not chosen to display all sites as in IE7.
  • The page is not framed by a Compatibility Mode page.

For the points other than the two X-UA-Compatible cases, IE8 performs doctype sniffing like IE7. The IE7 emulation is called Compatibility View.

In the X-UA-Compatible cases, IE8 behaves radically differently from other browsers. Please see an appendix on this page or a flowchart available in PDF and PNG formats.

Unfortunately, without an X-UA-Compatible HTTP header or meta tag, IE8 lets the user accidentally drop you from the IE8 standards mode to the IE7 mode that emulates the standards mode of IE7 even if you used a proper doctype. Worse, an intranet admin may do this. Also, Microsoft may have blacklisted the entire domain you use (e.g. mit.edu!).

To counter these effects, a doctype isn’t enough and you need an X-UA-Compatible HTTP header or meta tag.

God help us.

Xauth Overload

The Story Of X:

  • In the beginning was xauth, a command-line utility that let you set which machines and users had authority to connect to your X windows display.
  • Then there was XAUTH, part of the authentication mechanism in IPSec secure connections.
  • xAuth, on the other hand, is variation on the OAuth protocol. It’s being proposed by Twitter as a more convenient way for apps to authenticate with online services.
  • And now we have XAuth, a platform developed by Meebo to allow one website to see which other online services you might be logged into.

Come on guys! It’s time to start using some other letters!

Otherwise, we’ll have to think of a way of pronouncing the different capitalisations, so that when geeks say to each other over coffee, “Why don’t we just use x-auth?”, they don’t then all go and implement incompatible things…

Ex-books and eBooks

Two rambling thoughts this morning about ebooks.

Mmm… an aside, before I’ve even started: How should I capitalise or hyphenate e-book? Quentin’s Law of Technological Pervasiveness says that a (non-proprietary) technology has been truly successful when it’s no longer capitalised. There are those who insist that ‘internet’ should still be ‘Internet’ but I don’t tend to bother, any more than I would talk about the Electricity Grid… now, where were we? Ah yes…

  1. Unlike their predecessors, e-books have no real reason to go out of print. This is encouraging if you’re an author who has poured years of your life into a work and can now take comfort in the idea that it will always be accessible, even if only a few continue to read it.
  2. Many publishers have made downloadable versions of their books freely available, confident in the knowledge that most people, if they like more than a chapter or so, will splash out for the paper version because it’s so much nicer than reading on screen. Will the advent of the iPad and similar, really rather nice, portable PDF viewers put an end to this practice?

The Times, they are a-fellin’

There’s a widely quoted trivia fact on the web: that the publication of a typical Sunday edition of the New York Times takes 63,000 trees.

Wow. That’s pretty striking number, if it’s right. But does anyone have a source for it?

There are about 1.5M subscribers to the Sunday edition, so I’m guessing they sell about 2M copies in all. That means a single tree gives you only about 32 copies. Does that sound right? The paper is pretty bulky on a Sunday, but still… I don’t think the economics would work out if that were the case. How much does a tree cost?

Of course, they may be very small trees…

lIEs, damned lIEs?

I’ve always said that there are lies, damned lies, statistics, and web statistics. Any figures from a web site owner about how many hits their site gets should be taken with a big pinch of salt – they could be a long way out in either direction, though one could argue javascript-and-cookie-based analysis gives us better stats now than we had in the past.

Anyway, having said that, there was an interesting TechCrunch article last week showing dramatic recent changes in web browser usage patterns.

Internet Explorer 7 is dramatically down, with most of its users switching to IE8, which is growing fast. If you treat the different browser versions independently, Firefox 3 is about to become the most-used browser out there.

Combine all the IE versions, however, and it still has much the biggest market share with just over half the market. But the significant fact is that the IE share has fallen from nearly two-thirds of the market just 3 months ago. Presumably, this comes from people making the IE upgrade, finding IE8 isn’t quite to their liking, and opting for Chrome, Firefox or Safari instead.

Anyway, this data is only from one source, albeit a reasonably big one, so should be handled with care until confirmed elsewhere. But, whatever your browser of choice, the most important aspect of the web is that it is open and evolving, and healthy competition in the browser space is an absolutely essential part of that, so this looks like a promising trend.

Drop it in the box

I’ve only just started playing with Dropbox, but it looks very cool.

It’s what iDisk should have been. Software for Windows, Linux and Mac will create a Dropbox folder on your machine. Anything you drop on that folder is efficiently and securely synchronised to all other machines connected to the same account. It keeps past versions of updated files for you. The storage behind the scenes is Amazon’s S3 service. And if you’re using less than 2GB, Dropbox is free.

Here’s a more detailed write-up by Ryan Paul.

© Copyright Quentin Stafford-Fraser