GNU bug report logs -
#17505
Interface inconsistency, use of intelligent defaults.
Previous Next
Reported by: Linda Walsh <coreutils <at> tlinx.org>
Date: Fri, 16 May 2014 01:26:02 UTC
Severity: normal
Merged with 22277
Done: Pádraig Brady <P <at> draigBrady.com>
Bug is archived. No further changes may be made.
Full log
View this message in rfc822 format
On Friday 16 May 2014, Linda Walsh wrote:
> On programs that allow input and output by specifying computer-base2
> powers of K/M/G OR decimal based powers of 10,
>
> If the input units are specified in in powers of 2 then the output
> should be given in the same units.
>
> Example:
>
> dd if=/dev/zero of=/dev/null bs=256M count=2
> ... So 512MB, total -... but what do I see:
> 536870912 bytes (537 MB) copied, 0.225718 s, 2.4 GB/s
>
> Clearly 256*2 != 537.
>
> At the very least this violates the design principle of 'least
> surprise' and/or 'least astonishment'.
Yes, I also had to think again and again about this. Often being unsure
whether it did what I want. Actually I would like to have a global
switch or env to turn off all powers of 10 based output and input.
Power of 10 is IMO only useful for the human reader to quickly
understand the magnitude of byte count.
For example these both lines are equally easy to read
536870912 bytes (537 MB):
536,870,912 bytes
But power of 10 is annoying as well as thousands separators. The most
useful and least confusing would be this one:
536870912 bytes (256 M)
For the last line it's easy mental arithmetic to "calculate" that this
is 537 MB. But I doubt that anybody wants to know this at all.
cu,
Rudi
This bug report was last modified 9 years and 147 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.