|
cheetah7071 posted:The most horrifying part of that is calling a proportion a percentage I'm not seeing the problem with that. Interpreting proportions as probabilities can be an issue but that's not happening here.
|
# ? Jan 17, 2023 20:19 |
|
|
# ? Jun 13, 2024 05:50 |
|
using the wrong name means making errors about whether the correct range of the value is 0-1 or 0-100, constantly
|
# ? Jan 17, 2023 20:22 |
|
The best thing is when you have two APIs, one you want to shovel into another, and they use different ranges.
|
# ? Jan 17, 2023 20:26 |
|
Volte posted:There's nothing wrong with this And it's still a percentage. 0.1 and 10% are the same thing: 10/100. percentage = .1 says very explicitly .1/100
|
# ? Jan 17, 2023 20:27 |
|
leper khan posted:percentage = .1 says very explicitly .1/100
|
# ? Jan 17, 2023 20:36 |
|
0.1% is a valid value for a percentage. If I saw that without context I'd end up being confused whether it legitimately is 0.1% or if it's a proportion and meant to be 10%. In this case the context resolves it but mistaking those two words leads to nothing but headaches
|
# ? Jan 17, 2023 20:39 |
|
I definitely have some code that's in the camp of 'I absolutely could algorithmically generate this but couldn't figure out how and it's a bounded value'. As someone else mentioned, this probably isn't THAT bad of a code snippet, aside from the naming stuff.
|
# ? Jan 17, 2023 20:56 |
|
It's pretty simple: there's no place that you should ever see "percentage" and assume it should be an unadorned number between 0 and 100. There's nothing in life, programming, or mathematics that uses it that way. Not even everyday use of percentages in common language express percentages without the percent sign. Normally this wouldn't even come up, since you rarely need to specify "percentage" instead of something more general but since this is specifically designed to visually represent percentages, it makes sense to me that it should follow the definition of what a percentage actually is, and not what some people might mistakenly believe a percentage is.
|
# ? Jan 17, 2023 20:56 |
|
Volte posted:It doesn't. The fraction is the percentage and the % sign is a shorthand for "x/100". Percentage refers to a fraction of 100, it doesn't specifically mean just the numerator. Per Centum. Fraction of 100. It's literally the words meaning. 10 percent is 10/100. .1 percent is .1/100 Per Mille. Fraction of 1000. 10 is 10/1000. .1 is .1/1000 It's very explicit.
|
# ? Jan 17, 2023 21:00 |
|
It's pretty simple: my interpretation is obviously correct and you're all idiots.
|
# ? Jan 17, 2023 21:03 |
|
leper khan posted:Per Centum. Fraction of 100. It's literally the words meaning. 10 percent is 10/100. .1 percent is .1/100 pokeyman posted:It's pretty simple: my interpretation is obviously correct and you're all idiots.
|
# ? Jan 17, 2023 21:11 |
|
Falcon2001 posted:I definitely have some code that's in the camp of 'I absolutely could algorithmically generate this but couldn't figure out how and it's a bounded value'. As someone else mentioned, this probably isn't THAT bad of a code snippet, aside from the naming stuff. Use machine learning.
|
# ? Jan 17, 2023 21:27 |
|
Stable diffusion to generate progress bars based on a supplied percentage
|
# ? Jan 17, 2023 21:29 |
|
pokeyman posted:It's pretty simple: my interpretation is obviously correct and you're all idiots. I'll drink to that!
|
# ? Jan 17, 2023 21:30 |
|
Volte posted:But you're mixing up two different words, percent and percentage. A percentage is a fraction of 100. Percent is just a shorthand for "out of 100" or "divided by 100". "10 percent" is the percentage 10/100 = 0.1. "0.1 percent" is the percentage 0.1/100 = 0.001. I would understand this complaint if the name of the function was "percent" instead of "percentage", but in that case I'd say it's just wrong and there's no real good interpretation of that. Percentage is pretty unambiguous though. percentage a part of a whole expressed in hundredths https://www.merriam-webster.com/dictionary/percentage Yes it is unambiguous. A percentage of .1 would be .1/100
|
# ? Jan 17, 2023 21:33 |
|
I imagine (hope) you would not write code where you call an argument "percentage" and then smugly "well actually" other people who are confused about why the value is treated as an (unscaled) proportion rather than a percentage in the colloquial use of the term if you write a method like that and you name the argument "percentage" rather than "proportion", what does that choice of term imply? - if not that you're treating the number as what most people would understand as a percentage, i.e. a number where 100 really means 1 because it's been scaled like that If you call it that, and we assume you're not merely being careless (or a smug prick) about what you call things, then you chose that term over something less pointed like "proportion" or "fraction". the reader of the code is entitled to infer something about what you meant by that choice of term, and what else are they to assume
|
# ? Jan 17, 2023 21:34 |
|
like, even if I agreed that "proportion" and "percentage" were terms that have absolutely 100% the same meaning and connotations (I don't agree, by the way) I still wouldn't name a variable that if it was meant to be an ordinary proportion; because I would know that the majority of people reading the code would not understand it to mean what I was trying to express, and if writing code is an act of communication with the computer and with other programmers, then that's a failure to communicate well
|
# ? Jan 17, 2023 21:43 |
|
Volte posted:It's pretty simple: there's no place that you should ever see "percentage" and assume it should be an unadorned number between 0 and 100. There's nothing in life, programming, or mathematics that uses it that way. Not even everyday use of percentages in common language express percentages without the percent sign. this is absolutely wrong. Completely wrong. I see numeric values between 0 and 100, intended to be interpreted as percentages, constantly in my work.
|
# ? Jan 17, 2023 21:58 |
|
leper khan posted:percentage If the language had an actual % postfix operator that let you specify "50%" directly, what would you expect "printPercentage(50%)" to do? Hammerite posted:like, even if I agreed that "proportion" and "percentage" were terms that have absolutely 100% the same meaning and connotations (I don't agree, by the way) I still wouldn't name a variable that if it was meant to be an ordinary proportion; because I would know that the majority of people reading the code would not understand it to mean what I was trying to express, and if writing code is an act of communication with the computer and with other programmers, then that's a failure to communicate well cheetah7071 posted:this is absolutely wrong. Completely wrong. I see numeric values between 0 and 100, intended to be interpreted as percentages, constantly in my work. Volte fucked around with this message at 22:04 on Jan 17, 2023 |
# ? Jan 17, 2023 22:01 |
|
if your variable names are ambiguous enough to provoke a big annoying argument like this you should ensure there is actual documentation (or at least a comment over the function definition) specifying the actual range of inputs instead of leaving your readers to infer it because whether you think your side is right or wrong someone from the other side is gonna read your code someday
|
# ? Jan 17, 2023 22:09 |
|
"percentage", at least as used colloquially, can mean (A) a number expressed in a particular form (e.g. "100%" standing for the number 1) but it can also mean (B) the number to the left of the percent sign when a number is written that way. If you don't agree with this, imagine you asked someone what percentage of voters in a particular state voted for Donald Trump in the 2020 presidential election, and that they responded "forty-five". So long as you would interpret that response as meaning that Trump got 45% of the vote, and not as meaning that he got 4500% of the vote, then I think you're compelled to accept that "percentage" can have meaning (B). When I say "ordinary proportion" I mean a proportion that's not presented as a percentage (sense A). Of course, a percentage (sense A) is a proportion (presented in a particular way).
|
# ? Jan 17, 2023 22:12 |
|
I think at best it shows that there needs to be some clarification on the range, which really there should be in any case, but I still don't think there's a better word for that function than "percentage" given what it does (maybe ratio but I think that tends to connotes a proportion of one thing to another). A lot of colloquial usage has implied information omitted in ways that you would (or should) never assume in a more rigorous setting like programming. "What's the temperature?" "31". In common parlance, this is probably a well understood sentence given all available context. In programming, it would be obviously underspecified - if it wasn't obvious otherwise, you'd have to go to the documentation to see what units are expected. If you see "percentage", maybe you do the same thing just to make sure because sometimes the meaning of words can be tricky, but I still say that if the documentation then tells you the number should be between 0 and 100, then it's a misnomer. In other words, if you assume "percentage" means anything other than "scalar multiplier of a whole", then you're just assuming that the library writer was wrong. Bury me on this hill
|
# ? Jan 17, 2023 22:32 |
|
Volte posted:I still don't think there's a better word for that function than "percentage" the correct word is "proportion"
|
# ? Jan 17, 2023 22:38 |
|
The parameter should be called "n" so that you have to look up what the range is.
|
# ? Jan 17, 2023 22:43 |
|
Volte posted:I think at best it shows that there needs to be some clarification on the range, which really there should be in any case, but I still don't think there's a better word for that function than "percentage" given what it does (maybe ratio but I think that tends to connotes a proportion of one thing to another). I think that "proportion" and "fraction" are both better terms, particularly because unlike "percentage", I do not think either of them admits alternative interpretations that readers would have high confidence in until surprised by the author's actually-intended meaning. This goes back to what I said in my previous post about the choice of the term "percentage", in place of other possible terms, appearing to have significance to the reader.
|
# ? Jan 17, 2023 22:43 |
|
cheetah7071 posted:the correct word is "proportion" petition to start using the word "peruno"
|
# ? Jan 17, 2023 23:05 |
|
Volte posted:The parameter should be called "n" so that you have to look up what the range is.
|
# ? Jan 17, 2023 23:52 |
|
the problem isn't the parameter name. it's the parameter type
|
# ? Jan 18, 2023 00:03 |
|
heard this was the thread to discuss Basis Points??
|
# ? Jan 18, 2023 00:13 |
|
I think it's the thread to discuss type systems with measurement types: https://learn.microsoft.com/en-us/dotnet/fsharp/language-reference/units-of-measure
|
# ? Jan 18, 2023 01:36 |
|
What percentage of bikesheds have more than a page of stupid argument printed sans serif on the underside of the cornflower blue metal roof? 🔵🔵 ◯ ◯ ◯ ◯ ◯ ◯ ◯ ◯
|
# ? Jan 18, 2023 02:57 |
|
Ranzear posted:What percentage of bikesheds have more than a page of stupid argument printed sans serif on the underside of the cornflower blue metal roof? Looks like 20 or so based on your diagram
|
# ? Jan 18, 2023 03:08 |
|
It'll never be 0.20 exactly, so the <= is spurious precision and can be changed to just <, of course. The real horror is that the filled circles have a different width from the unfilled circles and I had to pad the latter with spaces manually.
|
# ? Jan 18, 2023 03:17 |
|
RPATDO_LAMD posted:if your variable names are ambiguous enough to provoke a big annoying argument like this you should ensure there is actual documentation (or at least a comment over the function definition) specifying the actual range of inputs instead of leaving your readers to infer it "Perhaps I was wrong, but the fact that I was confused at all says a lot about your position"
|
# ? Jan 18, 2023 04:06 |
|
RPATDO_LAMD posted:if your variable names are ambiguous enough to provoke a big annoying argument like this Counterpoint; goons.
|
# ? Jan 18, 2023 06:00 |
|
Crossposting from the Python thread because I think it goes here: Switched teams recently, was trying to modify some stuff and went to check unit tests; most of the packages I'm touching don't have unit tests (and I don't have time to overhaul them) but one did, so I was like 'oh okay cool, I can add some tests here to check things'. However, when I looked more closely, I realized that all the tests were some variation of the below. See if you can spot the problem. Python code:
|
# ? Jan 19, 2023 04:45 |
|
lmao Is your team checking coverage at all? You should be able to point to all of the code with 0% coverage and be like "hey you're not actually testing any of this".
|
# ? Jan 19, 2023 04:58 |
|
Falcon2001 posted:Crossposting from the Python thread because I think it goes here: Thank you for boosting my confidence to believe that I actually can change careers from wastewater treatment to software dev
|
# ? Jan 19, 2023 05:08 |
|
shame on an IGA posted:wastewater treatment to software dev but you repeat yourself
|
# ? Jan 19, 2023 11:38 |
|
|
# ? Jun 13, 2024 05:50 |
|
RPATDO_LAMD posted:Following this commit, instead of one single extremely large structure I wonder what maintenance problems you get with a giant struct that you don't get wth 26 somewhat less giant structs grouped by name rather than purpose.
|
# ? Jan 19, 2023 12:01 |