3 ms·
I'm really puzzled about where "they're brilliant" comes from. Are you not brilliant too? If nothing else, at least brilliant at writing good code? Their code
by rerdavies 4y ago
I'm really puzzled about where "they're brilliant" comes from. Are you not brilliant too? If nothing else, at least brilliant at writing good code?
Their code has no consistent style? Sounds like you need a coding standard. Everybody should be using the same style, and should be using it consistently. Use tools to enforce your coding standard if you can (auto-formatters and code analysis to enforce naming standards and check spelling(one of my favorite analysis features!)).
Paragraph spacing in code? Your coding standard needs to specify that code is written for the person that follows (i.e. readability and maintainability is a primary goal). Pretty much a boilerplate clause in a coding standard. With that in hand, you have ammunition to back up an discussion about whether paragraph spacing in code improves readability. (I'm inclined to think that it very much does).
As for the rest... I worry that you may be micro-managing. The discussion about dynamic or static initialization is a totally normal and expected sort of conversation to have (without regard to whether you were right or wrong). A discussion happened. You pointed out an easier way to do it. Great. But it doesn't seem productive to me to agonize for hours over a coding decision that probably took under a minute to implement. (If you were able to initialize statically, surely it couldn't have been difficult to write equivalent dynamic initialization, and to reason about it's correctness).
A decision to cache an initialized data structure. Not really that difficult to implement; and not really that difficult to reason about. I think you just need to trust your team members to make reasoned decisions about that sort of implementation detail.