4 ms·
I don't see it as "LOC-worship". It's about the most objective measure of codebase complexity/scope as could exist. It doesn't equate to features, but it certai
by kortex 4y ago
I don't see it as "LOC-worship". It's about the most objective measure of codebase complexity/scope as could exist. It doesn't equate to features, but it certainly correlates to it, more business logic means more code.
> Sometimes conciseness is better than cleverness.
Isn't concise and clever on the same side of the balance? Cleverness and abstraction is how you cut down on LOC.
Abstraction has its own cost, so while you can trade LOC for cleverness/abstraction, there's limits/costs to that as well.
Also also, python/mypy still lacks support for higher-kinded types, which really puts a soft-ceiling on the amount of abstraction you can type-safely utilize.
Aaaanyways, I think the whole original point is, "we have a large codebase, and mypy helps keep the wheels on at speed".
+1 on black and precommit. That has done wonders for codebase consistency. I'd run flake8 too but the maintainer is weirdly opposed to supporting pyproject.toml for config.
- gabereiser 4y agoConcise and clever aren't necessarily related. Concise means conveying your objective as clearly as you can, as small as you can. Clever is John Carmack's q_sqrt. Code that is small, that works, but no one understands why. LOC should be looked at as a negative at a certain point. Software Engineers spend more time reading code than writing code. The more LOC you have, the more an engineer needs to read to get work done. LOC is not a good measurement of quality software nor is it a measurement of complexity of the problem, only the complexity of the code.
- benji-york 4y ago> I'd run flake8 too but the maintainer is weirdly opposed to supporting pyproject.toml for config. I haven't used it in anger yet, but FlakeHeaven (https://github.com/flakeheaven/flakeheaven https://github.com/flakeheaven/flakeheaven) looks like a nice fork that includes pyproject.toml support.