Re: "name-value pair" vs "key-value pair"

Subject: Re: "name-value pair" vs "key-value pair"
From: Jeroen Ruigrok/Asmodai <asmodai -at- wxs -dot- nl>
To: "TECHWR-L" <techwr-l -at- lists -dot- raycomm -dot- com>
Date: Wed, 20 Jun 2001 10:27:13 +0200

-On [20010619 23:20], Ben Kovitz (ben-kovitz -at- vertel -dot- com) wrote:
>Guy Haas wrote:
>
>>I document a product that deals in a lot of what I would call
>>"name-value pairs" (or "name/value pairs"). Recently, some of our
>>engineers added some new features and discussed the same entities in
>>terms of "key-value pairs".
>>
>>A web search turned up over 9000 instances of "name-value pair" to
>>over 8700 "key-value pair" citations.
>>
>>I have seen "name/value" used in the W3 standards.
>
>To a programmer, saying "key/value" pair suggests some sort of database
>lookup, typically a hash table. The key is the input to the database, the
>value is what the database returns. For example, in a database of zip
>codes, the key might be a zip code, and the value might be the name of the
>city.

I have to add my support to Ben's answer.

It is more common to use key/value pair if you are referring to
something like a hashtable.

And in that context the key is often a part of the values put in an
array. (Or whatever attribute you choose to come to a reasonbly balanced
and weighted distribution of the values within the key `buckets'.)

Example:

Take the first two or three letters of first or last names, and then put
all values starting with these letters in a single array called by the
first letters.

Jer -> Jeremy, Jeroen, Jerome

Whereas Pet might contain Petrov, Peter

In effect this will speed up look-ups, since you try and make it
deterministic.

A name/value pair more commonly means, at least to me, a combination of
a configuration name with its value. Say a Windows registry name or a
Unix rc.conf entry.

Hope this helps,

--
Jeroen Ruigrok van der Werven/Asmodai asmodai -at- [wxs -dot- nl|freebsd.org|xmach.org]
Documentation nutter/C-rated Coder, finger asmodai -at- ninth-circle -dot- dnsalias -dot- net
http://www.freebsd.org/doc/en_US.ISO_8859-1/books/developers-handbook/
>From Nothing comes only Nothing...

^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

*** Deva(tm) Tools for Dreamweaver and Deva(tm) Search ***
Build Contents, Indexes, and Search for Web Sites and Help Systems
Available now at http://www.devahelp.com or info -at- devahelp -dot- com

Sponsored by Cub Lea, specialist in low-cost outsourced development
and documentation. Overload and time-sensitive jobs at exceptional
rates. Unique free gifts for all visitors to http://www.cublea.com

---
You are currently subscribed to techwr-l as: archive -at- raycomm -dot- com
To unsubscribe send a blank email to leave-techwr-l-obscured -at- lists -dot- raycomm -dot- com
Send administrative questions to ejray -at- raycomm -dot- com -dot- Visit
http://www.raycomm.com/techwhirl/ for more resources and info.


References:
"name-value pair" vs "key-value pair": From: Haas, Guy
Re: "name-value pair" vs "key-value pair": From: Ben Kovitz

Previous by Author: Re: Heading North
Next by Author: Re: technical writing in Rome
Previous by Thread: Re: "name-value pair" vs "key-value pair"
Next by Thread: Re: "name-value pair" vs "key-value pair"


What this post helpful? Share it with friends and colleagues:


Sponsored Ads