Not all criticism is painful, and of course, not all is useful. As an editor, it's my job to give criticism. As a fiction writer, I've been on the receiving end too. Over the years, I've done some serious thinking about giving and receiving comments that can apply to any role; you can substitute “developer,” “employee,” or “co-worker” for “writer” throughout.
The reason I love my current fiction-writing critique group so much is that there's no “oh, this is marvelous” and that's the end of the comments. No matter the skill level of the writers, there's always something that could be improved or wasn't understood. And there's always a well-considered comment about how the story could have gone differently. I love those story comments best, not only because they make me look differently at what's written, but also because those comments mean that the reader has really engaged with the work.
When you're on the receiving end of any feedback, it's important to listen to all the comments, regardless of whether you agree with them or not. These readers (product users, next dev, boss, etc.), might not be your target audience, but they're your first audience, and it's likely that they're only the first person to encounter some particular difficulty that they're noting. You don't need to agree with everything, but you do need to listen to it with an open mind and consider making changes.
As someone giving feedback, it's my job to point out flaws in the writing, or to suggest ways that are clearer, that machine-translate more readily, that don't contradict anything already in the piece, and that keep the promise of the title. It's also my job (and this is the hard part for some editors) to recognize the voice, point of view, story, and style of the writer and to maintain it.
As in any healthy relationship, criticism and compliments should be given in a way that make the recipients feel the potential to become their best selves. A good boss correlates the specifics of the job at hand with the skills and traits of the employee, and is a guide toward success within that set and within the parameters and needs of the company. A good friend, partner, or spouse doesn't accuse you of being irredeemably flawed when what they mean is that something you're doing isn't good for them. In the same way, a good editor makes the work clearer, shorter, and more accurate without it sounding like someone else stepped in and made the changes.
There has to be an element of kindness in giving good feedback. You can't resolve an argument if you don't listen to the other side and you can't scream if you truly want to be heard. There may be some things imposed by the feedback-giver (such as grammar, styles, or deadlines) that aren't negotiable, but most other things have at least a couple of sides to them.
You can't resolve an argument if you don't listen to the other side and you can't scream if you truly want to be heard.
It's my job to look not only for faults, but for ways to improve the work. (And I haven't found the “off switch,” so it may be more of a personality trait than a 40-hour-per-week thing.) In my world view, there's no place for “I don't like this,” “you're not a strong writer,” or “you should have done it this other way.” All of those comments are demoralizing and none of them lead to improvement, which is - or should be - the objective of the criticism.
Of course, editing's not all flowers blooming in the moonlight. It certainly can happen that I don't like something I'm editing, whether it's fiction or non-fiction. When that happens, my first order of business is to identify why I don't like it. It could be that the writing is self-important, overly simple, misses the target audience, or covers a subject that I find unpleasant or dull. The second order of business is to read the whole thing to determine whether the writer warmed up and got the yuck out later (one indication that they've turned in a draft) or whether the whole thing is going to be a dreary slog.
Next, I need to decide whether it's worth the work to fix it. (Yup, there are some articles for CODE Magazine that have never seen the light of day.) If the answer is yes, it's usually because the juice that drives the piece is good: the coverage of the technology is useful, the story is good even if it wasn't told well, or despite the painful read, the feeling at the end was that of satisfaction.
Finally, I determine whether or not I think the writer will be receptive to a string of comments. When I think they're open to it, I start making a list of general comments that I revise into a cover letter, apologizing for the amount of blood splattered all over their work (the detailed recommendations and changes in-line) and explaining that I bothered because I thought there was merit in there.
Even though they're about to read a bunch of pages listing what's wrong and how to fix it (and also some listing of what's right and why), I've prepared the poor writer for a beating with the promise that I will be there to help them make it all better. I also make sure to end that letter with a list of what they do well already. Sometimes it's hard to compile that list, but providing it increases the likelihood that they won't hate writing as the result of a rough review.
In the end, nothing I said about the work was meant to damage the recipient. I get a better-written article now, and future articles will most likely also be better. I want them to think of me as their partner rather than their primary antagonist. So far, no one has hired a hit man.