Hacker News new | ask | show | jobs
by crdoconnor 3711 days ago
>I don’t mean we’re mean-spirited. I just mean that we are merciless. You’ll notice that I left the comment “Beep!” on the imports of every file you touched. What I meant was, “Your imports violate our standard convention—we order them by built-ins, then third party, and then project level,” but that was too much to type on every file.

Translation: "We have extremely strong opinions on what materials to use for our nuclear power plant's bike shed."

https://en.wikipedia.org/wiki/Law_of_triviality

There's seems to be an inverse relationship between how much effort a team spends on surface details of code (e.g. does it adhere to linting standards/are the lines < 80 characters/imports ordered?) and how much time and effort a team spends on deeper architectural issues (loose coupling, de-duplication, un-reinventing the wheel, transforming imperative to declarative code, etc.)

1 comments

Until the first time you spend a couple of hours looking for a weird bug in Python because somebody broke this rule...
Which rule?

The rule that imports must be ordered according to the whims of the team lead? Or the rule that lines must be under 80 characters?

There are a few linting rules which it pays major dividends to pay attention to (e.g. variables that are initialized but never used), but most of them are superficial.

You commented on the import ordering so clearly that's what I'm commenting on.

Not following the PEP standard for python import ordering can cause issues like circular imports or monkey patching not working properly.