3 ms·
I actually agree with this. And I like your second point around LOC as a yellow-flag around poor domain understanding. I tried to acknowledge the deficiencies
by charliermarsh 4y ago
I actually agree with this. And I like your second point around LOC as a yellow-flag around poor domain understanding.
I tried to acknowledge the deficiencies in LOC in the second paragraph... but it felt like a useful shorthand for conveying a sense of scale and complexity (at least to an order-of-magnitude) in a domain-agnostic way.
Outside of Mypy, we use: black, isort, flake8, docformatter, and autoflake (to remove unused imports) -- all on pre-commit + enforced on CI. I'd like to see Black cannibalize more of that toolchain :)
- gabereiser 4y agoYeah, understandable. It's Python so things can easily get verbose. I've known too many engineers that see LOC as a measurement of complexity when those things aren't directly related. Complexity is usually unwrapped into a simplified model of things (human nature) but often there's 2x more plumbing code to cobble it back into complex mode to work with it. Not saying it's the case in your codebase but it's been what I've seen in large Python codebases. A complex domain is broken down into simple domain models then wrapped in services that add that complexity back because the original domain model was simplified from a business perspective already. Complexity to me comes from obtuse concepts. The business trying to cast too wide a net or something along those lines. Microservices help to concise that vision into reusable bits but its gets a bad wrap because of the context switching (which means your domains aren't well defined.) Keep using those tools though, they will save you so much time down the road when you enforce test coverage and fully lean in on that autoflake.