I continue to just not *get* Rubocop, StandardRB, etc.
Rubocop enforces many rules, often badly-considered rules, and adds new rules frequently.
But I get the impression that other people are genuinely bothered by reading code with a variety of quoting styles? Like, there are enough styles out there, and I read enough different code, that to me that's just a sunk cost.
Maybe other people rarely read outside their 'home' codebase?
I mention quoting styles specifically because when I asked folks what Rubocop rules they thought were particularly helpful... Mostly, the answer seems to be no particular rules, they just want things to be uniform.
The exception is rules about quoting strings, which got mentioned by far the most of any specific rules, but sometimes in specifically-trolling ways.
So apparently it's not that any specific rules are good, but if we could avoid variety in string quoting... Something good happens?
@codefolio most people appreciate predictable structure and work faster with consistent code. Most people work in a single codebase for years. Getting a group that works on one app to agree to a set of rules is time consuming and prone to poorly-considered rules (because it's largely zero sum and because they likely lack experience making those decisions, respectively).
Standard exists to solve this. Consistency without costly consensus building. Consideration without careful decision-making.
@searls Fair enough. I just don't have trouble reading a variety of codebases.
Which is good, because it's been many years since I've had a job that didn't require that weekly-or-more.
So then presumably other people *are* significantly bothered by inconsistency in whitespace and quoting.
But sure, I agree that getting a group to agree on a style guide and then use it consistency is very hard, and most style guides are awful.
@codefolio I don't "have trouble" reading a variety of code styles. Nor do I have trouble using either of metric or SAE socket wrenches. But if you mix them together arbitrarily, it's going to take me longer to do the job.
I see meaningless inconsistencies in code the same way.
@searls @codefolio regarding string quotes: I don’t have a problem reading them if they are different. But consistency is relaxing.
Minor inconsequential differences get distracting over time and train you to ignore differences. That’s bad when differences mean something.
@searls @codefolio Choosing to standardize on a string quotation that only works without interpolation and must be changed if you decide to interpolate is absolutely ridiculous and I can’t believe people blindly accept it from rubocop.
I will die on this hill.
Sorry. I know that’s a digression from the conversation but I’m just astonished that single quoted strings are what rubocop decided was good.
If I decide to interpolate then I ALSO have to change the string delimiter!?
@saturnflyer @searls @codefolio +1. git is the industry standard. PRs and code reviews are how production code (only code that matters) evolves. Enforcing styles so that DIFs reflect meaningful change to code makes a lot of sense to me.
@jswright61 @saturnflyer @searls A number of the Rubocop standards are very explicitly *not* designed to conform to Git (or other diff-based source control.) Commas on last lines of arrays, etc, too. They're very explicit about being against altering their tool to accommodate other "tool limitations" (that is, that Git is diff-based.)
@jswright61 @saturnflyer @searls Re: inconsequential differences and differences being meaningful...
If you're going to be sure at a glance that string differences are meaningful, and have immediate gut-level confidence in that, you need to train yourself *not* to read the vast world of outside-your-company code that does *not* conform to your expectations, such as your gem dependencies.
Maybe that's a reasonable constraint for other folks? It's kind of hard for me to imagine.
@codefolio @jswright61 @saturnflyer right, which again is the whole point of Standard. The more projects adopt it, the less friction experienced by everyone hopping across projects. There's a reason why people like @tenderlove and @fables_tales "got it" right away -- we work in literally hundreds of repos
@searls @codefolio
I am a simple homosexual, I like saving the file and having the code snap in to place