• ramjambamalam
    link
    fedilink
    arrow-up
    17
    ·
    edit-2
    7 hours ago
    • Push directly to master, not main
    • No command line args, just change the global const and recompile
    • No env vars either
    • Port numbers only go up to 5280, the number of feet in a mile
    • All auth is just a password; tokens are minority developers, not auth, and usernames are identity politics
    • No hashes – it’s the gateway drug to fentanyl
    • No imports. INTERNAL DEVELOPERS FIRST
    • Exceptions are now illegal and therefore won’t occur, so no need to check for them
    • SOAP/XML APIs only
    • No support for external machines. If it’s good enough for my machine, it’s good enough for yours.
  • MTK@lemmy.world
    link
    fedilink
    arrow-up
    19
    ·
    13 hours ago

    Error handling should only be with “if”

    Variable names must be generic and similar to each-other

    Debugging is only done with prints

    Version numbers must be incoherent, hard to order correctly, contain letters and jump in ways that don’t align with the updates done.

      • undefinedValue@programming.dev
        link
        fedilink
        arrow-up
        28
        arrow-down
        5
        ·
        12 hours ago

        Sadly? Master branch never implied the existence of a slave branch. It was one of the dumbest pieces of woke incursion into tech.

        • qaz@lemmy.world
          link
          fedilink
          English
          arrow-up
          13
          ·
          10 hours ago

          It was kind of pointless, but at least it made software work with custom default branches.

        • chonglibloodsport@lemmy.world
          link
          fedilink
          arrow-up
          8
          ·
          11 hours ago

          Yes exactly. It’s a reference to the recording industry’s practice of calling the final version of an album the “master” which gets sent for duplication.

          • Zink@programming.dev
            link
            fedilink
            arrow-up
            4
            ·
            9 hours ago

            In alignment with this, we should not replace the master branch with the main branch, we should replace it with the gold branch.

            Every time a PR gets approval and it’s time to merge, I could declare that the code has “gone gold” and I am not doing that right now!

            • ramjambamalam
              link
              fedilink
              arrow-up
              2
              ·
              7 hours ago

              Merged -> gone gold

              Deployed -> gone platinum

              Gone a week without crashing production -> triple platinum

        • Maggoty@lemmy.world
          link
          fedilink
          arrow-up
          8
          arrow-down
          1
          ·
          11 hours ago

          But why even? There’s no risk to changing it and some risk to keeping it. That’s the reason for the push to change it. Keeping something just because it’s tradition isn’t a good idea outside ceremonies.

        • tyler@programming.dev
          link
          fedilink
          arrow-up
          3
          arrow-down
          1
          ·
          11 hours ago

          Yeah agreed. Just another piece of white devs acting like they knew better for everyone.

  • JackbyDev@programming.dev
    link
    fedilink
    English
    arrow-up
    4
    arrow-down
    2
    ·
    9 hours ago

    Arrays not starting at 1 bother me. I think the entrenched 0-based index is more important than any major push to use 1 instead, but if I could go back in time and change it I would.

    • Overshoot2648@lemm.ee
      link
      fedilink
      arrow-up
      13
      arrow-down
      1
      ·
      9 hours ago

      It really doesn’t make sense to start at 1 as the value is really the distance from the start and would screw up other parts of indexing and counters.

      • Klear@lemmy.world
        link
        fedilink
        English
        arrow-up
        3
        ·
        8 hours ago

        It doesn’t make sense that the fourth element is element number 3 either.

        Ultimately it’s just about you being used to it.

      • JackbyDev@programming.dev
        link
        fedilink
        English
        arrow-up
        2
        ·
        8 hours ago

        Yeah, but if we went back and time and changed it then there wouldn’t be other stuff relying on it being 0-based.

        • Username@feddit.org
          link
          fedilink
          arrow-up
          3
          ·
          7 hours ago

          It was not randomly decided. Even before arrays as a language concept existed, you would just store objects in continuous memory.

          To access you would do $addr+0, $addr+1 etc. The index had to be zero-based or you would simply waste the first address.

          Then in languages like C that just got a little bit of syntactic sugar where the ‘[]’ operator is a shorthand for that offset. An array is still just a memory address (i.e. a pointer).

          • JackbyDev@programming.dev
            link
            fedilink
            English
            arrow-up
            1
            ·
            5 hours ago

            I know. But in the alternate reality where we’d been using 1-based indices forever you’d be telling me how useful it is that the first element is “1” instead of zero and I’d be saying there are some benefits to using zero based index because it’s more like an offset than an index.

      • xmunk@sh.itjust.works
        link
        fedilink
        arrow-up
        6
        ·
        13 hours ago

        Hey now, you know that according to the Bible the biggest number is a million. Anything larger than that including infinity is some of that “woke shit”.

        Your array will be 999,999, 999,998, 999,997 …

    • SamboT@lemmy.world
      link
      fedilink
      arrow-up
      1
      arrow-down
      1
      ·
      8 hours ago

      Im unfamiliar with this as well. If you are allocating memory for a stack, why does it matter which direction it populates data? Is this just a convention?

      • Gigamegs@lemmy.zip
        link
        fedilink
        Deutsch
        arrow-up
        2
        arrow-down
        1
        ·
        8 hours ago

        I ask deepseek: Downward-growing stacks** are more common in many architectures (e.g., x86, ARM). This convention originated from early computer architectures and has been carried forward for consistency.

        Funny, I can’t remember, , because I did a lot of assembler back in my youth.

    • dan@upvote.au
      link
      fedilink
      arrow-up
      2
      ·
      10 hours ago

      Visual Basic used to let you choose if you wanted to start arrays at 0 or 1. It was an app-wide setting, so that was fun.

        • dan@upvote.au
          link
          fedilink
          arrow-up
          2
          ·
          9 hours ago

          It’s how I got into programming, so I’ll always have a soft spot for it. Now it’s over 20 years later and I’m still coding.

          • nickwitha_k (he/him)@lemmy.sdf.org
            link
            fedilink
            arrow-up
            1
            ·
            7 hours ago

            Apple Basic (on an Apple IIe) was my first language that I recall.

            Didn’t have a computer powerful enough for VB until later. It does have a special place in my nostalgia zone but has also led so many astray.

        • pelya@lemmy.world
          link
          fedilink
          arrow-up
          17
          ·
          16 hours ago

          In Lua all arrays are just dictionaries with integer keys, a[0] will work just fine. It’s just that all built-in functions will expect arrays that start with index 1.

          • my_hat_stinks@programming.dev
            link
            fedilink
            arrow-up
            5
            ·
            13 hours ago

            That’s slightly misleading, I think. There are no arrays in Lua, every Lua data structure is a table (sometimes pretending to be something else) and you can have anything as a key as long as it’s not nil. There’s also no integers, Lua only has a single number type which is floating point. This is perfectly valid:

            local tbl = {}
            local f = function() error(":(") end
            
            tbl[tbl] = tbl
            tbl[f] = tbl
            tbl["tbl"] = tbl
            
            print(tbl)
            -- table: 0x557a907f0f40
            print(tbl[tbl], tbl[f], tbl["tbl"])
            -- table: 0x557a907f0f40	table: 0x557a907f0f40	table: 0x557a907f0f40
            
            for key,value in pairs(tbl) do
              print(key, "=", value)
            end
            -- tbl	=	table: 0x557a907f0f40
            -- function: 0x557a907edff0	=	table: 0x557a907f0f40
            -- table: 0x557a907f0f40	=	table: 0x557a907f0f40
            
            print(type(1), type(-0.5), type(math.pi), type(math.maxinteger))
            -- number	number	number	number
            
          • frezik@midwest.social
            link
            fedilink
            arrow-up
            2
            ·
            10 hours ago

            PHP did that same thing. It was a big problem when algorithmic complexity attacks were discovered. It took PHP years to integrate an effective solution that didn’t break everything.

            • Sonotsugipaa@lemmy.dbzer0.com
              link
              fedilink
              English
              arrow-up
              17
              ·
              17 hours ago

              Lua - Portuguese feminine noun for “moon”, coming from the Latin “luna”
              Luna - Latin, feminine noun (coincidentally identical to the Italian noun, also feminine)

              Yup, Lua is a girl.

      • UndercoverUlrikHD@programming.dev
        link
        fedilink
        arrow-up
        2
        ·
        14 hours ago

        Writing Lua code that also interacts with C code that uses 0 indexing is an awful experience. Annoys me to this day even though haven’t used it for 2 years

    • lefixxx@lemmy.world
      link
      fedilink
      arrow-up
      2
      arrow-down
      10
      ·
      17 hours ago

      How is arrays starting at 1 still a controversial take. Arrays should start at 1 and offsets at 0.

      • Traister101@lemmy.today
        link
        fedilink
        arrow-up
        4
        ·
        17 hours ago

        So what’s 0 do then? I’m okay with wacky indexes (I’ve used something with negative indexes for a end-index shorthand) but 0 has to mean something that’s actually useful. Using the index as the offset into the array seems to be the most useful way to index them.

  • db0@lemmy.dbzer0.com
    link
    fedilink
    arrow-up
    18
    arrow-down
    1
    ·
    19 hours ago

    NGL, this kind of form of putting the decisions the monkey-in-charge is making in a way experts in a field will understand, is a very good way to showcase the absurdity.

    • NABDad@lemmy.world
      link
      fedilink
      English
      arrow-up
      2
      ·
      15 hours ago

      Are there really people capable of understanding this who aren’t capable of understanding, for example, “tariffs increase inflation”?

  • tgm@lemmy.world
    link
    fedilink
    English
    arrow-up
    7
    ·
    18 hours ago

    Haven’t heard of the stack address thing, anyone got a TLDR on the topic?

  • notabot@lemm.ee
    link
    fedilink
    arrow-up
    6
    ·
    18 hours ago

    I started reading that from the top and got increasingly angry on the way down. That creature is a monster.