5 ms·
It does come off as passive-aggressive. The tone is so final and closed to all discussion. If I were on the receiving end of that feedback, I'd much rather hav
by pavlov 7y ago
It does come off as passive-aggressive. The tone is so final and closed to all discussion.
If I were on the receiving end of that feedback, I'd much rather have the reviewer write something like:
"Can you walk me through the rationale for this concurrency model? It seems complex for what we're trying to achieve at this stage."
- xxxtentachyon 7y agoThis is exactly the tone I try to strike, especially with junior colleagues. I never want to make someone’s decision seem unambiguously wrong-headed when it comes to subjective engineering matters. That just breaks someone’s confidence.
- Aeolun 7y agoEven if their decisions are sometimes unambiguously wrong-headed. It’s just an experience thing, but I’m trying to figure out how to tell them ‘trust me, I’ve made this mistake before, please don’t do it’, without trying to explain the 2 or 3 years of experience that prompt it.
- stevens32 7y agoExplaining the experience would make it a learning moment, "trust me don't do this" doesn't do much to legitimately motivate an alternative choice
- asdfasgasdgasdg 7y agoHopefully you are able to summarize -- that's what I try to do. Just asking for people to blindly trust you is a big ask, for two reasons. First, experienced people often develop mistaken beliefs. They try something and it happens to work, even though it might even be wrong in principle. Without any rationale, how is the person you're talking to going to judge whether the beliefs you've developed are correct? Second, even if they're willing to trust you, just getting the rule handed down does not grow them as an engineer. I might prefer to make a mistake and learn than take the right path without understanding the reasons. In fact, I have done so, intentionally. So, again, IMO, the goal you've mentioned in this comment ("figure out how to tell them `trust me...`") is an incorrect goal, and one you should not pursue.
- gregmac 7y agoIt's a good opportunity to teach them. You could ask questions that lead them to the same conclusion (with the benefit of hindsight from your experience): "What happens if this system is terminated before the final write call completes?" "How does this handle someone accidentally starting another instance of the application at the same time?" "If this external service we use is down, what happens?" You could also walk through the story of your prior mistake, draw parallels to the new code, and then discuss how to avoid it.
- bbreier 7y agoThank you for the fantastic example for how to respectfully review code. It’s important to remember that a diff does not include the process for how the solution was arrived at, and I try to leave openings like yours so that the submitter of the PR has space to explain why something can’t be e.g. more straightforward without getting confrontational.
- deleted 7y ago[deleted]
- asjw 7y agoMost 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.
- nerdponx 7y agoAs some other commenters wrote, you can probably be more direct: "Why use XYZ pattern instead of ABC? This seems more complicated than necessary right now." There's also a useful communication/pedagogy technique I learned many years ago called "praise, correct, praise". You frame a "correction" or negative feedback with either neutral or positive feedback. The idea is that the other person receives the feedback without feeling "stung" or associating it with negativity, which could reduce their receptiveness or even their ability to retain and/or apply the information.
- hoorayimhelping 7y agoLeading with 'why' often puts people on the defensive as it usually comes off as demanding. Asking someone to walk you through their rational lets them explain it on their terms, and assumes there is reasoning that you're unaware of that they may have discovered.
- nerdponx 7y agoThat's a good point. I just wanted to demonstrate that the wording could be tighter.
- elgenie 7y ago“Praise, correct, praise” is less fawningly known as “shit sandwich” and appears incredibly patronizing to anyone who is either aware of the method or possesses minimal skills of observation.
- stevens32 7y agoThe fact that at least an effort was made does count for something, I believe.
- Jamwinner 7y agoBut the motivation for that effort varies from 'this person is actively seeking to manipulate me with poppsych to use my failed career as a stepping stone' to 'genuinely concerned about how I feel about recieving critical feedback.'
- spease 7y agoI can’t say I agree with this thread. Oftentimes I’ll say “It seems like <bad thing>, I would probably <different approach>.” After years of doing software development I’m well accustomed to side effects, business constraints, legacy compatibility, time, etc forcing a solution that seems overly complex at first look but is actually necessary and sufficient. I want to explain to the person where I’m coming from and give them a fair chance to refute my perspective. Rather than assume I’m correct from the get-go and start using flowery language to get them to change. At the end of the day I feel like our goals should be aligned to create the ideal balance of software for the larger goal. They should also be able to think critically about the problem I see and the solution I might offer. If the person seems to be doing something boneheaded over and over after I’ve spent literally days, weeks, or months explaining easier and better solutions, and I keep getting forced to deal with it, then I may well conclude there are no extenuating factors and “this code is shit” just because of the person’s ego. If somebody starts asking me to ‘walk them through the code’, that’d be a red flag to me. If this is someone technical, then I’d expect them to be able to follow the code themselves. If this is someone non-technical, then I expect that giving them knowledge is going to be more dangerous than useful. It’s also disingenuous and feels like it creates a sort of prisoner’s dilemma. If I’m open about the pros and cons and details of my ideas, but they’re closed and use persuasive language to advocate for their own ideas, I don’t feel like it’s really a collaborative process anymore. They’re taking a route that gives them a distinct advantage, not because their ideas are better at meeting the overall goal, but because they’re tapping into people’s subjective preferences and drives to further their own self-interests. Lots of companies do have this culture, but the end result seems to be to create an echo chamber where a blind eye is turned to vast inefficiency. Oftentimes this seems to be things that are hard to quantify like user experience and reliability or security, where you silently lose customers without a ticket being opened, so there’s no business pushback to bad technical decisions that hurt the product.
- stevens32 7y agoWhy would asking someone to walk you through code be a red flag? Isn't it usually a way to understand the context of choices, not that a reader can't understand what code is doing?
- pacala 7y agoWhile that's a much better formulation, it still lacks substance. Elaborate what is it that you find complex and sketch some concrete simpler alternatives. Review cycles where one side asks for reams of explanations, while being parsimonious with their own effort are quite unproductive.