Re:Please put units in names
by WorldMaker on Monday March 21, 2022 @06:11PM
(#30760378)
From one perspective it is the "normalized" unit, so not giving it a name makes as much sense as trying to find a word for it: if you were going to call something ProgressPercent the normalized float/double form is just Progress. This is probably the closest to what I try to stick too, but it can be hard especially if you have six other things that also want to be called "Progress" that aren't normalized floats/doubles.
(Another name for the "normalized" unit is sometimes the "unit" unit. ProgressUnit sounds dumb, but is an available option in English and shorter than ProgressNormalized.)
I use "andel", but if you don't write your variable names in Danish, then it might look a little strange. "Share" would be the direct translation, but that word usually means something else in programming. In English, I use "ratio" also; in context the meaning is always clear enough.
Re:Please put units in names
by ______-_-______ on Monday March 21, 2022 @03:25PM
(#30758569)
That's actually not a terrible idea! German is known for having words for concepts other languages lack, and I guess that applies to Danish by extension. Maybe I should ditch the thesaurus and teach myself German.
That said, "percent" is a common and precise word, and I haven't come up with anything quite as good for variables in range [0,1]. I generally use "ratio," but I don't love the word. Is there anything better?