| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
|
Review requested:
|
Sorry, something went wrong.
Sorry, something went wrong.
|
I may be behind the times on what abbreviations we can expect people to be familiar with, but I think this is going to confuse people more than enlighten them. Also FWIW the style guide doesn't seem to recommend this. https://docs.microsoft.com/en-us/style-guide/a-z-word-list-term-collections/term-collections/bits-bytes-terms |
Sorry, something went wrong.
That's likely true. For memory sizes, for example, GB almost exclusively means base 2 anyway, whereas things are vastly different for data transmissions etc. |
Sorry, something went wrong.
|
I agree. Anyway, this PR LGTM if we want to use those units. |
Sorry, something went wrong.
|
I'm further confused by people both approving this PR and agreeing that it is likely to increase confusion. |
Sorry, something went wrong.
|
Lol. You are definitely right. I meant to say that the code changes look fine and we could definitely land this to improve docs(up for me on this). But, at the same time, the possible confusion is definitely worth a second evaluation (in contrast to handle this like a trivial doc fix PR). Hope this rant was understandable :) |
Sorry, something went wrong.
|
My take on this is we should use the technically correct units in our code and comments, I think it's fair to assume that most folks who would read it would not be confused by them. |
Sorry, something went wrong.
|
The standard that defined KiB as the abbreviation for 1024 bytes also says that the unit is a kibibyte and not a kilobyte (which is 1000 bytes, according to the standard). I don't think any of this is at all widely adopted and I'm not sure I want Node.js docs to be an early adopter for this type of thing, especially when "early adopter" means doing it after 15 years of no significant adoption of the terms. This from 2009 still seems to be the case: [Why does Explorer use the term KB instead of KiB?}(https://devblogs.microsoft.com/oldnewthing/20090611-00/?p=17933):
|
Sorry, something went wrong.
I don't love it, but it does have the virtue of precision. Another option is to always use bytes: 16384 bytes. That will work up to a point for relatively small values, but not so much once we're talking about gigabytes or gibibytes. |
Sorry, something went wrong.
There was a problem hiding this comment.
lgtm
Sorry, something went wrong.
|
(All my cranky comments are non-blocking. I just want these things considered before we land.) |
Sorry, something went wrong.
I'm further confused by people both approving this PR and agreeing that it is likely to increase confusion.
|
I'm all for favoring correctness where it matters, and especially in scientific writing, I try to consistently use IEC symbols (KiB, MiB, etc.). That being said, according to the reference @aduh95 provided, using the unit symbols KB, MB, etc. for base-2 units is not incorrect but merely legacy: |
Sorry, something went wrong.
|
Another possibility (that might not always be practical) would be to use the common/"legacy" abbreviations but precise byte counts for clarity: 16 KB (16384 bytes) |
Sorry, something went wrong.
|
I like this one. |
Sorry, something went wrong.
|
Given that this PR has enough approvals + wait time, I'm down to land it as it, and to improve on follow up PRs. FWIW I'd be disappointed if we had to settle on using the legacy units, but as long as we remove the confusion of when we're using metric and when we're using base-2, I'm fine with it. |
Sorry, something went wrong.
Refs: https://en.wikipedia.org/wiki/Byte#Multiple-byte_units PR-URL: nodejs#42587 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Darshan Sen <raisinten@gmail.com> Reviewed-By: Paolo Insogna <paolo@cowtech.it> Reviewed-By: Matteo Collina <matteo.collina@gmail.com> Reviewed-By: Mestery <mestery@protonmail.com>
Refs: https://en.wikipedia.org/wiki/Byte#Multiple-byte_units PR-URL: #42587 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Darshan Sen <raisinten@gmail.com> Reviewed-By: Paolo Insogna <paolo@cowtech.it> Reviewed-By: Matteo Collina <matteo.collina@gmail.com> Reviewed-By: Mestery <mestery@protonmail.com>
Refs: https://en.wikipedia.org/wiki/Byte#Multiple-byte_units PR-URL: #42587 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Darshan Sen <raisinten@gmail.com> Reviewed-By: Paolo Insogna <paolo@cowtech.it> Reviewed-By: Matteo Collina <matteo.collina@gmail.com> Reviewed-By: Mestery <mestery@protonmail.com>
Refs: https://en.wikipedia.org/wiki/Byte#Multiple-byte_units PR-URL: #42587 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Darshan Sen <raisinten@gmail.com> Reviewed-By: Paolo Insogna <paolo@cowtech.it> Reviewed-By: Matteo Collina <matteo.collina@gmail.com> Reviewed-By: Mestery <mestery@protonmail.com>
Refs: https://en.wikipedia.org/wiki/Byte#Multiple-byte_units PR-URL: #42587 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Darshan Sen <raisinten@gmail.com> Reviewed-By: Paolo Insogna <paolo@cowtech.it> Reviewed-By: Matteo Collina <matteo.collina@gmail.com> Reviewed-By: Mestery <mestery@protonmail.com>
Refs: https://en.wikipedia.org/wiki/Byte#Multiple-byte_units PR-URL: #42587 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Darshan Sen <raisinten@gmail.com> Reviewed-By: Paolo Insogna <paolo@cowtech.it> Reviewed-By: Matteo Collina <matteo.collina@gmail.com> Reviewed-By: Mestery <mestery@protonmail.com>
Refs: https://en.wikipedia.org/wiki/Byte#Multiple-byte_units PR-URL: nodejs/node#42587 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Darshan Sen <raisinten@gmail.com> Reviewed-By: Paolo Insogna <paolo@cowtech.it> Reviewed-By: Matteo Collina <matteo.collina@gmail.com> Reviewed-By: Mestery <mestery@protonmail.com>
| Back | FazBrowse Home | New Git URL |
Refs: https://en.wikipedia.org/wiki/Byte#Multiple-byte_units