I looked into the lemmy src, and what is supposed to be a CRUD API has several layers of abstraction. Same at work, where we have hexagonally structured apps where following any sort of logic is literally impossible. What are your thoughts?

  • Jamie@jamie.moe
    link
    fedilink
    English
    arrow-up
    7
    ·
    1 year ago

    I’ve coded most of my applications in that structure. It makes changing and testing things sane. Plus, if I need to make a large backend change, I can keep the abstractions compatible and have the rest of the app not notice.

    • Cinnamon@beehaw.orgOP
      link
      fedilink
      English
      arrow-up
      4
      ·
      1 year ago

      I don’t know every time I’ve tried to change a beast like that, it was hard and frustrating.

      • jadero@lemmy.ca
        link
        fedilink
        English
        arrow-up
        2
        ·
        1 year ago

        There are a few possible reasons for that, but the main ones are:

        The architecture may be from the rococo (filled with pretty, but ultimately useless and confusing “decorations”) or surrealist (tenuous relationship to reality) schools. This would make it difficult to grasp for anyone but the people involved from the beginning.

        The architecture could be perfectly sound, but for some reason, you are having trouble putting it all together. The most common reason for that is a lack of training and documentation.

          • jadero@lemmy.ca
            link
            fedilink
            English
            arrow-up
            1
            ·
            1 year ago

            Not dumb, untrained or not yet sufficiently skilled in this particular area. While you bear some responsibility for getting up to speed, I would argue that it is still their issue if they are not providing the necessary resources. With something like lemmy, you are probably on your own for finding and making use of those resources. But I would be surprised to learn that those resources don’t exist. I haven’t looked, but there must be some kind of documentation written by someone and a community of like-minded people. Maybe even some tutorials.

            That said, some people will always struggle with certain kinds of abstraction or multiple layers of abstraction. For myself, one thing that I find helpful is to view each layer as an API that I’m targeting or a library that I’m using. In those cases, you never really worry about how things get done in the background.

            Do you really have any idea how the keywords that solicit user input work? Not likely. Even if you do, you still completely ignore the fact that you know it while writing a line of code that solicits user input. That is a layer of abstraction that you use regularly without even thinking about it. A good architecture allows the same kind of reasoning about your code.

            • Cinnamon@beehaw.orgOP
              link
              fedilink
              English
              arrow-up
              2
              ·
              edit-2
              1 year ago

              Isn’t that just saying that I just am not good at my job? I mean, shouldn’t I be able to just grasp it by just looking at it?

              Like I want to contribute to it, but it feels so overwhelming and hard to find anything I need.

              • jadero@lemmy.ca
                link
                fedilink
                English
                arrow-up
                2
                ·
                1 year ago

                Absolutely not! I’m not sure anything in any field is so trivially simple that it can be grasped just by looking at it. Getting even minimally competent in anything requires both study and practice.

                The good news is that study and practice are skills worth acquiring, because they are useful in any endeavour.

                The great news is that study and practice are what’s needed for mastery, too, so once you start your journey, you can can continue as far as you want.

                • Cinnamon@beehaw.orgOP
                  link
                  fedilink
                  English
                  arrow-up
                  1
                  ·
                  edit-2
                  1 year ago

                  I’ve been doing this shit for 3 years, and yet I have issues grasping fucking lemmy src

                  I apologize for my harsh tone, but you can see why I’m upset that I can’t read it properly.

                  • jadero@lemmy.ca
                    link
                    fedilink
                    English
                    arrow-up
                    2
                    ·
                    1 year ago

                    Well, sure, it’s frustrating. I haven’t looked at lemmy code, so maybe it is a dumpster fire. But I’ve been programming since about 1980, and I still stumble more than I’d like, even when I’m the one who wrote the crap I’m trying to figure out. :)

                  • ZeroNationality@lemmy.one
                    link
                    fedilink
                    English
                    arrow-up
                    0
                    ·
                    1 year ago

                    Developing for Lemmy or developing in general?

                    If you’ve only been developing for 3 years then you’re not much beyond a junior. Nobody (least of all yourself) should expect you to be able to just sit down and grok a rust codebase using actix.

                    What you appear to be lacking right now is patience and experience. They both come with time.