top | item 46884173

(no title)

grugdev42 | 26 days ago

Web dev based answer:

I know it's cliche to say it, but most of the tech debt I've seen is on the frontend.

Most backends are relatively simple. Just a DB with lots of code wrapping it. But even the worst backends are relatively simple beasts. Just lots of cronjobs and lots of procedural code. While the code is garbage, it can be understood eventually. The backend is mature... even the tech debt on the backend is a known quantity!

But the frontend... damn the complexity and the over engineering are something unique. I think there is a fetish among frontend developers to make things as complicated as possible. Packages galore and SO MANY COMPONENTS.

As soon as people start inventing their own design system, UI framework, and sub packages I think the frontend is doomed for that project.

discuss

order

muzani|26 days ago

Async really turns FE into a nightmare. Simple concept: user logs in, get userID, get feed associated with ID, get posts on feed, get reacts on post.

Sometimes the tech debt is that BE can't pass this data all at once yet. Fine. Let's fetch it.

But then FE gets creative. We can reduce nesting. We can chain it. We can preload stuff before the data loads. Instead of polling, let's do observers. Actually these aren't thread safe. And you know what, nothing should be in the UI thread because they'll cause delays. And this code isn't clean, one function should do only one thing.

Actually why are these screens even connected? We should use global variables and go to any screen from anywhere. Actually everything can be global. But global is an anti-pattern. So let's call it DI and single page application and have everything shared but everything must also be a singleton because shared immutability is bad too.