Click here to get back home

sorting a hash / 2008-06-01

 HomeNewsGroups | Search | About
 comp.lang.perl.misc    Post an article   get this group's latest topics as an RSS feed add this group's latest topics to your My MSN content add this group's latest topics to your My Yahoo content
Subject Author Date
sorting a hash / 2008-06-01 dn.perl@gmail.com 05-30-2008
Get Chitika Premium
Posted by Jürgen Exner on June 1, 2008, 11:16 pm
Please log in for more thread options
>I agree in principle that code that deals with human measurement units
>should *at least* be aware of the fact that there are different
>measurement systems. As a general rule, I would defer to your wider
>experience

Wow, I feel flattered.

> (I infer from your name that you're European, so you're
>probably a little more exposed to issues of internationalisation than US
>developers)

Indeed. And I have been teaching US developers for years that it is a
very bad idea to just append an 's' to a word if you want to create the
plural of that word. Among many other things.

>However, in the particular case of temperature and weather, there really
>are only two measurement systems: Fahrenheit and Celcius (or Centigrade,

Now that is one of my pet peeves! A centigrade by definition of the
prefix centi is one hundreds of a grade or degree. So 36 degrees
centigrade are 0.36 degrees, but in what system?
Even the combination 130 centigrade Fahrenheit makes total sense and
would be 1.3 degree Fahrenheit. Very likely not what the person using
centigrade had in mind.

>if you prefer). Since a pragmatic script that is internationalized would
>allow the user to choose their unit of choice for display, it's academic
>which system is used inside the Perl script... this could be easily
>hidden from the calling script by a wrapper function performing the
>necessary conversions.
>
>Heck, you could store the temperatures in Kelvin, the true SI unit for
>temperature and convert to C or F as required by the calling function :o)

Not a bad idea at all.
Except that all scientific use including any weather reporting station
even in the US(!) uses Celsius, see e.g. aviation weather reports and
forecasts. Therefore degree Celsius appears to be the most convenient
unit for interal storage where you would need the least number of
conversions.

jue

Posted by Tad J McClellan on June 3, 2008, 9:41 pm
Please log in for more thread options

> But if a nation, claiming involvement in world leadership, is even
> after decades not even starting to adopt the actual world wide
> accepted standards it deservedly gives place to ridicule.


I agree.


> It looks to me like the US want to claim and preserve a history by
> clinging to states and singular events from the past.


Us Mercans are just an extremely old fashioned lot.


--
Tad McClellan
email: perl -le "print scalar reverse qq/moc.noitatibaher0cmdat/"

Posted by szr on June 3, 2008, 11:51 pm
Please log in for more thread options
sheinrich@my-deja.com wrote:
[...]
> BTW: I think that when I'm negotiating for a used car in Outback
> Australia, then I can't complain if the owner is fussing about how low
> she's running in miles per gallon - although Australia officially
> adopted SI units some time ago (1960).
> But if a nation, claiming involvement in world leadership, is even
> after decades not even starting to adopt the actual world wide
> accepted standards it deservedly gives place to ridicule.

Granted, though a lot of ridicule seem to also come from the UK, despite
the fact that they use some of their own units for certai nthings (like
their own Gallons and Ounces.) It's not just the USA that uses different
units for some things, any many people who ridicule the USA for it
forget that all too easily.

--
szr



Posted by Martijn Lievaart on June 4, 2008, 3:00 am
Please log in for more thread options
On Tue, 03 Jun 2008 20:51:21 -0700, szr wrote:

> Granted, though a lot of ridicule seem to also come from the UK, despite
> the fact that they use some of their own units for certai nthings (like
> their own Gallons and Ounces.) It's not just the USA that uses different
> units for some things, any many people who ridicule the USA for it
> forget that all too easily.

Don't worry, we ridicule them all. :-)

M4


Posted by prawn on June 4, 2008, 4:10 pm
Please log in for more thread options
On Tue, 03 Jun 2008 20:51:21 -0700, szr wrote:

> Granted, though a lot of ridicule seem to also come from the UK, despite
> the fact that they use some of their own units for certai nthings (like
> their own Gallons and Ounces.) It's not just the USA that uses different
> units for some things, any many people who ridicule the USA for it
> forget that all too easily.

Err, the only non-SI units in use now are pints (for beer only) and miles
for road distances and horse racing. Milk, wine, spirits, fuel are all
sold in litres and goods are sold in kilo's. Hell, we even decimalized
our currency in 1971 :-)

--
"If you ask me Jeeves, art is responsible for most of the trouble in the
world."
"It's an interesting theory, Sir. Would you care to expatiate upon it?"
"As a matter of fact, no Jeeves. No The thought just occurs to me, you
know, as thoughts do."

Similar ThreadsPosted
Sorting a hash containing a hash of hashes December 14, 2005, 2:29 pm
Hash Sorting June 14, 2005, 2:49 pm
Sorting Hash by Value and Key May 17, 2007, 9:57 am
Sorting on sub-hash values June 23, 2005, 11:30 am
Sorting AofH over hash key(s)... October 30, 2007, 4:40 pm
Nested sorting of a hash December 6, 2007, 6:23 am
warnings on sorting hash of hashes January 5, 2005, 11:53 pm
sorting data - hash vs. list September 11, 2005, 4:41 pm
Sorting array of hash references October 26, 2006, 6:21 am
Sorting "string" numerical keys from a hash. September 5, 2004, 2:47 pm

Our other projects:

Art Dolls, Fairies and Mermaids - Sunnyfaces.net

Roy's Linux, Programming and Search Engines messages

1-Script XML SitemapXML Sitemap