HNHacker News
TopNewBestAskShowJobs

maratc

2,805 karma · joined July 28, 2011

ff6600
submissionscomments
maratc··on Ruff v0.16.0 – Significant new updates – 413 default rules up from 59
Please don't turn this site into Reddit.
maratc··on Ruff v0.16.0 – Significant new updates – 413 default rules up from 59
The options you suggest seem to be either (a) feed the bot now (halt development and reformat all code) or (b) under-pin/suppress and feed the bot later, probably dealing with people adding more non-conformant code to already-reformatted files.

You will probably have to do it all over again when these guys release even newer and shinier 0.17.0, with even more rules.

I can't understand how the option of not feeding the bot eludes people.

maratc··on Ruff v0.16.0 – Significant new updates – 413 default rules up from 59
You neither usually write in that style, nor go full shrink mode on people you talk to, so your original comment here is quite unusual in both the contents and the style.

Peace, man.

maratc··on Ruff v0.16.0 – Significant new updates – 413 default rules up from 59
The linked article says that ruff now has 413 default rules -- instead of 59 previously. Do I understand it right that all the projects that were using ruff were 100% conformant to 59 rules yesterday but likely not conformant to 413 rules today, which will cause breakage all across the board? Likely immediately followed by a swarm of pull requests all formatting their code in conformance to whatever these new (413-59) rules are?

There's no "tool replacement" going on here.

maratc··on Ruff v0.16.0 – Significant new updates – 413 default rules up from 59
Yeah, I'm in the "not interested" and "don't care" camp, with the addition of "please don't come at me with your bots who would tell me what to believe and what not to believe".

If someone wants to use a linter, I have no problem with that. I don't, and I don't want others forcing one on me, especially so as most of its "results" are straight in "this doesn't matter either way" category (in my example: two spaces instead of one, replacing quotes) and the rest make my code verifiably worse (folding a list in one line).

maratc··on Ruff v0.16.0 – Significant new updates – 413 default rules up from 59
The beauty of it is that all artists can be different. It's the cog wheels that need to be identical.
maratc··on Ruff v0.16.0 – Significant new updates – 413 default rules up from 59
But the formatting is not all that "delivery" stands for.

I've worked on great codebases that would produce thousands of linter errors (lowball estimation), and on shitty codebases that were 100% compliant.

maratc··on Ruff v0.16.0 – Significant new updates – 413 default rules up from 59
I do not have any opinion on formatting. My argument is that nobody should.
maratc··on Ruff v0.16.0 – Significant new updates – 413 default rules up from 59
My issue with your comment is not that it seems to offer unsolicited psychological advice completely out of the blue; it's that it leaves me with an uncanny feeling that it was written by an LLM.

In a thread where I complain about the de-humanisation of my profession by the bots, the irony of having a bot's psychological advice (and so, de-humanising the discussion too) is not lost on me.

maratc··on Ruff v0.16.0 – Significant new updates – 413 default rules up from 59
I’ve written it up-thread: you want me (and possibly, everybody) to be a cog wheel. But I want to be an artist.
maratc··on Ruff v0.16.0 – Significant new updates – 413 default rules up from 59
Thank you, but I'm afraid I disagree. Single line dict definitions are fine when that's my intent, multilines are also fine when that is, and I trust myself to know when to use one or the other. My problem is with arbitrary rules like "only x-line dict definitions are allowed," for any value of x.
maratc··on Ruff v0.16.0 – Significant new updates – 413 default rules up from 59
> These tools don’t add extra commits.

When you replace tool x with tool y, you need to fix your code, because these tools do not agree on what your code should look like, and what was acceptable for tool x simply isn't for tool y.

One of these changes I mentioned brought a massive reformatting of all code base, as the new tool failed 'import' statements unless they were in alphabetical order.

maratc··on Ruff v0.16.0 – Significant new updates – 413 default rules up from 59
You want to be a cog wheel, in a company of cog wheels. There's nothing wrong with that. But I want to be an artist, and preferably in a company of artists, having been in a company of cog wheels too many times. Not only it's more fun that way, but also tends to lead to better outcomes.
maratc··on Ruff v0.16.0 – Significant new updates – 413 default rules up from 59
And here's where this abstraction breaks: when a programmer leaves, their code is not going anywhere.

The bigger problem is this: you want me to be a cog wheel, but I want to be an artist.

maratc··on Ruff v0.16.0 – Significant new updates – 413 default rules up from 59
> \bfoo\b will produce noisy results.

Add a look-behind for '[' and a look-ahead for ']' and you'll be fine.

maratc··on Ruff v0.16.0 – Significant new updates – 413 default rules up from 59
I think you miss the point, but using your foodie reference: would you rather go to a couple of Michelin restaurants -- where each piece brings a reflection of the chef, the geographic area, and what quality ingredients were available on that day -- or would you rather only eat at McDonald's for an experience that is extremely consistent across days, seasons, and continents?

Now imagine a chef who has a nice little restaurant but is now being sent a couple of "quality assurance" guys from McDonald's who tell him that his choice of potato variety for chips does not exactly conform to the "standards" defined at the mothership.

maratc··on Ruff v0.16.0 – Significant new updates – 413 default rules up from 59
My argument is that searching for \bfoo\b will produce all the results you want.

Python was designed from the start so that 'foo' and "foo" are equal. It also worked like that for 30 years or so. This has not been an issue in these 30 years. But then someone came with an opinion that one of them is better than the other.

maratc··on Ruff v0.16.0 – Significant new updates – 413 default rules up from 59
You can build yourself any strawman you want :)

In my first ten years of writing Python, I never argued about code style with anyone. It's only after they brought the bots in that I learned that my style is somehow "bad."

maratc··on Ruff v0.16.0 – Significant new updates – 413 default rules up from 59
See if you know where this leads before clicking on it: https://xkcd.com/208/
maratc··on Ruff v0.16.0 – Significant new updates – 413 default rules up from 59
My argument is more to the tune of "everybody’s code looking slightly different is not a problem in practice as long as I can read and understand it."

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.

maratc··on Ruff v0.16.0 – Significant new updates – 413 default rules up from 59
"A foolish consistency is the hobgoblin of little minds, adored by little statesmen and philosophers and divines."

-- Ralph Waldo Emerson

maratc··on Ruff v0.16.0 – Significant new updates – 413 default rules up from 59
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.
maratc··on Ruff v0.16.0 – Significant new updates – 413 default rules up from 59
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.

maratc··on Ruff v0.16.0 – Significant new updates – 413 default rules up from 59
We can replace the endless and useless discussion on how to format code with an endless and useless discussion on what linting tool to use.

Another option would be to leave both topics alone and go on with our lives, improving the product, fixing bugs, implementing new features, and generally giving customers a better product and shareholders more value, while respectfully agreeing to disagree on the issues of style.

maratc··on Ruff v0.16.0 – Significant new updates – 413 default rules up from 59
The amount of fascination that people have with these "grammar nazi" bots -- some of them implementing completely arbitrary "rules" and some of them disagreeing with others on what "good" Python code should look like -- doesn't stop to amaze me.

Here's "bad" code:

     important_numbers = {
        'x': 3,
        'y': 42, # Answer to the Ultimate Question!
        'z': 2
    }
Here's what "good" code should look like:

    important_numbers = {"x": 3, "y": 42, "z": 2}  # Answer to the Ultimate Question!
Which completely misses the writer's intent. But did you notice that there are two spaces before the pound now? Also, the quotes are now double because apparently it's somehow more kosher! So much improvement!

The actual problems in the code I work with are not the spaces at the end of line or imports in non-alphabetic order, it's the 10-line list comprehensions that are so long that they're impossible for me to parse. None of these tools catch that. My place used pylint, flake8, black, ruff -- with hundreds of commits on every change. All that energy could be better spent elsewhere.

maratc··on Future euro banknote design proposals
Good point, however

> Latvia: Mark Rothko

Marcus Rotkowitz was Jewish, born in Dvinsk, Russian Empire (today Daugavpils in Latvia) and emigrated when he was 10 (and Latvia wasn't a country yet.) At home, he spoke Yiddish and Russian, and probably didn't know a word in Latvian (at the time, Dvinsk population was half Jewish, with the rest divided between Russians, Poles, and Latvians).

Your idea that he's the guy who should represent Latvia on a European banknote would probably quickly get you burned at the stake at Doms Square in Riga.

maratc··on John C. Dvorak has died
Not sure if it's about him being controversial, or about him commenting on the industry but not being a part of it in a sense that e.g. Dennis Ritchie or Steve Jobs were. (Could be both.)
maratc··on The EU is about to sell our most sensitive data to the US for visa-free travel
I don't think that "collecting" vs "verifying" thing practically differs in anything (except for maybe intent that I don't really care for).

They printed four of my fingers the first time (presumably for "collecting") and the same four fingers the second time (presumably for "verifying"), so it was the same procedure, taking the same time. Taking a picture of me also took the same time in both cases (I had to position myself in the frame "just right".)

With that, it should take the same time "collecting" from X people as it would "verifying" X people, and so the ratio of "first-time" visitors is irrelevant.

maratc··on The EU is about to sell our most sensitive data to the US for visa-free travel
The linked article argues that our pictures and fingerprints are "our most sensitive data" and it's bad giving it to anyone, like the US Government. I tend to agree on the "sensitive" part but not sure I agree on "US Govt" part.

The fact that we leave fingerprints everywhere is hardly relevant, considering the costs of retrieving and storing them en masse are astronomical.

The licence plates on our cars are out in the open for everyone to see, and yet when a private company collects them and makes a searchable database out of it -- with locations and timestamps -- making it possible for anyone with access to build traceable paths of all of our movements since forever, it results in people getting enraged, and in my opinion justifiably so.

maratc··on The EU is about to sell our most sensitive data to the US for visa-free travel

   > US-issued visas are multiple entry for 10yrs
Some of them but definitely not all of them.

   > it's relatively not a hassle at all
I guess you have never had to hunt for the online queue at the embassy and never had to travel (potentially hundreds of miles) for the interview at that embassy. In which case, lucky you! However "it's not a hassle for me" is different from "it's not a hassle at all".
← PreviousPage 3 of 34Next →