3 ms·
The issue with enforcement by policy is it puts the onus of checking things on whoever is enforcing the policy. Which is usually either no-one, or an already b
by lazide 4y ago
The issue with enforcement by policy is it puts the onus of checking things on whoever is enforcing the policy.
Which is usually either no-one, or an already busy/overloaded team lead or (even worse) manager.
Every software engineering organization I’ve been at either wanted, or put in place, automated policy enforcement because otherwise it either never happened (and hence there were constant problems), or everyone hated doing it because it felt like a waste of their time (with it’s own constant source of problems).
it’s best for everyone if a problem is identified and called out as close in time to when it’s created as possible, and as clearly as possible. Ideally before it can be part of any product, or be depended on by other work that would need to be refactored.
Which automated tools can do cheaply. If it is in the compiler, even better!
Doing it manually delays the feedback cycle, AND burns people decision energy, which is almost always the thing everyone is in the shortest supply of anyway.
- lisper 4y ago> it’s best for everyone if a problem is identified and called out as close in time to when it’s created as possible, and as clearly as possible. Sure. But it does not follow that it is beneficial for your language to forbid you from testing some code you wrote over here until you fix a completely unrelated problem over there, indeed until you fix every single problem that the compiler can find. > Doing it manually delays the feedback cycle I'm not talking about "doing it manually", I'm talking about the compiler issuing warnings instead of errors.
- lazide 4y agoIf you can check in those problems, and make them problems for everyone else - it absolutely is an issue! If the policy is ‘you can generate “warnings” all your want locally, but you can’t check them in’ then sure. The issue of course is folks want to check things in as soon as they ‘work’ in their basic use case, even if it means bypassing a bypassable alert. So it means enforcing it at check-in time, in a non bypassable way (usually), which just means folks have a lot of ‘hidden’ cleanup to do before submitting, while they have their code ‘working’, which is always a drag.
- hbrn 4y agoSuch policies should be defined by the company, not enforced by the language. Even in static languages world, a lot of projects allow dev/nightly builds to be unstable. Which is literally what you're talking about: checking in problems for everyone else. But checking in policy is a VCS/CI domain, not a language domain.
- lisper 4y agoAnd what is to prevent someone from checking in code that doesn't compile?
- falcolas 4y ago> whoever is enforcing the policy. CI/CD, based on CTO edict? Have them (or their startup equivalent) make the edict at the start of the company's lifecycle for best results. Don't make it a human procedure, make it a "you're physically unable to deploy until tool X doesn't throw a warning". Anything else will, as you say, fail.