Author Topic: Units are used wrong  (Read 7532 times)

Offline Mike7294

  • Member
  • *
  • Posts: 6
Units are used wrong
« on: 25-05-2010, 01:05:37 »
I've tested File & Image Uploader v5.4.9 and noted that the units for amounts of data are used wrong. Here are the correct calculations:

1 B = 1 Byte = 8 bit

SI prefixes (see e.g. http://en.wikipedia.org/wiki/SI_prefix)
1 kB = 1000 B  (note the lowercase "k")
1 MB = 1000 kB = 1'000'000 B
1 GB = 1000 MB = 1'000'000'000 B

IEC prefixes (see e.g. http://en.wikipedia.org/wiki/IEC_prefix)
1 KiB = 1024 B
1 MiB = 1024 KiB = 1'048'576 B
1 GiB = 1024 MiB = 1'073'741'824 B

Please make sure that by default the SI prefixes are used. If desired, there could be an option to switch to IEC prefixes.
« Last Edit: 25-05-2010, 22:15:17 by z_o_o_m »

Offline z_o_o_m

  • Administrator
  • Hero Member
  • *****
  • Posts: 7 232
  • just ask me ;)
    • File & Image Uploader
Re: Units are used wrong
« Reply #1 on: 25-05-2010, 07:45:34 »
no, they are not ...

Offline Mike7294

  • Member
  • *
  • Posts: 6
Re: Units are used wrong
« Reply #2 on: 25-05-2010, 21:12:55 »
That's strange. Perhaps you have another version. I have tested version 5.4.9 (free). I have just tried again to upload a file with 40.000.000 bytes (= 40 MB = 38.14697 MiB), and the program displays "38.15 MB", which is wrong. It seems that the program uses the factor 1024 for calculations, but SI prefixes for display.

Furthermore, the program displays the upload speed in "KB/s". However, "KB" (with a capital "k") is informally used for 1024 B, but data rates are usually specified by using SI prefixes. So it would be better to use "kB/s".
« Last Edit: 25-05-2010, 22:14:10 by z_o_o_m »

Offline z_o_o_m

  • Administrator
  • Hero Member
  • *****
  • Posts: 7 232
  • just ask me ;)
    • File & Image Uploader
Re: Units are used wrong
« Reply #3 on: 25-05-2010, 22:13:36 »
1KB=1024B
it is correct and I will NOT change anything

Offline Mike7294

  • Member
  • *
  • Posts: 6
Re: Units are used wrong
« Reply #4 on: 25-05-2010, 23:10:07 »
Yes, but 1 kB = 1000 B. In this case a difference can be made by the lowercase or uppercase "k". However, with Megabyte (MB) this is not possible, because the SI symbol is already uppercase. So to indicate the difference, the unit "Mebibyte" with the symbol "MiB" was defined.

I would prefer to use Megabytes, because they are easier to imagine and to calculate with. E.g. if I upload 15 files with 100 MB each, then the total amount of data is 1500 MB which is exactly 1.5 GB. However, if I upload 15 files with 100 MiB = 104.8576 MB each, then the total amount is 1500 MiB, but that's not 1.5 GiB, but 15 * 104.8576 MB = 1572.864 MB = 1.57 GB = 1.46 GiB.

The best would be if there would be an option to switch between SI and IEC prefixes, because some file hosters use calculations based on 1024, although they use SI prefixes, e.g. MegaUpload.
« Last Edit: 25-05-2010, 23:12:06 by z_o_o_m »

Offline z_o_o_m

  • Administrator
  • Hero Member
  • *****
  • Posts: 7 232
  • just ask me ;)
    • File & Image Uploader
Re: Units are used wrong
« Reply #5 on: 25-05-2010, 23:14:14 »
lol ... you make problems when it is not necessary ;)

I will leave it as it is (1024 system), I don't care about some SI things

Offline Mike7294

  • Member
  • *
  • Posts: 6
Re: Units are used wrong
« Reply #6 on: 26-05-2010, 11:21:39 »
Hmm, seems that you haven't understood the problem: The actual problem is that e.g. the name "Megabyte" and the symbol "MB" is sometimes used for 1'000'000 B and sometimes for 1'048'576 B, so it's not always clear what is meant. It's like using "1 km" sometimes for 1000 m and sometimes for 1024 m or something else like it was in former times with many units.

In the long term the only solution will be to use a unit only in one meaning. So you can use factors of 1024, but you shouldn't use SI prefixes then, because they are defined for factors of 1000 only. Why do you actually want to use factors of 1024?

I think it won't be much work to add an option to use different factors (and matching units) to your software, but it then will be modern and future proof in this aspect. Just think a minute about it and it should become clear.  ;)

Offline z_o_o_m

  • Administrator
  • Hero Member
  • *****
  • Posts: 7 232
  • just ask me ;)
    • File & Image Uploader
Re: Units are used wrong
« Reply #7 on: 26-05-2010, 11:29:14 »
1 kilobyte (KB) used to be all the time 1024 bytes,
then the noobs from some standardization company came and said that it is 1000 ...

I will NOT listen to any noobs who don't know what it is about. Microsoft uses in all windows 1024 system, my program does it too

Offline Mike7294

  • Member
  • *
  • Posts: 6
Re: Units are used wrong
« Reply #8 on: 26-05-2010, 14:12:30 »
1 kilobyte (KB) used to be all the time 1024 bytes,
then the noobs from some standardization company came and said that it is 1000 ...

That's not true, it has always been an informal use only in certain cases, especially not for data rates. It had never been defined generally that way and will never be, because the kilo is already defined and well known for 1000 units. Sometimes the symbol "KB" or just "K" (capital) has been used to indicate the difference, but that's not possible for Megabytes and larger units.


I will NOT listen to any noobs who don't know what it is about. Microsoft uses in all windows 1024 system, my program does it too

You shouldn't use Microsoft as an example, because they never cared about standards ...  ::)
Better take Apple or Ubuntu as an example: http://www.neowin.net/news/ubuntu-implements-units-policy-will-switch-to-base-10-units-in-future-release  :)

Offline z_o_o_m

  • Administrator
  • Hero Member
  • *****
  • Posts: 7 232
  • just ask me ;)
    • File & Image Uploader
Re: Units are used wrong
« Reply #9 on: 26-05-2010, 14:35:43 »
we will never solve this ;)
Apple sux and Ubuntu is not for common users :)

and Microsoft is right ... I don't care about standards  ...
computer kilo as a binary unit can't be the same as standard kilo as a decimal unit ;)

forget it and use it "as is" ... you can't convince me xD

Offline Mike7294

  • Member
  • *
  • Posts: 6
Re: Units are used wrong
« Reply #10 on: 26-05-2010, 16:30:02 »
and Microsoft is right ... I don't care about standards  ...
... you can't convince me xD

Confucius said:
By three methods we may learn wisdom:
First, by reflection, which is noblest;
Second, by imitation, which is easiest;
and third by experience, which is the bitterest.  :'(





Offline z_o_o_m

  • Administrator
  • Hero Member
  • *****
  • Posts: 7 232
  • just ask me ;)
    • File & Image Uploader
Re: Units are used wrong
« Reply #11 on: 26-05-2010, 17:37:23 »
and I dont care about 2000 years dead people :D

 

With Quick-Reply you can write a post when viewing a topic without loading a new page. You can still use bulletin board code and smileys as you would in a normal post.

Warning: this topic has not been posted in for at least 120 days.
Unless you're sure you want to reply, please consider starting a new topic.

Name: Email:
Verification:
Human verification ... What is the name of my program? File & Image ********?: