|
|
|
|
|
by mttjj
1555 days ago
|
|
This is the right answer. And I’ll go one step further: Discuss it, dictate it, then automate it. (Sorry, couldn’t find another alliterative word.) My point being: whenever possible roll these best practices into build tools (auto formatters, style checkers, static analysis, etc) and then fail builds if they violate these standards. That way it’s impossible for engineers to get them wrong. There are definitely things that can’t _yet_ be automated like this but do as much as you can. We still encourage discourse on our standards if engineers have opinions about them but you’ll never get widespread adoption without some sort of enforcement. |
|
this is such good advice, at least for low hanging fruit where there is already a solid tool for automating it.
by running code formatters such as `go fmt` or python's `black` as a mandatory lint stage in CI (or git pre-commit hooks or whatever) you never have to argue about code style again. everyone can be equally annoyed by the style spat out by the formatter, and spend their energy arguing about something else.