No one likes a hypocrite – but when you stop to think about it, it’s strange how much we despise them. Sure, it’s bad not to practise what you preach. But at least you’re still preaching: if I’m constantly talking about the importance of humane farming, I’m promoting a worthy message, even if you’ll also find me scarfing dubious burgers from some van in an alley every Saturday. Surely that’s better than nothing? Well, no. Both research and experience tell us it’s worse than nothing: we dislike hypocrites more than people who are straightforwardly awful. There’s a depressing lesson here for politicians, among others, reflected in recent events: if you can’t be perfectly moral – and who can? – you might do better simply acting like a monster.

Why this peculiar hostility to hypocrisy? You could argue that hypocrites lack self-discipline, which we think of as a moral failing – but that hardly seems a good enough explanation. Last month, the Yale psychologist Jillian Jordan and her colleagues made a persuasive case for a better one: we hate hypocrites because they’re guilty of “false signalling”. Signals, in evolutionary theory, are how we communicate, to get what we want from others; they include everything from peacocks’ mating dances to a lizard’s camouflage. The person who loudly condemns other people for condoning cruel farming implies that he or she refrains from such behaviour, without ever saying so. It’s a signal. And it works: moral condemnation, the Yale psychologists show, boosts your reputation even more effectively than bragging about how moral you are. It’s a shortcut to high status. No wonder we’ve evolved, or been socialised, to respond so angrily when we discover it was unearned.

This, I suspect, is the kernel of wisdom in the overused accusation of “virtue signalling”, an insult thrown at people suspected of being more interested in flaunting their progressive credentials – as anti-racist, anti-sexist, etc – than actually being moral. (Of course, accusing someone of virtue signalling is its own kind of signalling – an effort to demonstrate how hardnosed and savvy you are.) What makes virtue signalling annoying, surely, is the suspicion that the signal’s false: that the signaller isn’t really so moral, or might even be using signalling as an alternative to being moral. Whenever you read an article morally condemning someone, it’s worth asking if the call-out is the writer’s way of not confronting their own prejudice.

Which brings me to the most striking part of the Yale research: if you’re an “honest hypocrite” – if you openly admit you struggle to abide by the principle you’re preaching – people won’t mind your hypocrisy at all. (By being so open, you’re no longer guilty of false signalling.) We’re usually ashamed to admit to inner struggles, yet almost always, they humanise us. So your best bet is to avoid being either a priggish moraliser or a coolly detached cynic. Instead, be vocal about what you believe in, and honest about how you fall short. That way, you’ll get to be truly virtuous, and other people will like you for it. That’s my advice. Now, if only I could stick to it myself…

• oliver.burkeman@theguardian.com