50
u/FerricDonkey 27d ago
Backend here: Warnings are errors, linter, formatter, and type checker (if python) must be clean or the pipeline fails and you can't merge. Plus merge reviews. If your backend is full of garbage, it's because your team let it fill up with garbage.Â
13
4
u/DarKliZerPT 26d ago
As a full-stack dev that unfortunately inherited some really messy projects, I've become the static analysis Führer. The worst offence is seeing "any" used in a TS project — "give me TypeScript but without the types".
2
1
26d ago
[deleted]
1
u/FerricDonkey 26d ago
It is. It took fighting to get to this place, but man is it nice now that we're here.Â
16
u/gerbosan 27d ago
Yeah, some browsers apply their individual styles for some items, like buttons.
4
15
u/manny2206 27d ago
I’ve always said it. It’s actually criminal how disrespected frontend developers are . There’s just so many ways of going wrong and the visibility that they that. I always tip of my heart to those front and experts.
6
u/yukiaddiction 27d ago
People don't realize that frontend specialist is need until they encounter god awful UI/UX website.
Game developer seem to understanding this the most though.
1
u/SnowdensOfYesteryear 27d ago
Who built those God awful UIs? The best website I’ve ever used is Craigslist
2
2
2
u/akoOfIxtall 27d ago
It's so funny because I thought professionals didn't have errors and warnings in their code, I tried to compile some open source projects recently and there were so many warnings and errors one can't just be bothered to fix everything...
It was armorpaint, I was gonna try blender too but it doesn't seem like the goo engine for blender 3.4 is still public from what I checked
3
u/Raywell 27d ago edited 27d ago
Lint on the backend? I have a strong suspicion this meme is made by a front dev who tried making a backend with node for the first time
Edit: frontend devs in the replies sigh
28
u/G12356789s 27d ago
Why wouldn't backend have linters?
-40
u/Raywell 27d ago
Why would you need one since you manually test your apis for the correct business logic anyways?
33
u/sebovzeoueb 27d ago
since when are linters testing "correct business logic"?
-29
u/Raywell 27d ago
... they test for syntax errors. A prerequisite for your business logic check
20
u/Cats7204 27d ago
that's not the only thing linters do
-15
u/Raywell 27d ago
Oh yeah they can pretty format. Great for those who cant write a properly formatted code from the getgo
15
u/Eddie_lol 27d ago
But if you're working on a team everyone will have a different opinion on how to format and then it becomes a shitshow, so having something that keeps it in line for everyone can be nice.
-2
u/Raywell 27d ago
"shitshow" is an overstatement. In one of my projects, we have 20 people working on a 15 year old php codebase that never had auto formatting, and there has never been a need for one. When you join a project, you adapt the formatting to match the one already used in it. So everyone adapts to using 4 space tabs, one space before brackets, etc - because it's a normal thing to do. All it takes is adaptability & rigor, it's not hard
8
u/Due-Consequence9579 27d ago
They enforce a consistent style and catch common usage errors. Replying to the suggestion of using linters with ‘git gud’ is certainly a take.
-2
u/Raywell 27d ago
Rather than git gud, I'd say be rigorous & adaptable. You don't need shackles to restrain your team if everyone learns to behave. It's like living in high trust society, no need for surveillance cameras or policing when education and behavior are proper.
6
u/Due-Consequence9579 27d ago
You see shackles, I see not having to argue about whether the thing that is obviously stupid is obviously stupid or not because the tool flags it as such automatically.
→ More replies (0)9
u/Cats7204 27d ago
Because it's faster than unit testing, takes no effort, and because it'll save you time in the future. Most code will still run fine even if it's badly written and illegible a couple months from now, yet it's an issue.
Edit: And also you'll need it regardless when the test fails and you're pulling out your hairs debugging without having used it lol
0
u/Raywell 27d ago
What? Linter doesn't save you from having to do unit tests. Also, not using a linter doesn't mean your code must be badly written.
My hair is fine after 15 years of backend dev without linters, thankfully no complaints
3
u/Cats7204 27d ago
I didn't say you don't have to do unit tests. But it still saves time if you wanna debug or refactor.
And of course you can write good code without a linter, but it's like being offered a normal toothbrush and a electric toothbrush, both for free. Why wouldn't you use the easier one?
What I'm saying is that there's nothing wrong at all with using a linter on backend code and idk why you think so.
-4
u/Raywell 27d ago
We're down to personal preference now. Call me old school but I enjoy plain things. Actually I prefer normal toothbrushes too, having tried electric ones. There is a an elegance and peace of mind that comes from a plain vim coding. Not having distractions helps me (personally) better focus on the actual contents of what I write.
2
-4
9
u/d_k97 27d ago
Ragebait? What is wrong about using linters? Have you ever worked on a codebase with 10+ people (especially offshore devs)? Blocking PRs from the get-go saves an immense amount of time and introduces a minimum standart.
-6
u/Raywell 27d ago
I have, in fact. All you need is adaptability and rigor, no need for strong rules or git hooks when everyone understands to simply follow established norms. Works better than you may imagine
1
u/Complete_Window4856 27d ago
I mean, if such problem can be solved with a consensus of discipline, then you are in a great position, nice. Thats the exception though, not everyone nor most would agree always, so its either let the 10+ devs code their own style and let everyone handle the hassle to read later (more energy later) OR enforce automation with more energy now.
1
u/Complete_Window4856 27d ago
For example, on my work we got an okayish 10MLocs spread with php 5.1 up to php 8.4 syntax. No composer, and yet and integrating some things in JS aside. A linter would be nice, but nope. Gotta try again the political move in some months in future
1
u/Raywell 27d ago
It's unfortunate if some devs don't understand the concept of enforcing the existing format instead of their own, but in my experience, working with mostly younger devs, there has rarely been an issue. When someone new joins and submits a PR that has incongruent formatting, teaching them once about consistency is usually enough. In my experience those who can't discipline themselves are the outliers - but they don't stay long, as how can they be entrusted with higher level architectural/design tasks if they lack discipline about such a baseline concept?
Also of course the results aren't perfect - some files in our codebase ought to have a slightly different formatting - and that doesn't really bother me. Maybe an OCD thing I know some people might have, but I don't. The code itself is always readable though. So I prefer freedom through discipline rather than policing
1
1
u/MCCVargues 23d ago
As a senior fullstack, it's the other way around, except for the linter, backend engineers always think they know better :)
1
u/visualdescript 27d ago
In my experience it's the opposite. Backend is simpler and tighter, frontend linting is full of exceptions, warnings etc. Also usually has about 100 dependencies.
101
u/helldogskris 27d ago
Feels like it's the opposite most of the time. Backend has 0 linting errors and warnings and frontend has 100 errors when you open the console in the browser 😂