On Mar 3, 2022, at 8:05 AM, Michael Tremer michael.tremer@ipfire.org wrote:
Hello,
On 3 Mar 2022, at 04:18, Jon Murphy jcmurphy26@gmail.com wrote:
Hello all,
Maybe the Devs can discuss this during the March 7th, 2022 Monthly Video Conference meeting?
You are of course welcome to join. It is called Dev Conference because we talk about development stuff, but everyone can join and at least listen in :)
However, this topic is probably easy enough that we can talk about it here on the list.
Could we create an IPFire standard for units of transfer speed? And for format of dates?
These standards would be used mostly within the WebGUI. And hopefully on the Wiki, Community and all other IPFire entities.
Yes. I would really like this. We have a lot of chaos here, because lots of code was gathered together by lots of different people, and localisation has a heavy influence on things like dates.
Let me say where I would like us to go in the long run. Maybe there should be some smaller steps on the way...
Speed
Ask: Pick Mbps (or maybe Mbit/s) as the official standard for IPFire.
This is a capital `M` for Mega and not a small `m` for milli.
Suggest a maximum of three decimal places (digits to right of decimal point).
Mbps would replace other unit seen like kbit/s, Mbit/s in Traffic In/Out (example Traffic: In 255.70 kbit/s Out 5.49 Mbit/s).
I would vote for GBit/s, MBit/s and kBit/s.
`bits` is a small `b`. And bytes is a capital `B`. So more like this: Mbit/s.
To me having three data rate units is adding to the confusion. Can we just pick Mbit/s?
GBit/s
becomes something like 1200 Mbit/s (or maybe 1,200 Mbit/s).
kBit/s.
becomes something like 0.12 Mbit/s. (maybe drop the 3rd decimal place?)
Things like:
Traffic In/Out (example Traffic: In 255.70 kbit/s Out 5.49 Mbit/s).
become easier to read as Traffic: In 0.25 Mbit/s Out 5.49 Mbit/s
The units used in the QoS configuration screen are confusing to me! See: https://community.ipfire.org/t/error-in-rrd-graph-for-qos-device/7259/5?u=jo... https://community.ipfire.org/t/error-in-rrd-graph-for-qos-device/7259/5?u=jon
This makes it very clear, that we are talking about bits and not bytes (although this should be known to most people, some people confuse MB/s with Mb/s).
When it comes to file sizes, we have many of places where we show this in bytes or kilo bytes. What a nightmare. We should do it as follows: 1 MiB, 17 GiB, etc. Although nobody will say “mebibyte”, it will be technically correct and what people would expect. I don’t hope that we will get into this kind of hair splitting, but sooner or later someone will chime in and say that “1 MB” isn’t 1,048,576 bytes.
MiB as “mebibyte” is good for me.
We’d might want to declare if we are counting is decimal (1000-based) or a binary-based (1024-based) system. SI https://en.wikipedia.org/wiki/International_System_of_Units#Prefixes units follow 1000-based (I think…). I don’t know the standard for the 1024 side...
I was a big fan of omitting the unit and just showing the prefix, like “1 M”. Context should make clear, that we are talking about bytes, and it would have been nice and short, but that seems to have confused people in the past.
Date
Ask: Pick a date format of yyyy-mm-dd as the official standard for IPFire.
I've seen dates like mm/dd/yyyy and dd/mm/yyyy.
Yes, there might even be a mix of this. There is no point of having the mm/dd or dd/mm debate.
Yay!!
It depends on what you are used to, and there won’t be compromise, because everywhere around us, we will see dates in one shape or the other and it will be confusing if we would have to remember that there is a different format being used in IPFire.
Wherever we need to write a date we should use yyyy-mm-dd when it is a technical date. Configuration files and so on should use that format, because it cannot be confused.
But it isn’t nice to read and very often might waste space, because the year is clear from context.
I would like to write dates like this when we present it to the user: March 3, 2022. That reads well, the month and the day cannot be confused and it should be short. If possible, we can make it even shorter by omitting the year. It is also nicer to use in a sentence instead of writing “Since 03/03”. “Since March 3” works a lot better for my brain.
How about: 03 Mar 2022 ?
Either March 3, 2022 or 03 Mar 2022 is fine.
Time should be clear as HH:MM in 24 hour format. How is that for you guys in the US? I would expect that most Europeans work well with this.
HH:MM in 24 hour format is good for me in the US.
Or HH:MM:SS in 24 hour format. One or both is fine.
Other Standards
Should data units be reviewed? as MB (Megabytes) and not KiB.
See above.
I can add some images if it helps, but I am guessing it is not needed.
Indeed.
To avoid this chaos, it would be great to have a function for each type in general-functions.pl which can be called from virtually anywhere (and will know the user locale).
Something like: &General::format_date(date);
If we would be using Python, I would suggest using Babel which has a great collection for various locales. I don’t believe this (or something similar) is available for Perl.
Best, -Michael
Thank you! Jon
Thanks! Jon