For criticisms of things like code (or art), I think of that as "criticize the thing and not the person".
Bad: "You don't know what you're doing. This is poorly-written code that will perform badly on bigger datasets. "
Good: "The runtime of this code is prone to grow exponentially. A different algorithm will get around this. "
As much as possible I try and criticize from the viewpoint of wanting to make the work better instead of from wanting to bring down the person that did it.
Edit: To add - I will very possibly be _wrong_ about the definition of better, which is something else I try and keep in mind.
If the person is to blame, focusing on the mistake rather than the person may just be misdirection.
I think the big difference in the US is not (just) that people may have fragile egos, but that (pos related) the consequences are more serious - don't match up and you'll be fired.
Bad: "You don't know what you're doing. This is poorly-written code that will perform badly on bigger datasets. "
Good: "The runtime of this code is prone to grow exponentially. A different algorithm will get around this. "
As much as possible I try and criticize from the viewpoint of wanting to make the work better instead of from wanting to bring down the person that did it.
Edit: To add - I will very possibly be _wrong_ about the definition of better, which is something else I try and keep in mind.