News for hackers. Stuff that matters.
Re:Ruff v0.16.0 – Significant new updates – 413 default rule... by insanitybit on Sunday July 26, 2026 @07:10AM (#49056883)
I've never had discussions about code formatting in PRs, this seems like a made up problem or something that predates my career.
Re:Ruff v0.16.0 – Significant new updates – 413 default rule... by pdpi on Sunday July 26, 2026 @07:13AM (#49056899)
It's not by accident that tabs vs spaces is one of the stereotypical great debates in programming.
Re:Ruff v0.16.0 – Significant new updates – 413 default rule... by insanitybit on Sunday July 26, 2026 @07:57AM (#49057217)
I've never seen this debate take place outside of internet forums, almost always as a joke. It's been about 15 years since I even remember it coming up much as a joke, frankly.
Re:Ruff v0.16.0 – Significant new updates – 413 default rule... by phoghed on Sunday July 26, 2026 @08:06AM (#49057303)
Yes, because the battles have been fought and spaces won
Re:Ruff v0.16.0 – Significant new updates – 413 default rule... by insanitybit on Sunday July 26, 2026 @08:10AM (#49057336)
Okay, so if the battles are won why do I have to care? What is the point of having so many strict, enforced style rules if your exemplar has already been long dealt with?
Re:Ruff v0.16.0 – Significant new updates – 413 default rule... by phoghed on Sunday July 26, 2026 @08:53AM (#49057699)
One war was won bro, there are many more.

Pretend they don’t exist as much as you’d like, tell everyone their lived experience is wrong, that the tools arose from delusion and not any real world need, and that they benefit no one.

I’ll keep using them though, and never suffer from someone writing typescript with 4 spaces, leading commas, and no semicolons again.

Re:Ruff v0.16.0 – Significant new updates – 413 default rule... by insanitybit on Sunday July 26, 2026 @01:29PM (#49060291)
I'm not saying that lived experiences are wrong, I'm saying that I don't believe that these problems would exist under the current software engineering culture to the degree that people seem to insist upon.
Re:Ruff v0.16.0 – Significant new updates – 413 default rule... by microtonal on Sunday July 26, 2026 @07:13AM (#49056902)
These used to happen all the time. In one (otherwise great) programming course in university you would even get points subtracted if you did not follow the lecturer's preferred style.

(I think that in their case it was partially because uniformity made correcting faster.)

Re:Ruff v0.16.0 – Significant new updates – 413 default rule... by insanitybit on Sunday July 26, 2026 @07:58AM (#49057218)
At work? School isn't really representative.
Re:Ruff v0.16.0 – Significant new updates – 413 default rule... by microtonal on Sunday July 26, 2026 @08:49AM (#49057651)
Yes, also at workplaces I saw these discussions in the past. These discussions almost completely disappeared when formatters became popular.
Re:Ruff v0.16.0 – Significant new updates – 413 default rule... by ludwik on Sunday July 26, 2026 @09:01AM (#49057762)
Oh, absolutely. I started writing Python professionally in 2010. Whenever a new group of people started working on a Python project, one of the first things they had to decide was tabs versus spaces. Everyone would begin by saying that the question was unimportant and silly, but then immediately add a “but” followed by a detailed justification of their personal preference. That would lead to people spending two full days exchanging arguments and links to blog posts.

Worse, sometimes you would start working on a project without having that discussion first, only to discover a few days later that the code was failing because different people had different indentation settings in their IDEs, both regarding tabs versus spaces and the number of spaces. You would then have to pause the work, go back, have the discussion, and decide who was going to fix all the code committed so far.

This only stopped when linters became popular. They may be a little like vaccines: when they work, you do not see them working, so it is easy to forget what things were like before. But believe me, when they appeared, they were a breath of fresh air. We could finally focus on discussing the work rather than the conventions.

And tabs versus spaces is only one example. There used to be PR discussions about countless style issues throughout the entire lifetime of a project. That was not entirely unreasonable, because a consistent style genuinely makes a project easier to work on. But when every individual convention has to be negotiated by humans, it takes enormous amounts of energy and becomes tedious very quickly.

Re:Ruff v0.16.0 – Significant new updates – 413 default rule... by mylifeandtimes on Sunday July 26, 2026 @12:59PM (#49060008)
> only to discover a few days later that the code was failing because different people had different indentation settings in their IDEs, both regarding tabs versus spaces and the number of spaces.

yeah, why Guido got away with the "we don't need deliminators, white space is just fine" for so long has always baffled me.

Because somehow a special character that marks the start and end of a block is hard for people to understand??

Re:Ruff v0.16.0 – Significant new updates – 413 default rule... by insanitybit on Sunday July 26, 2026 @01:30PM (#49060302)
I think that tabs vs spaces is a rather extreme example because it has unexpected parser semantics - that is, it's not a style choice. So I don't think it's actually relevant to a conversation about conventions/ style.
Re:Ruff v0.16.0 – Significant new updates – 413 default rule... by ludwik on Sunday July 26, 2026 @03:01PM (#49061249)
It definitely is relevant to a discussion about linters. And as I said on my comment - it's just an example, I mentioned other types of discussions as well.
Re:Ruff v0.16.0 – Significant new updates – 413 default rule... by insanitybit on Sunday July 26, 2026 @08:01PM (#49063635)
I don't think it is because spaces vs tabs impacts semantics.
Re:Ruff v0.16.0 – Significant new updates – 413 default rule... by ludwik on Monday July 27, 2026 @01:33AM (#49065506)
Since this is a long-standing, real-world problem that linters solved, how could it not be relevant to a discussion about the usefulness of linters?

And the choice of whether to use tabs or spaces does not affect semantics. It is purely a matter of style. Indentation using tabs and indentation using spaces work in exactly the same way.

Re:Ruff v0.16.0 – Significant new updates – 413 default rule... by insanitybit on Monday July 27, 2026 @11:14AM (#49070852)
Because the discussion is about style enforcement and you're talking about semantics enforcement. You may as well be talking about generator comprehensions vs list comprehensions - they're two totally different things semantically.

> It is purely a matter of style. Indentation using tabs and indentation using spaces work in exactly the same way.

This isn't true. It changes how the code can be interpreted by tooling, and it changes how Python interprets the code because it's whitespace sensitive. It's also invisible. It's such an extreme example, I don't think this is reasonable to bring into the conversation for style discussions.

Re:Ruff v0.16.0 – Significant new updates – 413 default rule... by time0ut on Sunday July 26, 2026 @07:22AM (#49056957)
Silicon Valley (the TV show) memed about it with its tabs vs spaces bit. It used to be a thing for sure. It has been a good 10 or 15 years since I had such a discussion. Automated linting and formatting tools largely killed it in my experience.
Re:Ruff v0.16.0 – Significant new updates – 413 default rule... by insanitybit on Sunday July 26, 2026 @07:58AM (#49057226)
I think the culture has just shifted. I haven't even sniffed a whiff these conversations since roughly 15 years ago. I've never, ever seen them at work.
Re:Ruff v0.16.0 – Significant new updates – 413 default rule... by mrbombastic on Sunday July 26, 2026 @08:46AM (#49057602)
I also never have these conversations at work…because every repo uses a linter and the engineers are mature enough to recognize most of these debates as bikeshedding. Every once in a while someone will suggest turning on or enabling a new custom rule with some justification and there is a brief discussion and it is enabled or not. Outside of work in a consulting gig I didn’t have a linter in the codebase and the owner brought on a new engineer, he wrote if else statements all on one line no matter how long they were and removed spaces everywhere because he thought shorter code was better. He balked hard at any feedback about code style and I was told I couldn’t enforce code style or install a linter. I think you will surprised how much you care if someone with a truly weird style starts putting it in your codebase, I always told myself I didn’t before this. After more dumb waste of time clashes like that I quit the project. Now even personal projects get a linter :).
Re:Ruff v0.16.0 – Significant new updates – 413 default rule... by petesergeant on Sunday July 26, 2026 @08:51AM (#49057673)
> this seems like a made up problem or something that predates my career

I can believe the latter, and I can assure you this was a Big Deal back in the day. There's a reason Go ships with gofmt, and gofmt was somewhat revolutionary for being a built-in "you gotta do it like this" back in the day.

Re:Ruff v0.16.0 – Significant new updates – 413 default rule... by insanitybit on Sunday July 26, 2026 @12:49PM (#49059903)
What is "back in the day" here? I've been in this field for like 16 years.
Re:Ruff v0.16.0 – Significant new updates – 413 default rule... by petesergeant on Sunday July 26, 2026 @01:06PM (#49060077)
Others may remember it differently, but I feel like things started to change somewhere between 2009 to 2012? People were still hand-indenting code back then, and your personal style felt like something you had a bit of ownership of or was a creative outlet for you. I think we are in a much better place now where the editor + a central config file owns the whole thing, and I'd be surprised to see a modern codebase where a formatter's defaults weren't being used.
Re:Ruff v0.16.0 – Significant new updates – 413 default rule... by BigTTYGothGF on Sunday July 26, 2026 @11:59AM (#49059450)
> something that predates my career

That's because everybody uses linters nowadays, which was the original point.

Re:Ruff v0.16.0 – Significant new updates – 413 default rule... by insanitybit on Sunday July 26, 2026 @12:48PM (#49059890)
I'm not convinced.
Re:Ruff v0.16.0 – Significant new updates – 413 default rule... by preg_match on Sunday July 26, 2026 @05:32PM (#49062631)
I've made comments if the formatting is egregious enough. This is a "bigger problem" in not-python, languages without significant whitespace. You can truly write some horrifying code that will compile just fine.