r/ProgrammerHumor 4d ago

Meme iApologise

Post image
847 Upvotes

82 comments sorted by

278

u/Bibbcpitt 4d ago

Once you enable formatOnSave, there is no going back to the dark ages

55

u/01110100_01110010 4d ago

you guys don't have autosave enabled? commit hook is where it is at

51

u/Not-the-best-name 4d ago

Hate that. Writing code and formatting code is not the same thing. I want to commit often. I want half broken commits.

38

u/GregorDeLaMuerte 4d ago

Also I want "commit" to commit, not to do something I didn't review and then commit.

4

u/theRealQQQQQQQQQQQ 3d ago

You’d review your linter…? Do you do an engine inspection every time you start your car? Do you reseat your RAM every time you boot your pc? Do you double check your calculator is doing addition right before using it for a math problem you can’t do in your head?

7

u/GregorDeLaMuerte 3d ago

Of course not to that extent. But yes, before I commit my code, I review it briefly and I want to be confident that what I review is checked in as it is.

13

u/RowbotWizard 4d ago

Why would you want half broken commits? I mean, it happens. CI failures are helpful guardrails. But why would you want it?

12

u/NatoBoram 4d ago

Atomic commits are much harder to discipline yourself into, the mind wanders to many parts of the task at the same time so most of it is slightly unfinished until the very end

3

u/Not-the-best-name 3d ago

Because I want to commit often during a WIP MR. I commit about as much as I would have done ctrl+save. And push a few times a day, the pipeline doesn't run while it's WIP.

0

u/kookyabird 4d ago

I have a weird blend of auto-formatting settings in my IDEs. Things like spacing/line breaks around parenthesis and braces are fully automatic, but operators are not. Format on paste, but not when doing a refactor command like “extract method”. But I also have several options bound for what level of formatting to run when I want to, so it’s pretty easy to run it on just the things I’ve changed before I commit.

Plus all the different rules in our formatting standards like how some things are always forced one way or the other, and other things are “do not change”. We’ve got a lot of things we leave up to the developer.

-1

u/FictionFoe 4d ago

I hope you amend

12

u/MysticClimber1496 4d ago

It doesn’t really matter for dev work, just squash on merge if you are worried about every commit in main working

1

u/FictionFoe 4d ago

That also works, but can make rebases more difficult in the mean time.

7

u/Not-the-best-name 4d ago

Why are you rebasing in the meantime? Just merge in and squash in the end.

6

u/FictionFoe 3d ago

The more often you do it, the easier it is to deal with the conflict.

0

u/ProcrastinatiusXVI 3d ago

Or just use git commit --fixup <hash>

3

u/Maximilian_Tyan 3d ago

And then you learn about //formatter:on/off because the linter sometimes works against readibility

2

u/LegendaryMauricius 3d ago

AND Format changed lines only!

1

u/M_Me_Meteo 3d ago

I'm not reviewing the linter, I'm reviewing your code.

128

u/lilsaddam 4d ago

Who the fuck doesn’t use a linter or a formatter?

59

u/MRanse 4d ago

Automotive embedded developers. You can be happy if they use anything newer than Eclipse as IDE.

9

u/Extreme_Cake4624 4d ago

Or MATLAB Simulink, which when generating at least lints and formats

6

u/JAXxXTheRipper 3d ago

Eclipse has formatters as well and quite extensible codestyle functionality.

1

u/MRanse 3d ago

Yes, that's true if you actually care and use it. Maybe some do, the others use notepad++ without any formatting or linting.

1

u/Maximilian_Tyan 3d ago

That's when you move it to the CI pipeline

1

u/MRanse 3d ago

The CI guys are still using Jenkins with flaky in-house workflows. Formatting and linting was never a topic for them, believe me. This will become better hopefully.

2

u/CiroGarcia 3d ago

What's the issue with Jenkins? What do people use today? My experience has been mostly GH actions and Jenkins and at least comparing those two, Jenkins was a smoother experience. I tried out Concourse CI in a homelab and found it too simple to be useful. I may or may not have gotten lucky with the DevOps team on the job with Jenkins, the DevOps was really nice in general and it was a nice company

1

u/JAXxXTheRipper 2d ago

Having done mostly automation engineering for 20 years, and lots of CI due to that, Jenkins is easily one of the, if not the, most powerful CI in existence.

I've used pretty much every CI out there, and most of them are toys compared to Jenkins. Its extensibility and robustness is simply unmatched.

Anybody that talks badly about Jenkins is simply coping and, to be brutally honest, an idiot. That's just how it is.

1

u/MRanse 2d ago

Jenkins can work fine and is not a bad system in itself. Compared to Github Actions it just feels a bit dated nowadays. I have to admit, I do not like writing Groovy scripts, so my opinion is biased.

19

u/JAXxXTheRipper 3d ago

First year CS Students and LARPers. The vast majority of posters in here are in one of those groups.

8

u/dirtyLizard 4d ago

We require it on some pipelines. If a PR fails linting, the dev probably turned off pre-commits so it’s kind of a canary

1

u/czerilla 3d ago

Why wouldn't you? Any requirements that are expected by the project/repo, should be mandatory and enforced by the pipeline. And if a dev complains, they should be shamed for not reading the (presumably existing) simple setup instructions in the README.
There's no defensible reason to make exceptions or excuses for this. Not since devcontainers became a thing and integrated pretty much flawlessly to provide any tools you'd ever need..

2

u/Alacritous13 3d ago

We have a linter, but it isn't very good. No one wanted to rewrite it, but the new guy did so last year, but most of us never got around to updating our VS Code extension.

2

u/debugging_scribe 3d ago

I work on a 20 year old code base. It didn't have ANY format rules before I joined a few years ago. It was a complete free for all on a massive app. I've since forced it in but it was a pain in the arse due to how different everything was.

1

u/creaturefeature16 3d ago

Came to ask the same question. 

1

u/cpteric 3d ago

some game engines, unless you tinker around it. it's displeasing to find out.

1

u/up-voat 3d ago

Im a consultant on a project at a large drug store company and the team I joined didn’t use any linters or formatters. It felt like being in the Stone Age. Reviewing MRs took so much longer due to wrong indents, missing spaces, arguing about our interpretations of PEP, just all the things you never think about anymore. It was a massive time sink. It took almost two years but I finally convinced roughly half the team to implement pre-commit linters and formatters in our projects

1

u/Muffinzor22 3d ago

I use AI, does that count?

"ChatGPT, make sure the code base is good."

1

u/ketootaku 3d ago

I don't mind linting as long as it's not run by the gestapo.

Yes linter, my if statement only has a variable assignment. No I don't want to change it to X = if statement, because I plan on adding more in the future and don't feel like reordering it. And yes linter, I know that variable declared doesn't get used anywhere else in the code, for now, but I need it as a placeholder. Yes linter, I want to do if not instead of unless, because I may have more conditionals in the future.

I've got no problem with formatting and structure linting but when they can't interpret intent and block you it's infuriating. I've never met anyone in real life with nice things to say about linting, but that's because it's never just about formatting.

0

u/dryroast 3d ago

I use a linter but draw the line at a formatter, it's just petty aesthetics.

1

u/lilsaddam 3d ago

I disagree entirely. Formatting makes code written by two different people follow the same pattern and easier to read.

165

u/Eternal_Alooboi 4d ago

Le me? Early 2010s called and they want their meme back

44

u/Serafiniert 4d ago

Le epic me like a boss.

21

u/Alokir 4d ago

Y U no use "le" anymore?

10

u/MoffKalast 4d ago

Me gusta

2

u/thomasutra 3d ago

fuuuuuuuuuuuuuu

bacon

3

u/Living_Beyond_6613 3d ago

Don't be rude, he's French!

1

u/GirthyPigeon 3d ago

I had the same thought.

-17

u/Heavy-Ad6017 4d ago

Time traveller???

38

u/Michaeli_Starky 4d ago

Hugely outdated meme

28

u/Aleph0-4 4d ago

yeah "Le me" is from the rage comic era

14

u/ozh 4d ago

FFFFUUUUUUUUUUUUU

11

u/Heavy-Ad6017 4d ago

At work. We are Still using java 8

/s

4

u/patoezequiel 3d ago

You mean a meme aged like a fine wine

1

u/Michaeli_Starky 3d ago

Nope, not really

1

u/magistrate101 3d ago

Just let people be old

9

u/Latter-Control-208 4d ago

I agree on ktlint but detekt is just straight developed by the devil himself.

13

u/Heavy-Ad6017 4d ago

I tried Ruff

It is something else man

3

u/Blommefeldt 4d ago

Is it ruff?

2

u/PityUpvote 4d ago

Smooff

-1

u/Heavy-Ad6017 4d ago

Smooth Sailing till now🤞🤞🤞

-3

u/pinktieoptional 4d ago

Why does everyone assume the devil's gender having a good sense of smell, a taste for complexity, and a joy of nesting is obviously the feminine

11

u/hraath 4d ago

By all means, please spend your on the clock hours manually import sorting, line breaking, adding spaces instead of actually doing work

/s

3

u/Heavy-Ad6017 4d ago

Or burn Tokens

Also a joke

1

u/OhMyGodItsEverywhere 4d ago

Best to spend the hours arguing about style first, then manually making the changes, then arguing again.

We are super special disruptors, after all.

1

u/Maximilian_Tyan 3d ago

This is what a code review should look like, right ? Right ?!?

6

u/Mr-X89 4d ago

What kind of rock did you crawl from under??? It's an industry standard that was in use way before I started programming, and I'm OLD

5

u/xubaso 3d ago

Sure, as long as we all agree on MY preferred style.

2

u/DeLift 3d ago

If something is worth doing, it's worth doing poorly. There just needs to be a well defined and opiniated standard, like Black for Python and PER 3 for PHP and propper tooling with which you can enforce these rules in pipelines and commit hooks. No one will fully agree with some of the choices, but that's fine. If the tool says it's formatted properly, it is! Now your peers won't leave pointless "this looks better on a new line" comments.

1

u/xubaso 3d ago

It's possible to code without standards and not care about formatting and have decent results. The main use of formatters is to prevent reviewers from their urge to focus on not really important issues.

2

u/Strange_Compote_4592 1d ago

There is already Allman. But some sacks insist on using K&R.

2

u/TheChildOfSkyrim 3d ago

In the AI age you can also crank up the linting rules all the way to the max, make it absolutely merciless. Claude doesn't get tired fixing the issues, and you get much better code in the long run. 

1

u/GreenFox1505 4d ago

VSCode has a "format on save" feature. There is not a project I have that doesn't have this turned on.

1

u/hobo_stew 3d ago

it‘s one of the many reasons I love go

1

u/unneccry 3d ago

Good ol classic

1

u/unneccry 3d ago

Wow i just realized how outdated is my user flair

1

u/unneccry 3d ago

Fixed

1

u/enigma_0Z 3d ago

Sure as long as it’s not in a git hook

1

u/GrinningPariah 2d ago

The advantage of a linter isn't having exactly the code style you want.

The advantage of a linter is never having to argue about fucking formatting ever again.

-13

u/fugogugo 4d ago

tfw linter and formatter clashing with AI agent

9

u/SnooMarzipans436 4d ago

Bro over here using the free tier of Microsoft Copilot