Live data from Hacker News

A word for a value between 0 and 1 (inclusive)

english.stackexchange.com

271–280 of 325 posts

Re: A word for a value between 0 and 1 (inclusive)

#271
post #264

Weird that it's been flagged as off-topic with no explanation. "I'm looking for a word" seems very on-topic for an stack exchange about a human language.

Among the comments: > Naming variables is expressly off-topic here. This question, and the answers to it, are the perfect showcase of why. – RegDwigнt The link "off-topic" in the notice eventually takes you to the help center which states: > But please, don’t ask any questions about the following topics. They are out of scope for this site. > * Naming, including naming programming variables/classes The question was e…

It seems every StackExchange site is overrun by sophomoric gatekeepers, searching for (& competing with each other?) to find any possible reason to shoot-down questions.

It's so much easier to hit that 'downvote' or 'close' button than to actually try to understand the asker, or compose a meaningful answer, or even explain clearly why a question might truly need work.

So, I see a lot of 'closes' from people who hardly ever answer any questions, and plenty by people who simply don't understand the question's domain enough to see that yes, that is a meaningful question with a compact, well-matched answer. And once closed, it seems no one really looks at 'reopen' requests, even after the question text improved.

Re: A word for a value between 0 and 1 (inclusive)

#272

I like that the top-voted answer is a wrong one. (A unit interval is the set [0, 1], whereas the asker wants to know a name for an element of it.)

"Belongs to the unit interval" is correct, but I like to think most of us have gotten enough exposure to cognitive science to know that the brain prefers to have a word or adjective for everything, and that's the problem here.

Also, Unit Interval is only an answer to this exact question, not a class of questions to which this one belongs. If the range was [0,5] then you couldn't even shorten it with Unit Interval.

Re: A word for a value between 0 and 1 (inclusive)

#273
post #44

Does anyone know of a good site for these kind of questions other than the English stack exchange. I frequently run into programming related naming issues (who doesn't eh?). But I struggle to find accurate search terms to help answer them...and the results are usually downed out by non-technical related language Q&A's E.g. I was trying to name a table yesterday that would store events related to boxes, pallets, conta…

Not quite what you're asking, but I keep a list of useful words when I get stuck trying to come up with a variable name:

https://github.com/Mister-Meeseeks/words-for-variables

(Pull requests are welcome, if anyone else has good suggestions for candidates on the list.)

Re: A word for a value between 0 and 1 (inclusive)

#274
post #111

Earlier quoted context omitted.

It’s 1, but is it a mantissa? The linked Wikipedia article just says that the mantissa is “the fractional part.”

The fractional part of x is what you have left after you subtract the largest integer k ≤ x. Hence the fractional part is always less than 1. Since 0.999... = 1, it is not less than 1, so cannot be the fractional part of any number.

Makes sense, thanks.

Re: A word for a value between 0 and 1 (inclusive)

#275
post #100

Creating a type that is defined as being between one and zero would be more helpful and then the name can reflect the usage of the value

Sure, but then you still have to name the type.

UnitInterval

Represent it internally as either fixed or floating point and divide to convert in and out if needed.

With a nice type system you could even genericize the type over integer constants

Re: A word for a value between 0 and 1 (inclusive)

#276
post #44

Does anyone know of a good site for these kind of questions other than the English stack exchange. I frequently run into programming related naming issues (who doesn't eh?). But I struggle to find accurate search terms to help answer them...and the results are usually downed out by non-technical related language Q&A's E.g. I was trying to name a table yesterday that would store events related to boxes, pallets, conta…

> Does anyone know of a good site for these kind of questions other than the English stack exchange.

Well, I was inspired enough by this idea to create a sub-reddit for the discussion of specific variable naming challenges. Hopefully it catches on.

https://www.reddit.com/r/namemyvariable/

Re: A word for a value between 0 and 1 (inclusive)

#277
post #44

Does anyone know of a good site for these kind of questions other than the English stack exchange. I frequently run into programming related naming issues (who doesn't eh?). But I struggle to find accurate search terms to help answer them...and the results are usually downed out by non-technical related language Q&A's E.g. I was trying to name a table yesterday that would store events related to boxes, pallets, conta…

It is the English Language and Usage Stack Exchange (for linguists and etymologists), as distinct from the English Language Learners Stack Exchange (for people learning English), and indeed from the Computer Science Stack Exchange (for computer scientists) and the Software Engineering Stack Exchange (for software engineers).

* https://cs.stackexchange.com/

* https://softwareengineering.stackexchange.com/

So the question to ask onesself is whether one wants answers to a programming language question on how to name a variable from an audience of linguists or from an audience of software engineers. (-:

Re: A word for a value between 0 and 1 (inclusive)

#278
post #90

I don't think this is a naming issue at all. In the provided example, 'Accuracy' is the correct name for the parameter, as that's what the parameter represents, accuracy. The fact that accuracy should be given as a value in an interval from 0 to 1 should be a property of parameter type . In other words, the parameter should not be a float, but a more constrained type that allows floats only in [0,1]. EDIT: Some of yo…

I think this is the best answer. This got me thinking: What about a situation where the accuracy is given in a real-life unit. For example, the accuracy of a GPS measurement, given in meters. I've sometimes used names like 'accuracyInMeters' to represent this, but it felt a bit cumbersome. Edit: Thinking more about it, I guess you could typealias Float to Meters, or something like that, but also feels weird to me.

F# has 'units of measure' support, https://docs.microsoft.com/en-us/dotnet/fsharp/language-refe...

Re: A word for a value between 0 and 1 (inclusive)

#279

"Normalized". That's what we call data that have been scaled to fit on a tidy axis.

This would be like calling numbers constrained between 0 and 100 "multiplied". Yes, in some common situations you normalize data and it ends up between 0 and 1. And in some common situations you multiply and end up with numbers between 0 and 100 (like percentages).

But normalization doesn't always result in numbers between 0 and 1 and multiplication doesn't always result in numbers between 0 and 100.

Similarly, not all numbers constrained between 0 and 1 have been normalized and not all numbers constrained between 0 and 100 have been multiplied.

Add in the fact that the normalization statisticians most commonly use is z-score standardization (subtracting by the mean and dividing by standard deviation, resulting in data centered around 0), and you're going to end up with a lot of confusion. In fact, this example highlights that while normalization does mean "to scale" it doesn't mean that the result will always be bounded to a particular interval.

Re: A word for a value between 0 and 1 (inclusive)

#280
post #44

Does anyone know of a good site for these kind of questions other than the English stack exchange. I frequently run into programming related naming issues (who doesn't eh?). But I struggle to find accurate search terms to help answer them...and the results are usually downed out by non-technical related language Q&A's E.g. I was trying to name a table yesterday that would store events related to boxes, pallets, conta…

I use Power Thesaurus[1], which is crowd-sourced and frequently has words that are well suited to technical use-cases. In your case, I looked at synonyms for "containers" and found some likely candidates such as "holders" or "receptacles", so `receptacle_events`. [1] https://powerthesaurus.com/

Thanks for the recommendation!
Post reply on HN