• rainwall@piefed.social
      link
      fedilink
      English
      arrow-up
      93
      ·
      edit-2
      6 days ago

      Imperative stonager works there too. You’ve just never seen him because he hasen’t accepted a meeting invite is 14 years.

    • Victor@lemmy.world
      link
      fedilink
      arrow-up
      5
      ·
      6 days ago

      I think I’m a little bit of everyone except him. I work as a web dev, love functional programming and/with TypeScript. 😅

    • yogurtwrong@lemmy.world
      link
      fedilink
      arrow-up
      10
      ·
      6 days ago

      Imperative stoneagers getting an old MacBook from somewhere and going “huh, I guess its UNIX” is probably true though

      • dantel@programming.dev
        link
        fedilink
        arrow-up
        2
        ·
        5 days ago

        The imperative stoneager feels like the most favored one, there are no real negatives listed there. All that’s listed are things they usually pride themselves on.

      • ulterno@programming.dev
        link
        fedilink
        English
        arrow-up
        0
        ·
        5 days ago

        Yeah, that Mac offended me.
        My imperative programming journey was a few months on a handed down P2 followed by 3 years of pen and paper.

  • palordrolap@fedia.io
    link
    fedilink
    arrow-up
    17
    ·
    6 days ago

    history | grep -E '(sed|grep|awk|perl)' | wc -l 107

    Dang. That’s out of 1000. I need to up my game. Also three of those seds are part of something with a -basedir and don’t count.

    So yeah, about 10% of my commands are iterating shell pipe things for poops and giggles, I guess.

    … and this got me going down the rabbit hole of writing a filter for my history to pull out the first command on the line. This is non-trivial because of potential preceding variable assignments. Most used commands are currently apt and man and ls. I think apt is a Spiders Georg situation because the system is fairly fresh and I keep finding things that I haven’t installed yet. Also I went through a patch of trying to parse its output.

    … oh, er… unga bunga.

    • flying_sheep@lemmy.ml
      link
      fedilink
      arrow-up
      1
      ·
      edit-2
      5 days ago

      I just use nushell’s builtins instead of wrangling with IFS and bash idiosyncrasies. It’s been years since I’ve corrupted data by parsing text wrong.

      But even if someone doesn’t want that: apart from using it in legacy scripts, grep is just a strictly less useful ripgrep these days, no?

    • leftzero@lemmy.dbzer0.com
      link
      fedilink
      arrow-up
      8
      ·
      6 days ago

      Programming would be great, if it wasn’t for computers (and users, too, but those would stay away without the damn computers).

      (Don’t get me wrong, I love computers, they’re great, as long as they stay turned off.)

  • 9point6@lemmy.world
    link
    fedilink
    arrow-up
    17
    ·
    edit-2
    6 days ago

    Oh, I guess I’m a stoneager with a penchant for functional elitism then.

    Though I will admit OOP is valid for involved data modelling, everything else should be functional though.

    I’ve also trained myself out of most short variable names for maintainability reasons

    • masterspace@lemmy.ca
      link
      fedilink
      English
      arrow-up
      14
      ·
      edit-2
      6 days ago

      Outside of the for loop counters i and j, short variable names are awful. Coming back to old code written with abr var nams is like talking to someone in the military who just constantly throws out jargon and acronyms that they know you don’t know.

      But so are Java style ObserverFactoryManagerTemplateMachinistTemplater names.

      There’s a sweet middle ground of short, but actually descriptive name. Sometimes it’s not possible but that’s usually a code organization / language / framework smell.

      Too short variable names is usually a sign that you need to use a proper ide, with auto complete, or that you need to use a proper build process that will minify your code after the fact.

      Too long names are usually a sign that your module of code (function, class, namespace, etc) is too large, or that your language/framework naming conventions are too strict, or the language doesn’t encapsulate scope properly.

      • red_tomato@lemmy.world
        link
        fedilink
        arrow-up
        8
        ·
        edit-2
        6 days ago

        Outside of the for loop counters i and j, short variable names are awful.

        I’ve started to prefer writing it out as ”index” or ”iteration” even in for loop counters. It’s easier to read, and not much harder to type.

        • FishFace@piefed.social
          link
          fedilink
          English
          arrow-up
          6
          ·
          6 days ago

          Keeping things that can be on one line to one line is a good reason to use short variable names where it won’t be confusing. Writing “iteration” sounds absolutely perverse!

          The thing is, everyone understands i and j. The reason calling variables hcv or iid is dumb is because noone knows what that means - quite a different situation.

          • red_tomato@lemmy.world
            link
            fedilink
            arrow-up
            5
            ·
            6 days ago

            Writing “iteration” sounds absolutely perverse!

            I like it to make it clear when the for loop is about iterating lists and when it’s not. For example, the iterations in Monte Carlo algorithms doesn’t correspond to items in a list.

            • silasmariner@programming.dev
              link
              fedilink
              arrow-up
              3
              ·
              edit-2
              6 days ago

              I is a vowel too but you sure can!

              Edit: also I noticed you dropped one ‘y’ but not the others. Is this an accident or some subtlety to do with y’s ‘semi-vowel’ status? To be discussed.

              • lad@programming.dev
                link
                fedilink
                English
                arrow-up
                2
                ·
                6 days ago

                I had to leave most of first letters, and sometimes if all vowels are removed there’s nothing left

                But yeah, we need a committee and come up with a standard for that

        • masterspace@lemmy.ca
          link
          fedilink
          English
          arrow-up
          3
          ·
          6 days ago

          I typically do too, or userIndex or something for nested loops, but I will accept i and j for the first two levels of nesting when reviewing a PR because they’re such a convention. I wouldn’t accept variable names like that anywhere else though and try and avoid them myself.

      • marcos@lemmy.world
        link
        fedilink
        arrow-up
        5
        ·
        6 days ago

        The length of variable and function names should be proportional to the size of the code that can potentially call them. And preferably segmented in namespaces, explicit modules, or something like that.

    • Valmond@lemmy.dbzer0.com
      link
      fedilink
      arrow-up
      4
      ·
      6 days ago

      Yeah, it’s wild people “don’t like OOP” 100%, it’s like most good things, don’t put it where it shouldn’t be.

      • ozymandias117@lemmy.world
        link
        fedilink
        English
        arrow-up
        3
        ·
        6 days ago

        If you’re really going down that route, you need to also remember that even the C programmed Linux Kernel is highly OOP

  • andioop@programming.dev
    link
    fedilink
    English
    arrow-up
    15
    ·
    6 days ago

    OOP boilerplater except for the Windows bit; trying to slowly move off proprietary software and choose open source when I can

  • dreadbeef@lemmy.dbzer0.com
    link
    fedilink
    English
    arrow-up
    6
    ·
    5 days ago

    ocaml and haskell and erlang power like… a shitton of industry production code. If erlang software disappeared, internet dies for a bit until people replace all the broken routers.

    • passepartout@feddit.orgOP
      link
      fedilink
      arrow-up
      5
      ·
      6 days ago

      Rust introduces some pretty awesome concepts, but I see why it might be controversial to some. I (sadly) have no use case for it though.

      • flying_sheep@lemmy.ml
        link
        fedilink
        arrow-up
        5
        ·
        5 days ago

        I think the “controversy” is just tribalism. I’ve never once witnessed a case of any of the negative adjectives thrown at the Rust community. They’ve always taken exceedingly fair and good-faith approaches to discussing any critique of the language.

        Their snark is reserved for the weird “anti-woke” crowd that hates Rust for some reason.

  • freohr@lemmy.world
    link
    fedilink
    arrow-up
    8
    ·
    6 days ago

    Uses neovim with gruvbox theme on arch

    Damn, why are you calling me out personally? Though I use it to write python scripts and LaTeX, not rust…