I have been thinking of learning some programming recently, but I don’t feel confident enough. Is there any point in beginning with something like Zig or Go, and switching to something more serious later?

  • thingsiplay@lemmy.ml
    link
    fedilink
    arrow-up
    15
    arrow-down
    1
    ·
    3 days ago

    Python is designed as an easy language. Yet it is a fundemental important language in the IT, backbone of many Linux operating systems and servers. One could even say… a serious language.

    I personally wouldn’t care if a language is called “easy” or not. You should also look at what it is capable at its peak and where it is used most often, if it works for you. Pick the language that you think fits you the best. I wouldn’t call Zig as an easy language to get into, its still low level language.

    • tristynalxander@mander.xyz
      link
      fedilink
      English
      arrow-up
      3
      ·
      3 days ago

      Yeah, I’d like to add that there’s something to being dedicated to one language, especially if you’re self taught. I could certainly cobble something together in C, but having coded in python for nearly a decade I’ve built up an intuition for it. I know where things fail. I know what to do when things fail. I know what packages are common. I’ve built up a collection of utility functions. I know common patterns. Despite never having been taught algorithms or data structures, being committed to one language has led me to learn how to write efficient code in that language (rather than hoping switching to C will magically solve bad algorithms).

      My code is still weird as hell and offends professional programmers, but it’d be hard to deny that I know what I’m doing.

        • thingsiplay@lemmy.ml
          link
          fedilink
          arrow-up
          4
          ·
          2 days ago

          I need to test this with multiple distributions in a virtual machine, out of curiosity. Then test executing common tasks. Could be an idea for a blog post or YouTube video…

      • dastanktal@lemmygrad.ml
        link
        fedilink
        English
        arrow-up
        3
        ·
        3 days ago

        Did you not know that several package managers like DNF/yum are written in python? There’s a ton of tools like that for each os and a lot of the time Python is the tool of choice.

        • ThirdConsul@lemmy.zip
          link
          fedilink
          arrow-up
          1
          ·
          3 days ago

          Dnf5 is written in C++

          My point is that I wouldn’t call it a backbone. There are always alternatives in different languages, and python version is oft not the default or main one. C(++) is the backbone of Linux.

          Except Fedora I think, iirc they use python packages often.

          • dastanktal@lemmygrad.ml
            link
            fedilink
            English
            arrow-up
            1
            ·
            1 day ago

            Sure, I think we can just ignore the fact that the Red Hat Core package manager was driven by Python for almost 20 plus years and only recently, as of two years ago, switched to C++.

            You are correct at seeing C as a backbone, but most tools, especially early tools were written in a language like Python. Its easy to prototype and adopt.

            I guarantee you if I go through a list of system tools that every Linux distro is dependent on, including something like a package manager, which the linux os is absolutely dependent on You would be genuinely surprised by the amount of tools written in a language like Python or Ruby.

            Also, a package manager is not core to a Linux distribution, Really? That seems like stretch.

            Yes, you can compile everything from source. Very few people do.

            • ThirdConsul@lemmy.zip
              link
              fedilink
              arrow-up
              1
              ·
              1 day ago

              Also, a package manager is not core to a Linux distribution, Really? That seems like stretch.

              My point is that calling Python a backbone of Linux because 2 package managers out of many are in Python is a stretch like from Kilimanjaro to Kuala Lumpur.

              (AFAIK only Gentoo has the package manager written in Python, second one being historical DNF).

              APT, dnf, pacman, zypper, flatpak, snap, nix, yay, pikachu and akukaracha (last two are me being facetious :P) are not written in Python.

              • dastanktal@lemmygrad.ml
                link
                fedilink
                English
                arrow-up
                1
                ·
                1 day ago

                Let’s not be obtuse, I was simply using one tool as an example. There’s a lot more, and there’s a lot of other reasons why Python is critical as a component of a Linux system.

                Let’s just start with systemD. Did you know that systemD requires Python to build? GTK4 has the same requirement.

                Systems that have replaced the Python component often use a different language like Lua in their place, like alpine Linux.

                Python is literally the glue that people use to bind all of your C programs together because it can be done quickly, easily, and efficiently unlike C and C++.

                You literally cannot use a modern Linux system without Python. It’s just straight up not possible Unless you’re using something that is specifically stripped and built for the removal of Python. It is assumed for a ton of packages and scripts, including major component tools like Ansible, which are critical in the commercial environment.

                • ThirdConsul@lemmy.zip
                  link
                  fedilink
                  arrow-up
                  1
                  ·
                  24 hours ago

                  Let’s not be obtuse, I was simply using one tool as an example.

                  You obviously used a wrong example.

                  You literally cannot use a modern Linux system without Python

                  Android.