Earlier quoted context omitted.
Which gets rid of the discussion, but not the problem coding style rules are supposed to fix: Code looks the same, regardless of who wrote it. That's the whole point of code style guidelines like that as there's no functional reason for them. That's why I like Go, every piece of code looks the same, there's one default enforced linter and this discussion (or discussion if discussion should be allowed or prohibited) d…
Waiting patiently for the other person to produce a post hoc rationalization about why everybody’s code looking different is in fact a good thing
Ruff v0.16.0 – Significant new updates – 413 default rules up from 59
81–90 of 247 posts
Re: Ruff v0.16.0 – Significant new updates – 413 default rules up from 59
#82Earlier quoted context omitted.
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.
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 rules up from 59
#83Earlier quoted context omitted.
Which gets rid of the discussion, but not the problem coding style rules are supposed to fix: Code looks the same, regardless of who wrote it. That's the whole point of code style guidelines like that as there's no functional reason for them. That's why I like Go, every piece of code looks the same, there's one default enforced linter and this discussion (or discussion if discussion should be allowed or prohibited) d…
Waiting patiently for the other person to produce a post hoc rationalization about why everybody’s code looking different is in fact a good thing
However since you've asked so nicely here you go: everybody’s code looking different is because all humans are different. It's what makes us human. I am very serious about my craftsmanship, and I bring my "humanity" to it: sometimes I include a cultural reference (as in the example above), or an internal joke in the name of a (very long) variable, or vent my frustration in a comment.
My first ten years of writing Python were uneventful; nobody commented about my style and I never commented about others'. With the advent of grammar nazi bots, everyone is supposed to now please them by writing completely bland code, which in my opinion degrades me from a craftsman to a code-monkey. This is dehumanising, in a certain sense.
Re: Ruff v0.16.0 – Significant new updates – 413 default rules up from 59
#84Earlier quoted context omitted.
Can you not read code if it uses single vs double quotes?
I can - in fact, I have to, a lot more than I'd like - when someone makes changes with different code style settings in their IDE or tooling, and that affects unrelated parts of the code, and suddenly the PR contains tons of code that just looks subtly different but still does the same thing. If sieving the spam from ham in code reviews is your thing, go have fun. I personally prefer code that is automatically and un…
Re: Ruff v0.16.0 – Significant new updates – 413 default rules up from 59
#85Earlier quoted context omitted.
It’s because you forgot a comma after the last item. If you had kept that the items wouldn’t have been compacted (at least in black, I’ve stopped linking my code because it breaks intends of formatting more often than it helps)
Sorry, but I did not "forg[e]t a comma after the last item". I intentionally did not put a comma there. The list of the "important numbers" in my example is already complete and perfect, and is not supposed to ever change. I wanted to emphasise this fact by specifically omitting the comma there, in the hope that intelligent people in the future would get this message exactly as I intended for it to be.
Taking that as a reason to not have those rules in the first place seems like a logical fallacy that intelligent people should not make.
Re: Ruff v0.16.0 – Significant new updates – 413 default rules up from 59
#86Earlier quoted context omitted.
In my previous place, discussions on coding style were forbidden in PRs. It worked just fine. Edit: one could also use single or double quotes in strings, and it didn't anger the grammar nazi bots as there were none.
Using a consistent string delimiter has value: if you search for ['foo'] you will find all instances of the string foo. With inconsistent delimiters, you better have a single canonical 'foo' in your project or you're going to run into problems.
Re: Ruff v0.16.0 – Significant new updates – 413 default rules up from 59
#87Earlier quoted context omitted.
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.)
At work? School isn't really representative.
Re: Ruff v0.16.0 – Significant new updates – 413 default rules up from 59
#88Earlier quoted context omitted.
Can you not read code if it uses single vs double quotes?
You are not making the strongest point by using a relatively subjective rule like that. It includes indentation, how to structure functions and the parameters and many more that in sum make it very easy to jump between projects (Internal company projects, dependencies, other open source projects) without ever getting used to a new style. This makes reading and contributing very easy. Compare that with other languages…
Re: Ruff v0.16.0 – Significant new updates – 413 default rules up from 59
#89Earlier quoted context omitted.
The point of the "grammar nazi" bots is to focus on the actual problems: if a bot is deciding about linting, you don't have to waste brain power to discuss it in PRs. It is what it is, everyone gets the same, shut up and work on what matters. I'm surprised you consider it a lot of energy spent, I tend not to spend any on this, it just runs automatically on my code and I drop out of pretty much every discussions about…
I've never had discussions about code formatting in PRs, 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 rules up from 59
#90Earlier quoted context omitted.
Yes, because the battles have been fought and spaces won
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?
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.