• pinchcramp
    link
    fedilink
    English
    34
    edit-2
    1 year ago

    Bash script. Not necessarily hard to understand but very unintuitive in my opinion. I’ve written so much bash script over the years and still have to look up how to do simple things like iterate over associative arrays or do basic string manipulation. Maybe it’s just a me problem though 🤷

    • Lupec
      link
      fedilink
      61 year ago

      Yup, same. I’ve been a developer for years and used to code way before that and to this day I can’t write any non trivial bash script without looking up half a dozen of things lol, glad I’m not alone.
      I’ve recently come across nushell, and it’s everything I’ve ever wanted when it comes to shell scripting. It’s not POSIX compliant so you can’t just run it anywhere but it helps keep my sanity in personal projects and whatnot. See also, elvish, xonsh.

    • JackbyDev
      link
      fedilink
      English
      31 year ago

      Yeah, anything to do with iterative over strings. Basically anything that involves IFS is unintuitive.

    • @atheken@programming.dev
      link
      fedilink
      21 year ago

      My running joke, after four different friends told me they were using ChatGPT to help them with it, is that the language is so hard to learn that we invented an entirely new class of AI to help.

      It’s a joke, of course, but it does have some “surprising” syntax, since some stuff is whitespace sensitive, and there are subtle differences between () and [] and [[ ]], for example. All of that’s due to the long history of shell behavior, so I don’t necessarily blame bash.

    • UFO
      link
      fedilink
      21 year ago

      I don’t think it’s just a you problem :)

      I’ve been curious to try fish or zsh to hopefully run into less weirdness.

      • pinchcramp
        link
        fedilink
        English
        2
        edit-2
        1 year ago

        I don’t think it’s just a you problem :)

        I didn’t think so. I guess Reddit has conditioned me to not state my opinion without a disclaimer, lest someone wants to start arguing :D

        Btw. I don’t think you’ll find ZSH more intuitive to program. While it is an awesome interactive shell, the scripting part is Bash taken to the extreme.

    • qevlarr
      link
      fedilink
      21 year ago

      Uh? It’s about what I expect. Anything in particular?

    • @space@lemmy.dbzer0.com
      link
      fedilink
      11 year ago

      I honestly don’t think it’s so bad. There are some things which make it look ugly, the Hungarian notation, the fact that it’s a C API which means everything has to be functional and there are many limitations, and there is a lot of legacy stuff kept for backwards compatibility. There is a lot of "we did it this way before we knew the right way of doing it, but now we’re stuck with it because of backwards compatibility.

      I think MFC is a lot worse. It’s basically a C++ API that wraps a lot of things from the win32 API. It heavily relies on macros, and I really dislike it in general. And don’t get me started on COM.

  • @0xc0ba17@sh.itjust.works
    link
    fedilink
    131 year ago

    The hardest languages to learn are the ones that have a different paradigm than the ones you’re used to.

    Most modern languages today somehow derive from C, in a way or another. JavaScript, Go, PHP, Java, C#, even Python… If you’re used to one of these languages, you should be able to get a high level understanding of code written in other languages. Some like Rust can be a bit harder when diving into idiosyncrasies (e.g. borrow checker and lifetimes), but it’s not too hard.

    But if I encounter a Lisp, or a more domain-specific language like Julia or Matlab, I need to put in a lot more effort to understand what I’m trying to read. Though Lisps are inherently simple languages, the lack of familiarity with the syntax throws me off.

    • @Klear@lemmy.world
      link
      fedilink
      31 year ago

      I’m not much of a programmer, but when I was a kid I used to play around in QBasic. Then dropped all programming for decades and picked up Lua a few years back. Made me realise it’s more of a dialect than a new language.

    • @SpeakinTelnet@programming.dev
      link
      fedilink
      1
      edit-2
      1 year ago

      From personal experience making the jump from Python to Julia was overall painless, it was probably made to be as well. I do agree that rust on the other end is something else. Even after clearing the whole rustlings course I was still brute forcing my way through code by relying on the compiler to tell me where borrowers were missing. Spoiler: everywhere!

    • @AA5B@lemmy.world
      link
      fedilink
      1
      edit-2
      1 year ago

      I had the most problems with Ruby, or was that Rails. However I have to admit I gave up quickly. It left me with the impression the language itself doesn’t do much but the magic is all in the framework. You can’t follow the logic but have to know where things are, you have to know whatever assumptions the framework started with, but they don’t seem to be set anywhere.

      That was the paradigm jump I didn’t make, didn’t want to make. APL was just so much more straightforward, because it was logical. Variants of C and Java are all pretty easy. PERL and Groovy have been two of my favorites except I’m a strong believer in strict variable typing. I have to admit Python took some getting used to, because who makes spacing part of your code structure these days: I thought we gave that up many decades ago. The COBOLs of the world are pretty focused - I’m not sure if even call them a programming language, but fairly easy to embed a query or report in a real language

  • @ComradeWeebelo@lemm.ee
    link
    fedilink
    121 year ago

    I find syntax wise, Rust is very closely bordering on esoteric. My employer is currently considering switching to Rust and I can say working in a department with a bunch of Data Scientists with varying degrees of programming experience and capability, this switch, if it happens, will probably be poorly received.

    • Prayers man.

      We brought in a dept of data scientists when we bought a company.

      I never witnessed the worse code ever.

      I don’t know if they were all 1y bootcamp grads or something. I thought math formulas was supposed to be elegant. But everything was written top-down, no reusability, like coding excel formulas that feed one cell into another and takes a hour or two to calculate. I nope’d so fast out of one “system” they built which was just daisychaining SQL queries into a new file that is fed into another SQL query repeat 7 times.

      • @0xc0ba17@sh.itjust.works
        link
        fedilink
        71 year ago

        Mathematicians and scientists are notoriously awful programmers. They get shit done but with absolutely 0 regard to good practices and reusability.

        • @Wojwo@lemmy.ml
          link
          fedilink
          11 year ago

          It’s kind of like hiring a bunch of physicists to design a bridge. It’ll probably be a great bridge, but also probably overly complex, expensive and late. And for some reason made out of a novel alloy.

      • UFO
        link
        fedilink
        3
        edit-2
        1 year ago

        I’ve experienced similar.

        One thing that helped: separating research code from production.

        Research is to answer a decision problem and much of the optimization problems that are in software engineering do not, and should not, apply.

        Once the research problem is answered. Reproducing that answer with production quality systems should be it’s own project. This also serves as a reproduction of the science in the research. Satisfying that hallmark of the scientific method.

        Course, getting a company to agree to such an arrangement is near impossible. Especially if they have never been crippled by the mismatch expectations of putting research code in production.

        As that is an organizational problem not just an engineering problem, good luck convincing management.

        An alternative, if I can’t get such an arrangement is the building a platform that supports integration of research code. That can be… uh… hard. Aside from the people challenges not all tech can support such a platform.

    • Bruh on one post people are bandwagoning rust and then on another post people calling it esoteric 🤣 hard to see what’s what past the hype. I mostly code in Python though so I might need to find out for myself

    • @Jummit@lemmy.one
      link
      fedilink
      81 year ago

      Actually one of the few languages you can learn in its completeness in less than a day, so I wouldn’t really say it’s “hard to understand”. More like hard to read and understands programs written in it.

  • JackbyDev
    link
    fedilink
    English
    101 year ago

    C and C++. The pointer syntax being slightly different than the pointer declaration syntax always confuses me to no end. I conceptually under pointers perfectly but their syntax is wack.

    • @miversen33@lemmy.world
      link
      fedilink
      01 year ago

      C is simple. Like really simple. Hardly anything exists in C lol. You have Integers, floats, chars, arrays, functions, pointers and structs. That’s it.

      Therefore reading C isn’t too difficult.

      Now doing anything in C? Lol have fun with that, nothing exists in C.

      C++, you’re absolutely right lol the standard lib in c++ is so god damn big I don’t even know where to begin when using it. And there’s like a billion different ways to approach a problem there.

      I like C. I don’t like working on C just because if you want a hashmap you must first build the universe lol. But c is fun.

      I’ve been finding that same fun feeling in Rust though I haven’t used it long enough to know whether that’s just the “ohh new shiny” fun or “I really like this” fun.

      • JackbyDev
        link
        fedilink
        English
        11 year ago

        Reading anything to do with pointers in C is confusing to me. Sorry to disappoint you.

        • @miversen33@lemmy.world
          link
          fedilink
          01 year ago

          A pointer is nothing but an integer that “points to” a memory location.

          They can feel intimidating because it’s really easy to footgun with them, but they are not as complicated as they appear :)

          • JackbyDev
            link
            fedilink
            English
            21 year ago

            The pointer syntax being slightly different than the pointer declaration syntax always confuses me to no end. I conceptually under pointers perfectly but their syntax is wack.

  • V H
    link
    fedilink
    9
    edit-2
    1 year ago

    Ignoring the intentionally esoteric languages, of languages in actual use: J, K. Any descendant of APL, basically, and APL itself, though arguably APL is less obtuse than many of its descendants.

    E.g, quicksort in J (EDIT: Note Lemmy seems to still garble it despite the code block; see the Wikipedia page on J for the original and other horrifying examples)

        quicksort=: (($:@(<#[), (=#[), $:@(>#[)) ({~ ?@#)) ^: (1<#)
    

    (No, I can not explain it to you)

  • @lysdexic@programming.dev
    link
    fedilink
    English
    71 year ago

    Objective-C and Objective-C++ are an abomination. Extending languages with other language constructs is ok, I guess, but I find Apple’s extremely poor documentation to worsen a situation that’s already quite bad.

    • JackbyDev
      link
      fedilink
      English
      51 year ago

      Objective C++ sounds scary. Two object systems living totally unaware of each other.

  • @glad_cat@lemmy.sdf.org
    link
    fedilink
    71 year ago

    C++ because you have multiple versions, you can write in different styles (C, OOP, functional, meta-stuff, very low level like assembly, very high level like Python), it has undefined behaviors, and you can waste your whole life optimizing code.

  • Fearing a bit to say it but Haskell. I know that it is a different concept, but it’s not just that for me. The way the elements are separated, sometimes spaces sometimes symbols, makes it hard for me to understand how things are grouped, and what gets plugged into what.

    • I agree. OCaml too. I think there are several factors that lead to it being very difficult to read other people’s code:

      • Currying and lack of syntax in general means you have to be a human parser for basic things like “which part of the text is a function name? which bits are arguments?”. Often it’s impossible to tell without looking up the function definitions.
      • The functional style - while generally great - also makes it very tempting for people to write enormous heavily nested functions where the control flow is hard to follow. You sometimes get assignment expressions that are hundreds of lines long.
      • Haskel & OCaml feature global type inference. Programmers often omit explicit type annotations which very often means that function types are inferred as generic. This means you lose several huge benefits from static types. For example you can no longer look up the types that will actually be passed into the function, and inferring the authors intent is much harder. It also makes error messages way more confusing.
      • I don’t know why but Haskel and OCaml programmers love stupidly short identifiers.
      • They also abhor comments.
    • JackbyDev
      link
      fedilink
      English
      11 year ago

      Same here. The syntax is just different enough from the C family for it to totally scramble my brain.

    • V H
      link
      fedilink
      11 year ago

      The most delciously evil part of INTERCAL is “COMEFROM” (though COMEFROM was proposed a number of times as a joke long before INTERCAL)

  • @onlinepersona@programming.dev
    link
    fedilink
    English
    21 year ago

    Haskell. I’ll just repeat what I said elsewhere: monads are escape hatches to imperative programming. The majority of haskell code I’ve read in projects must’ve been written by imperative programmers who picked up haskell, because there are monads everywhere.

    But the hardest to read are List, then C, then C++. Even PHP is easier to read.