Bug 428045

Summary: Use metric units for file sizes
Product: [Frameworks and Libraries] frameworks-kcoreaddons Reporter: Erik Quaeghebeur <bugs.kde.org>
Component: generalAssignee: Michael Pyne <mpyne>
Status: RESOLVED DUPLICATE    
Severity: wishlist CC: a.samirh78, kdelibs-bugs, kfm-devel, sitter
Priority: NOR    
Version: unspecified   
Target Milestone: ---   
Platform: Gentoo Packages   
OS: Linux   
Latest Commit: Version Fixed In:

Description Erik Quaeghebeur 2020-10-21 07:56:39 UTC
File sizes in Dolphin are given using IEC units (B, KiB = 1024 B, MiB = 1024 KiB,…). Metric units (B, kB = 1000 B, MB = 1000 kB,…) are more appropriate. The reasons are:

* There is no underlying reason to use multiples of 1024, because the size of the content is shown, not of the multiple of block size of the medium the file resides on.
* It is easier to reason in multiples of 1000 than in multiples of 1024.

Therefore, please use metric units for file sizes.
Comment 1 Harald Sitter 2020-10-22 11:02:02 UTC
Moving to kcoreaddons as that is where this is actually controlled via the mapping of KFormat::DefaultBinaryDialect.

This very issue was discussed at length in at least 2009 and I don't see the points having changed much. MB is being used wildly inconsistently to mean either base 10 or base 2 so the decision was to use ISO/IEC labelling as it is at very least unambiguous.

The way I see it the sad truth here is that we cannot use MB=base10 because the rest of common software uses MB=base2 e.g. firefox downloads 1.23MB but if we were to make the suggested change then in dolphin it'd be 1.29MB. But it extends further than that... my mobile internet plan comes with 10GB of data, I'll leave you to guess how much that actually is - the margin of error is only about 2 hours of spotify streaming on high quality ;)
Comment 2 Erik Quaeghebeur 2020-10-22 13:18:14 UTC
(In reply to Harald Sitter from comment #1)
> 
> This very issue was discussed at length in at least 2009 and I don't see the
> points having changed much. MB is being used wildly inconsistently to mean
> either base 10 or base 2 so the decision was to use ISO/IEC labelling as it
> is at very least unambiguous.
> 
> The way I see it the sad truth here is that we cannot use MB=base10 because
> the rest of common software uses MB=base2 e.g. firefox downloads 1.23MB but
> if we were to make the suggested change then in dolphin it'd be 1.29MB. But
> it extends further than that... my mobile internet plan comes with 10GB of
> data, I'll leave you to guess how much that actually is - […]
1. IEC prefixes are unambiguous only for people that know about them, which is not lay people.

2. I agree that there is some confusion about MB, GB, etc (less so kB, because of KB), because of incorrect usage by various software (Windows…). Sometimes people even care about that (hard drive space surprises). The solution is for more software to use the correct definitions.

3. I disagree that “the rest of common software uses MB-base2”. Namely, there's Ubuntu's Units Policy <https://wiki.ubuntu.com/UnitsPolicy> and macOS has for a long time now used decimal prefixes <https://eshop.macsales.com/blog/1852-snow-leopard-changes-they-way-we-look-at-gigabytes-and-megabytes-and-kilobytes-as-well/>. I think this is one area where Apple showed leadership and KDE shouldn't be the last one to follow.

The fact that KDE uses IEC (as does Firefox nowadays, AFAICT) means that it does not commit the same mistake as Windows. But that does not fix the actual usability issue of base2 prefixes: they are used in combination with decimal numbers, meant for consumption by lay people. These people do not know about base2, IEC, etc. 
Those who do know can deal with the change to decimal. Other will finally have their file sizes displayed in a clear way. (Others have discussed this more elaborately: <https://randomascii.wordpress.com/2016/02/13/base-ten-for-almost-everything/>.)

You did not comment on my arguments, but I think they're valid. (Please state whether you agree or not.) You mentioned other arguments that are also valid. So it becomes a question of what weighs heavier. As long as IEC is the default, the usability issue is there. I therefore think a switch to decimal is inevitable. Because of that, I see no reason to postpone the move to decimal. The argument about other software then becomes mostly moot, because they'll switch as well at some point. 

Prompted by your reply, I looked around a bit and indeed there has been quite some discussion about this (and JEDEC) already, sometimes with heated comments. I guess with the above, I'm joining in. I do not know how much people's opinions have evolved since when these discussions were active, but this may mean that changing the default is an impossible decision to make, as this is just too hot of an issue. 

There is another solution:

Make the default configurable as it was in KDE 4 days: See Bug 364321. It was actually the closing of this bug report that prompted my bug reports. David Edmundson says “We use the right thing in the right places.  […] If an app does the wrong thing please report it there.” It seems that people disagree about what is ‘the right thing in the right places’. So then that bug would need to be reopened.
Comment 3 Erik Quaeghebeur 2020-10-22 13:20:06 UTC
*** Bug 428046 has been marked as a duplicate of this bug. ***
Comment 4 Ahmad Samir 2022-05-14 15:14:55 UTC
I think this is a duplicate of bug 364321.

*** This bug has been marked as a duplicate of bug 364321 ***