"...a STANDARD for the storage of contacts..."



May I as a seasoned (if not veteran) coder, propose a sensible one that we might promote into the limelight?

Plain, Simple, key: value text files, like apt and dpkg lists, email and http headers, with records delimited by a blank line.  This is the best file format for nearly everything.  Not CSV, not SEXPS, not gzipped XML (spit), not binary bitblob monstrosities.  Simple records of key value pairs.

We use this format for HTTP and Email headers, and for your favourite Linux Distros' package lists, etc., etc., because it's very good, it's human readable/writable, and it's ultra simple.  Even a mouse can understand it, with a little coaching.  It's still sadly underused.

Look, something like this:

Name: Fred Nurk
Address: 1234 Numpy St
  Worthingthwaite
  UK 123545
Phone: 012345678
Phone: 564387347
Email: fred@nurk.foo
Email: frednurk99123412@gmail.com

Name: Emily Jane Nurk
Address: 256 Bitwise St
  Camelhide
  Australia
  3243


I'm sure you all get the idea.  If not, I can specify the simplest and preferable variant in meticulous detail within 1/4 page or so.  You can even store binary in it!  (if don't mind the long lines)

To use ANY other file format for most any sort of records is simply insanity, for this is the file format of the Gods, simplicity itself: it's exactly what any sensible (English speaking) Human would write on paper, and it's trivial to parse it, and it's completely generic, and - thank the Gods especially for this - it's not XML.

For indexing, if needed, we can easily enough write a 'textmap' program that for a file "addresses.txt" will create "addresses.ix" its index.  The index could also be a text file, or a binary file, but with fixed width fields.  The well-esteemed Postfix does similar for its text databases with the 'postmap' program.

If you are concerned about complete index rebuilds, please don't be, at least not for this application.  Indeed this also can be solved by using padding within the main database text file, but we lose some simplicity then.

Go forth, and spread the good news!  Plain text files are the simple, elegant solution to most of our computing problems.


earth
Sam Watkins
2011-05-20

sam.nipl.net

sam@nipl.net