this post was submitted on 25 Oct 2026
377 points (95.2% liked)

Programmer Humor

34156 readers
2455 users here now

Welcome to Programmer Humor!

This is a place where you can post jokes, memes, humor, etc. related to programming!

For sharing awful code theres also Programming Horror.

Rules

founded 3 years ago
MODERATORS
 

Mine is that the useState hook is an actual plague on the entire React ecosystem. Regardless of your opinions of React, if you wanna use something then use it right.

you are viewing a single comment's thread
view the rest of the comments
[โ€“] MarauderIIC@lemmy.zip 3 points 3 weeks ago (2 children)

Every problem in computer science can be solved by adding another layer of indirection.

Whatever is displaying the MR formats it. The server saves a normalized copy.

Like crlf/lf. But for all formatting.

[โ€“] onlinepersona@programming.dev 1 points 3 weeks ago (1 children)

Like crlf/lf. But for all formatting.

Sure. Toooootally the same thing. Now the server will have to save a copy of your formatting preferences, checkout the project at point t-1, checkout the project at t, format it, create a diff, and present that to you. Now when you leave a comment on line x, it might be line y for another person.

Or make it worse, someone introduces malicious code with UTF-8, or switches around parameters, or adds pragma comments that fundamentally change your code, but your formatter happily fixes that for you in the preview so you are oblivious.

Or you're hosting this server and someone makes a change that completely reformats the entire codebase, but you see absolutely nothing of it because the preview diff only shows "relevant" changes.

All fine by you๐Ÿ‘Œ

[โ€“] MarauderIIC@lemmy.zip 1 points 2 weeks ago (1 children)

Paragraph 1 is all client side viewer, moot

Pragmas aren't formatting; strawman

Paragraph 3 is literally the problem being solved

Sure, put your head in the sand. Your solution is perfect and can never be abused, Sir. You're always right, Sir.

Right. You can still put that through a linter; the linter just wouldn't be concerned with human-readability.

In any case, my editor would not hardcode my display preferences, so if I open and save a document, nothing changes except what I actually changed.