• 1 Post
  • 83 Comments
Joined 1 year ago
cake
Cake day: October 19th, 2023

help-circle


  • No, what I said is true if you use zero-based numbering. But when communicating with others in English, the label “first” refers to the element with the smallest index. In zero-based numbering, the label “zeroth” refers to the element with the lowest index. It’s just not the default in English, but you can definitely use zero-based numbering in English if you’re willing to edit the configuration files.



  • My argument is purely pedantic. Pedantry is the lifeblood of programmer “humour”.

    I’m not arguing that we should adopt zero-based numberingin real-life human applications. I am arguing that in zero-based numbering, the label “zeroth” refers to the same ordinal as “first” in one-based numbering. I am poking fun at the conversion between human one-based numbering and computers’ zero-based numbering. That is why I am saying it should be called zeroth(); because human language should adapt to match the zero-based numbering their tools use. Whether I actually mean what I say—well, I leave that up to you.

    It does not matter why indexes start from zero in computing. The memory offset argument is only salient if you are using it as an argument for why computers should use zero-based numbering. It is not an argument against the properties of zero-based numbering itself.


  • Zero-based indexing redefines the meaning of the labels “first”, “second”, “third”, and so on. It adds a new label, “zeroth”, which has the same ordinal value as “first” in one-based indexing. The word “first” does not mean “the element with the lowest index” in zero-based indexing.

    If you are using a zero-based numbering system, you would absolutely say that array[2] is the final element in the array, that element having the ordinal label “second”, and yet the length of the array is 3 (cardinal). There is no fundamental connection between the ordinal labels “zeroth”, “first”, “second”, and “third” and the cardinal numbers 0, 1, 2, and 3. The similarities are purely an artefact of human language, which is arbitrary anyway. You can make an equally mathematically valid ordinal numbering system that assigns “third” to the element with the smallest index, “fourth” to the next-smallest, and so on. That ordinal numbering system is mathematically coherent and valid, but you’re just causing trouble for yourself when it comes time to convert those ordinals (such as array indexes) into cardinals (such as memory locations or lengths of fencing to buy).

    You can make an argument for why one-based numbering is more convenient and easier to use, but you cannot use the notion that zero-based numbering doesn’t make sense given the assumed context of one-based numbering as an argument for why zero-based numbering is invalid.

    I encourage you read up what is meant by “zero based numbering” because you and everyone else who has replied to me has tried to use “but that’s not how it works in one-based numbering” as an explanation for why I’m wrong. This is as nonsensical of an argument as trying to say i (the imaginary unit) is not a number because it’s not on the number line. It’s only not a number in the domain of the real numbers. Similarly, zero-based numbering is only nonsensical in the context of one-based indexing.

    It does not matter why indexes start from zero. The memory offset argument is only salient if you are using it as an argument for why computers should use zero-based numbering.


  • Okay, I will admit, you got me there. I did confuse indexing with numbering. From now on I will use the term “numbering” instead.

    It is entirely how ordinal numbers work in zero-based numbering. There is no “right way” for ordinal numbers to work. You can create a valid ordinal numbering system starting from any integer, or just some other ordered list. You cannot assume one-based numbering is “correct” and use it as an argument against numbering beginning from any other number.

    I encourage you read up what is meant by “zero based numbering” because you and everyone else who has replied to me has tried to use “but that’s not how it works in one-based numbering” as an explanation for why I’m wrong. This is as nonsensical of an argument as trying to say i (the imaginary unit) is not a number because it’s not on the number line. It’s only not a number in the domain of the real numbers. Similarly, zero-based numbering is only nonsensical in the context of one-based indexing.

    Zero-based numbering would number “foo” as the zeroth element, “bar” as the first element, and “baz” as the second element. “zeroth”, “first”, and “second” are labels representing ordinals. Your list has a length of 3 (which is a cardinal quantity unrelated to ordinals).

    Although, I would like to point out, it is perfectly valid to construct an ordinal labelling system that assigns “fifth” to the element with the lowest index, “sixth” to the next, and so on. That system is mathematically coherent but it is just troublesome to when it comes time to convert ordinal numbers (such as the index of the last fence-post) to cardinal numbers (such as the length of fence to buy).

    But this is now getting into the weeds of pure mathematics and most people here are engineers.


  • NateNate60@lemmy.worldtoProgrammer Humor@lemmy.mlOff by one solitude
    link
    fedilink
    arrow-up
    3
    arrow-down
    1
    ·
    edit-2
    14 days ago

    That’s because the word “first” in first() uses one-based indexing. In true programmer fashion it would have been called zeroth() but that is wholly unintuitive to most humans.

    I maintain that the element with the lowest index is called the “zeroth” element in zero-based indexing and “first” in one-based indexing. The element with index N is the Nth element.



  • Rulers measure cardinal quantities and not ordinal ones. There is no cardinal numbering scheme that starts at 1, all of them “start” at 0. For ordinal numbering schemes, the symbols are arbitrary anyway and you can start with whatever you want. It’s equally valid to start with 1, 0, -1, A, or “aardvark”. The only benefit to picking 1 as the start is to make it easier to count with your fingers while picking 0 lets you easily convert an ordinal quantity to a cardinal one.






  • No, of course, I cannot. I do not judge what category someone likely falls into based on whether what they say matches nearly word for word a “promoted” viewpoint. In some cases, I mostly agree with what they said but it’s painfully obvious that person didn’t come to that conclusion through their own thinking but is rather just parroting a screenshot of a post on the site formerly known as Twitter.

    You have missed the entire point of my comment. If someone is likely to be in categories 2 or 3, I dismiss them if the viewpoint is otherwise not worthy of discussion, which it usually is not. I don’t care if this causes me to misjudge the intentions of some people, because that is inevitable in any probability-based judgement system. What matters is picking what is most likely correct.

    I don’t feel that you have the ability to grasp this point and you’re just going to come up with another argument I didn’t make to attack.


  • No, I am not. I wouldn’t say it if it were made up. Who have I got to convince by making shit up? I am not pushing any viewpoint at all.

    I base my assertion on interactions with people on this platform. Whenever someone parrots a point that is promoted this way, they’re almost universally just repeating what some wisecrack said on X that sounds correct enough to not investigate further or think critically about and is agreeable to their worldview.

    I will not argue over this. You either accept what I am saying or you don’t, but I don’t give enough of a shit either way to get into an argument.


  • This is just simplistic and un-nuanced thinking.

    The use of bots is not to generate new opinions, it is to make fringe opinions seem more popular than they are. Most (but not all) opinions propagated this way are already worthy of dismissal for other reasons, but when it’s clear that someone is repeating word-for-word a line of dismissable or unsound rhetoric which is also being propagated by those bots, it lends itself to three reasonable conclusions:

    1. This person genuinely believes that and was not influenced by the bots to do so, i.e. it is a coincidence
    2. This person genuinely believes that but only because they were stupid enough to get absorbed by the bots
    3. This person does not genuinely believe that and is acting in bad faith

    Only in case 1 is such an opinion worth discussing, but the vast majority of cases will be case 2 or case 3.

    That is why it is reasonable to dismiss such opinions despite the possibility that they are genuine, in good faith, and not the product of propaganda. Because the odds that they’re not are vastly greater. Nobody can be certain of anyone’s intentions on the Internet, so rational actors can only play a game of “What is the most likely scenario?”.



  • The reason is because it supposedly creates a moral hazard. This is the logic behind pricing for all sorts of medical resources (such as co-pays and deductibles). If there is a nominal cost involved to obtain the resource, then you will be incentivised not to use more than you need. But if it is free or costs too little, then you (and others) may choose to use a lot of the resource, far more than you actually need.

    For example, suppose there is a $50 co-pay (a co-pay is essentially a fee) to see the doctor, and you figure you should go once a year for a check-up. In this case, you will not schedule an excessive number of appointments because you know it is not necessary and it will cost you money each time you do. If scheduling doctor’s appointments were free or costs very little, like $1, you may instead choose to schedule two or three appointments per year, because why not? Or maybe you will go see the doctor for every minor cold or stuffy nose. It’s not like it will cost you a significant amount of money. Or so their thinking goes, anyway.

    Remember, the $50 you pay isn’t all that it costs. For every $50 you pay, the insurance company is probably paying the doctor $150.

    Similarly, suppose a drug costs $100, but the insurance company pays $90, and you have to pay a $10 co-pay. You buy one vial, which is good for one month. The fear is that if the insurance company pays for all $100, since the drug is now free for you, you might decide to get two vials instead, just in case. After all, they’re free for you, right? This means the insurance company has to pay $200 for two vials of the drug but the benefit to you is actually pretty small. Again, this is how insurance companies think.

    Now, whether this logic is sound or not, I leave that part up to you.