AFTER the worst cabinet reshuffle since, well, the last one, Theresa May suffered the indignity yesterday of having to accept the resignation of Toby Young from the Office for Students, only two days after she had defended him on the BBC's Marr show. In the “night of the blunt stilettos”, as it's been called, most of her cabinet team refused to budge. But the toadmeister has gone off to spend more time with his titty tweets. Hounded out by the “howling Twitter mob” said one his supporters, Piers Morgan.

In a bitter blog in The Spectator, Mr Young insisted that he didn't recognise “the caricature drawn of me on social media”, which is curious, because the caricature was constructed almost entirely out of his own contributions to, er, social media. His 40,000 deleted tweets (note to misogynists: if you try to delete thousands of posts it only tells people where to look) contained references to sexual practices, which might cause offence if itemised in a morning newspaper. They also involved disrespectful references to disabled people and working class students, and also numerous commentaries on the breasts of women from Helen Mirren (#grandmasIdLikeToShag) to Padma Lakshmi, the former wife of the novelist Salman Rushdie.

I don’t know if this made the director of the New Schools Network incapable of performing the part-time job on the board regulating the welfare of students in England. Cynics might say that his priapic sense of humour is a perfect fit for the demographic. But it certainly made his appointment untenable and it was extraordinary that he was appointed in the first place. You can’t expect to be taken seriously for a job in education, at any level, when you’ve constructed, over years, a persona as a potty-mouth “journalistic provocateur” as Mr Young describes himself. Would Frankie Boyle expect to become a Scottish schools regulator?

There is a certain irony in the fact that the Office for Students is also charged with ensuring free speech on campus – but this is not a free speech issue. No one is saying that Mr Young should have been censored. It is a question of character and suitability for public office. Nor is this an issue of political correctness gone mad. What gets a laugh in the editorial meetings of The Spectator can be toxic when it comes to doing a real job, not just in education but in most areas of public life. Many businesses would have taken one look at the toadmeister’s social media profile and decided he was unsuitable in any post that involved relations with the public. It is another sign of fathomless incompetence that the PM appointed him in the first place without making basic checks.

But if the attack on the Young affair from leading figures in the opposition parties have been somewhat muted, it is perhaps because they are aware of the dangers of chucking stones near glass houses. All the parties have been victims of the curse of Twitter. Labour had issues last year over the Birmingham MP Naz Shah's tweets about Zionists, which she accepted were anti-semitic. Then there was the Sheffield Hallam MP Jared O'Mara's catalogue of racist, homophobic and sexist tweets. They're both still MPs, which is why some Tories are claiming double standards. But the difference, surely, is that they were elected members, and not appointees to senior positions regulating educational standards for young people. My own view is that it should, on the whole, be up to the voters to decide whether their MP is fit to continue in office. But that doesn't apply to prime ministerial appointments to quangos.

And, before I'm also attacked on Twitter for shielding the Nats, the SNP is far from immune. Remember Neil Hay, their general election candidate in Edinburgh South, having to resign over his Twitter trolling. Even their youngest MP, Mhairi Black, got into some difficulty over what were called “x-rated” tweets, posted when she was at school.

Twitter is no respecter of age, politics, race or gender. Even the editor of Gay Times, Josh Rivers, had to resign last year when a catalogue of tweets emerged that were racist, homophobic and anti-semitic.

Twitter is only a decade old, but there must be many thousands of individuals who've been using social media incontinently for years without being aware of the consequences. Fortunately, I came to it relatively late, in 2012, and spotted the risk. My own rule is not to post anything on social media that I wouldn't be happy to see on the front page of a national newspaper. That's a safety-first that you'd think most people would observe, but social media is a curious hybrid. Many people who post on Twitter still seem to think that they are – as Lord Leveson said when he exempted social media from press regulation – “just talking in a pub”. They aren’t – unless he had in mind a pub in which every comment is transcribed and published on a website viewed, potentially, by millions of people.

Social media is a dangerous tool and people need to be advised, preferably in school, on how to use it safely. Anything you say can be taken down and used in evidence against you at some stage, whether in politics or in the world of work. Yet it seems only fair that people should have a right to change their minds, to grow up and be allowed to mature. They shouldn't always be held guilty, forever, for every stupid tweet.

Perhaps there should be some kind of statute of limitations. The Labour MP Angela Raynor, who celebrated Toby Young’s resignation, said that she was happy to sit next to Jared O'Mara because his tweets were 15 years old. Maybe anything tweeted before the age of 18 should be automatically erased. But a Google-style right to be forgotten wouldn't always work with Twitter because people make a point of archiving tweets from their political adversaries.

But none of this, of course, applies to or exonerates Toby Young, who was a highly sophisticated user of social media, and used provocation to promote his journalistic career as a “contrarian”. Those who live by the sword, die by the sword. Or the tweet.