News for hackers. Stuff that matters.
Re:Facts every web dev should know before they burn out and ... by crooked-v on Wednesday October 20, 2021 @10:56PM (#28939696)
> You have to jump between 4 different repositories to fix a small bug. etc etc etc.

For me this one also seems inevitably connected to the idea of microservices, where people set them up in the worst possible way (de facto tightly coupled interfaces but with REST or RPC calls in the way, separate git repos, multiple databases and multiple Docker/Kubernetes deployments for even small projects, etc etc) and so add huge amounts of developer overhead to web apps that would have been single Rails projects back in the day.

Re:Facts every web dev should know before they burn out and ... by Trasmatta on Wednesday October 20, 2021 @11:19PM (#28939808)
I refuse to work for any company that does microservices again. Or the "distributed monolith" spaghetti that it usually ends up being. It's an exercise in misery.
Re:Facts every web dev should know before they burn out and ... by Aeolun on Wednesday October 20, 2021 @11:27PM (#28939854)
I can deal with lambdas if every lambda has the entire application inside.
Re:Facts every web dev should know before they burn out and ... by abraae on Wednesday October 20, 2021 @11:27PM (#28939846)
That's a little extreme.

Maybe instead you could probe at interview time whether they are happy with their microservices, how many do they have, do they feel happy that the service boundaries they finished up with are the best possible etc.

Not all microservice setups are shit shows.

Plenty of monoliths are.

Re:Facts every web dev should know before they burn out and ... by pjerem on Thursday October 21, 2021 @12:01AM (#28940071)
> Maybe instead you could probe at interview time whether they are happy with their microservices

There is no way anyone tells you in interview that the codebase is crappy or that they are unhappy with.

You’ll always be told « well, like everywhere, we have legacy, but we learnt for it and now every new project is in [put REST + shiny front tech here] and we are happy with it. We migrate step by step ».

And then you’ll realize that the codebase they called legacy is what makes the company’s money, it’s not that bad compared to new project and is a pain to maintain because nobody works on it anymore except for urgent bug solving.

So, they’ll probably tell you that « they are happy with their microservices » (or quite happy) because they already try to fool themselves about it.

Re:Facts every web dev should know before they burn out and ... by Trasmatta on Thursday October 21, 2021 @12:29AM (#28940274)
This is so accurate it hurts. No interviewer is ever going to say "dude, our codebase is terrible. The CTO wrote most of the core logic 9 years ago and everybody is afraid to touch it, so we just paper over it with increasingly complex interfaces and abstractions. There are like 25 different ways of doing everything, because every 6 months a dev comes in and thinks we should use their favorite new design pattern everywhere, but then gives up halfway through implementing it. Everything is either massively over engineered or complete spaghetti."
Re:Facts every web dev should know before they burn out and ... by zimpenfish on Thursday October 21, 2021 @04:14AM (#28941748)
To be fair, I have had that conversation in a couple of interviews but then I'm usually coming in as a contractor to patch up these kind of things.
Re:Facts every web dev should know before they burn out and ... by lmm on Thursday October 21, 2021 @12:00AM (#28940070)
> Not all microservice setups are shit shows.

Yeah they are. One service per team, the thing that Amazon was originally doing that was the inspiration for all this, works, but you wouldn't call that "microservices" these days; the thing that people call "microservices" is always a shit show.

Re:Facts every web dev should know before they burn out and ... by ratww on Thursday October 21, 2021 @04:36AM (#28941887)
I've worked at one of those "one service per team" and, boy it was the suckiest most incredibly stupid thing ever.

I needed a place to store marketing and PR templates that were completely unrelated to the core of our product.

Of course the rule was "one service per team", so the CTO demanded that I store it together with our service, which is the part that performs customer authentication. Meaning, the part that is responsible for securing customer data and everything else. Whenever we had auditors checking it they're puzzled as to why there's marketing material storage inside the auth microservice.

This could have been the poster-child example of a good place do have a separate service, but no, the law was the law.

It's almost as if there's no such thing as a silver bullet.

Re:Facts every web dev should know before they burn out and ... by lmm on Thursday October 21, 2021 @07:46PM (#28952231)
So why was the team that did customer authentication responsible for marketing and PR templates?
Re:Facts every web dev should know before they burn out and ... by ratww on Friday October 22, 2021 @03:58AM (#28954675)
Because "one thing per team" is equally as idiotic and bureaucratic as "one service per team". The company was technologically dysfunctional, not organisationally dysfunctional.
Re:Facts every web dev should know before they burn out and ... by Trasmatta on Wednesday October 20, 2021 @11:32PM (#28939881)
Why is it extreme? There are plenty of companies out there that don't do microservices. There's no need for me to work for one that does. Maybe I'll miss out on a job with an incredibly well architected microservice that I would love, but I'm perfectly content with missing that (rare) job.

I've found it incredibly hard or impossible to gauge the quality of a codebase during interviews. (Beyond immediate red flags like "oh, we don't write any tests or do code reviews" or whatever.) And to be honest, most codebases are bad, it's just a matter of degree. And I would almost always prefer working in a bad monolith than bad microservices.

Re:Facts every web dev should know before they burn out and ... by ratww on Thursday October 21, 2021 @04:26AM (#28941831)
> For me this one also seems inevitably connected to the idea of microservices

Oh yeah. But I've seen this also happening in frontend libraries, and sometimes even inside monoliths.

I find that inexperienced developers tend to break up services/libraries/classes purely because they believe that "code should be neatly organized", not because there is a logical boundary between two parts of a system. Thus, we get lots of tight coupling, chatty microservices, and 20 lines of imports at the top of the file.

I find that A Philosophy of Software Design by John Ousterhout [1] has a good rule of thumb: classes (and services, libraries, repos, applications) should be "deep, not shallow". The "surface" (aka the part that touches external components) should be as small as possible, while the internals should be larger. Of course that doesn't sit well with people looking to "neatly organise code".

[1] https://www.goodreads.com/book/show/39996759-a-philosophy-of...

Re:Facts every web dev should know before they burn out and ... by selfhoster11 on Thursday October 21, 2021 @06:08AM (#28942436)
I believe that code should be neatly organised, though I have no preference about how this is accomplished. What would you suggest I should do, if not split classes?
Re:Facts every web dev should know before they burn out and ... by ratww on Thursday October 21, 2021 @06:32AM (#28942578)
You should split classes! But only where it makes logical sense, where there is a clear logical boundary.

Splitting code as a way to visually organize code can lead to tight coupling, which tends to be worse than large classes.

If you split a class but there’s still multiple “points of contact” between both, it wasn’t a good split at all.

Re:Facts every web dev should know before they burn out and ... by selfhoster11 on Thursday October 21, 2021 @06:48AM (#28942677)
People split classes for visual reasons?

That sounds unwise. I only ever split because the class is getting too large, or because some functionality is better off being moved to its own class. And those other classes also should preferably only have one or two methods exposed to the outside, there's nothing worse than a large surface area unless it's a library class.

Re:Facts every web dev should know before they burn out and ... by ratww on Thursday October 21, 2021 @08:00AM (#28943167)
Yep, you are completely right, this is extremely unwise. Problem is, a lot of material aimed at beginner developers basically instructs that. Also a lot of linter documentation shepherds users into doing it (I'm thiking of some Ruby linters here).

> there's nothing worse than a large surface area unless it's a library class

Yep, exactly. Even big classes are better than tightly-coupled classes with large surface area.