this post was submitted on 17 Jun 2023
18 points (100.0% liked)

Programming

13386 readers
2 users here now

All things programming and coding related. Subcommunity of Technology.


This community's icon was made by Aaron Schneider, under the CC-BY-NC-SA 4.0 license.

founded 2 years ago
MODERATORS
 

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?

you are viewing a single comment's thread
view the rest of the comments
[–] Jamie@jamie.moe 14 points 1 year ago (1 children)

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.

[–] CinnamonTheCat 5 points 1 year ago (1 children)

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

[–] jadero@lemmy.ca 4 points 1 year ago (1 children)

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.

[–] CinnamonTheCat 3 points 1 year ago (1 children)

So either their issue or I'm dumb, probably the latter.

[–] jadero@lemmy.ca 5 points 1 year ago (1 children)

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.

[–] CinnamonTheCat 3 points 1 year ago* (last edited 1 year ago) (1 children)

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 5 points 1 year ago (1 children)

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.

[–] CinnamonTheCat 1 points 1 year ago* (last edited 1 year ago) (2 children)

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 3 points 1 year ago (1 children)

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. :)

[–] CinnamonTheCat 2 points 1 year ago

:( I'm just depressed at the moment as this thread made me feel bad about my programming

[–] ZeroNationality@lemmy.one 2 points 1 year ago (1 children)

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.

[–] CinnamonTheCat 2 points 1 year ago (1 children)

In general, I've been doing this for like 5 or 3 years.... this as in programming. Actix-web is no problem here, it's just the architecture that seemed to stump me.

I apologize for earlier, but depression is a real bitch at times, and I can have these moments where I just... go off the rails.

[–] ZeroNationality@lemmy.one 3 points 1 year ago

No worries. Depression is a bitch.