4 ms·
Most of the time you already know the answer: copy pasted from somewhere else or too much to do, too little time. "Can you walk me through it" is also somethin
by asjw 7y ago
Most of the time you already know the answer: copy pasted from somewhere else or too much to do, too little time.
"Can you walk me through it" is also something I would ask to a student, not to someone whom I'm sharing the workload with.
If someone says it's too complex, it probably really is.
If someone says it's too complex, probably it also mean that maintaing that code could prove hard in the future.
So, unless you prove there are real, tangible, measurable benefits, it's better to find a different, simpler, implementation, no matter the rationale.
- strken 7y agoIf someone says it's too complex, they may not be in possession of 100% of the facts; if the code is actually too complex, the author will probably work that out when asked to explain. Consider a PR using mutexes instead of channels in a go project. Is the code in the hot path, and has it been benchmarked? How many mutexes are there, and are they hidden from external callers? Is the PR implementing an existing algorithm, or an algorithm with some desired behaviour which would be more difficult with channels? Which way is consistent with the rest of the codebase? This is not an adversarial encounter between a defender of the codebase and a filthy peasant seeking to corrupt all that is pure and good, it's two programmers trying to solve a problem, and neither is likely to have 100% of the available information, so you should talk to each other and work out what's going on. Assuming that you're right will bias you towards your existing opinion, which will cause worse code to make it to production.