• 2 Posts
  • 122 Comments
Joined 11 months ago
cake
Cake day: October 19th, 2023

help-circle
  • 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.


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



  • Frankly, most communist parties around the world that try to fight the government and take over violently get brutally crushed.

    You cannot launch a violent revolution without popular support, and the reality is that absent extreme circumstances, the population as a whole at any given time will view the policies proposed by most communist parties as extreme. That is why it is so exceedingly rare for communist parties to be able to win power democratically, because the truth of the matter is that communist policies are usually deeply unpopular.

    I do not care whatever your intentions may be; if you try to impose your ideology on the population against their will by violence, I equate you to the fascists. And indeed, many of the so-called socialist regimes that have popped up after these “worker’s revolutions” have been tinpot dictatorships with the socialist decorations, while extinguishing personal liberties and badly mismanaging the state economy. And the promise of equality is totally betrayed as the party leadership becomes the new bourgeoisie, living in luxury off others’ labour while the workers’ living standards remain much lower.

    Simply put, just because a hammer and sickle was installed atop the state buildings, the flag drenched in red, and the Evil Bourgeoise Government renamed to the People’s Evil Bourgeoise Government doesn’t make it any better.

    I am a socialist and also Chinese, and I believe fellow socialist George Orwell’s Animal Farm is shockingly illustrative of the situation.


  • No, I would not. In an ideal world, Corbyn would still be the leader of the Labour Party while Starmer would head a moderate centre-left or centrist liberal party, and after the 2024 election, it would be Corbyn and Starmer governing together in coalition, resulting in a government that is slightly more to the left than what it is now.

    But the UK’s system of elections is flawed and definitely not perfect, which prevents this.


  • Then let it be. A liberal or conservative society is nonetheless better than fascism. What you have described is merely a situation where socialist and social-democratic politics have been electorally defeated by conservative ones.

    The KPD chose to pout and fight to the bitter end rather than recognising that because they lacked the necessary amount of influence in the Reichstag to control the government, they could not get what they wanted, nor anything near it, and could only, at best, get an extremely watered-down version of the policies they want, or even settle for the status quo to prevent regressive policies from being enacted. Or even accept a mildly regressive policy to prevent a fascist one from being enacted. This is what democracy is meant to do. You give a little, and they give a little, and hopefully, we can both get a little bit of what we want or at least reduce the amount of the stuff we hate. If all of your positions are rigidly uncompromisable, you will find that a well-designed democratic system will keep you out of government and relegated to the sidelines unless you actually hold the popular mandate.

    If the choice is to saw off your left foot or saw off your head, you must choose the lesser of the two. Refusing to choose does nothing to help you, and the KPD refused to choose.

    Rather than accepting this reality, the. KPD decided it wouldn’t go down without a fight. Ultimately, they failed, and wouldn’t get the chance to govern (or even exist in public) for another two decades. Only after finding external help in the form of the Soviet Union and its Red Army did the KPD finally get what it wanted, subjugating the SPD. The new SED was ushered into government, will of the electorate be damned.

    In the end, both the KPD and the Nazi Party wanted to destroy the Weimar Republic because they knew they could not get what they wanted by playing by its rules. The key historical difference is that the Nazis succeeded.

    I don’t fault the KPD’s leaders for what they did. After all, we here in 2024 have the power of hindsight that was not available to them. But in the end, we must recognise that the KPD’s stubbornness certainly didn’t help with the collapse of the Weimar Republic and accelerated Hitler’s rise to power.

    It is an uncomfortable position to be in when you are forced to criticise the decisions of those whose values you respect and agree with. But it must be done if the goal is to learn from history and not merely flaunt it.


  • I’m pretty sure if all Nazi voters instead voted SDP, Hitler wouldn’t have risen to power. The only reason the Nazi Party had any appeal whatsoever is because fractured voting meant chaotic governments, weak and ineffective chancellors, and leaving the president with no choice but to issue emergency decrees just to keep the state apparatus in semi-functional condition.

    The one way, the only way, given the composition of the Reichstag, that the Nazis could have been kept out of power is if the Communists were willing to swallow their pride and work with the Centre Party, moderate right-wing parties, and SPD to keep Hitler out of the Chancery. Instead, look what happened. Hitler was appointed Chancellor and purged the Reichstag of opposition. The Enabling Act wasn’t passed because everyone wanted Hitler to have those powers. It was because you either voted with the chancellor or the SS would gun you down on the way back home.

    That’s the problem with today’s so-called socialists. An absolutely myopic stance that what isn’t perfect might as well be the worst thing on the planet.