Have you said this before? Don't talk like that to a developer: in a code review or, pair programming, or help resolve a bug, etc.
Don't get me wrong, I know many people are gonna say: "yeah but look at it! I mean, this is too much".
I'm saying that because, saying code is shit is not helping. We developers tends to appropriate our code. We should not. It's your company's code. Even you are an independent, you have to depersonalize it. I think the best way to modify code is to consider it is not our own. The more you think like that, the more you will be open minded to find solutions.
You know, be kind with others. As a lead, don't forget that what you're saying has an impact on people mindset. If you're saying a code is shit, you are maybe hurting someone. Saying shit don't help the person who wrote it. Saying that we can write in other way helps because it's faster, more open, etc.
If you're saying "your code", "the code is shit", you're just making yourself and people have a bad day. The developer may asking himself a lot of questions, feel bad, etc. And for you, because you don't want to do that all day long, it's put you on a bad mindset - and it's exhausting.
And remember, as a lead you're here to help. Ask yourself that question: what do you want in your day? Helping the team, the project or judging things?
So please, help yourself and others. Be kind ;-)