News for hackers. Stuff that matters.
Re:Please put units in names by ______-_-______ on Monday March 21, 2022 @10:14AM (#30754380)
I 100% agree.

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?

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.)

Re:Please put units in names by munch117 on Monday March 21, 2022 @02:35PM (#30757938)
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.
Re:Please put units in names by FreeFull on Monday March 21, 2022 @12:25PM (#30755997)
Maybe "fraction" would be suitable.