3 ms·
> What if everyone but one says it fits in their head? "It depends". If the one person is a junior it's maybe not a code issue (unless junior-level people are
by gregmac 6y ago
> What if everyone but one says it fits in their head?
"It depends". If the one person is a junior it's maybe not a code issue (unless junior-level people are expected to maintain it). On the other hand if it's a skilled, experienced, senior person saying they can't follow it, there's likely an issue with the code.
> What if you're just talking one on one, and have no idea how many team members it fits in the head of?
> What if the person who is criticizing the code will begrudgingly admit that it fits in their head, but still thinks it's too messy?
The greater point here is is that it's about code maintainability. "Fits in your head" is merely one proxy for that, not the actual goal. There are also hundreds of other things that lower code maintainability -- including being "messy", having bad names, poor or no inline documentation, no unit tests, and being "clever" -- and all of those are things that should be discussed and fixed.
Presumably everyone involved are professionals and working in good faith. If they really can't come to consensus: sleep on it. Involve more people. Suggest alternatives. Pair up.
Someone consistently on the losing side of these discussions -- whether they feel they're constantly dumbing down their code, or that the rest of the team is writing unmaintainable spaghetti nonsense -- should probably reflect on if this is the right team for them.