IN the aftermath of terrorist attacks, social media can be a heartening place to be. People normally pull together to express sympathy, condolences and solidarity. Indeed, following recent terror attacks in France, locals often took to Twitter to help those caught up in the chaos by letting them know their doors were open.

While much of the same sentiment was around following Wednesday's attack on Westminster, something much more sinister snuck its way in to the reaction. It feels these days as if some agreement has been struck by the very worst forces in the world to swamp social media with constant provocation and ignorance.

Not only did we have trash talk all over Twitter, we even had ex-English Defence League leader Tommy Robinson exploiting the social media age by thrusting himself in front of any camera he could find at the scene to get some exposure. The far right knows how to take advantage of the outrage ticket, and no situation is serious enough for them to put common decency ahead of their agendas.

We should expect this from the Robinsons of the world, and the Twitter trolls who love nothing more than a tragedy to thrive on, but it didn't stop there.

It became a free for all, and politicians and journalists were among the worst offenders. While factions all over Twitter dealt with the fallout by slinging mud about how the other side was behaving, the truth is that they were all as bad as each other.

In Scotland, focus fell on the Scottish Parliament, which had just started the second day of debate on a vote to allow Nicola Sturgeon to seek the legal tools to hold a second independence referendum when news of the attack broke.

Later in the day, Tory MSP Jamie Greene ignited a slanging match when he took a swipe at pro-independence campaigners who'd been gathering outside of the Scottish Parliament: "Multiple fatalities at Westminster. Holyrood suspended. Yet still a bunch of 'Yes' flag wavers outside parliament. Unbelievable," he tweeted.

He deleted it just 19 minutes later, obviously realising he'd called the tone wrong, but an MSP should know better. What he said was already doing the rounds on social media by that point, inflaming arguments that didn't need to be stoked right then.

I was at the Scottish Parliament on Wednesday, and I was in the press gallery of the chamber when the news first flashed up on my Twitter feed. Within minutes, both Nicola Sturgeon and Presiding Officer Ken Macintosh had left the chamber, presumably for a security briefing and to make a decision on whether the debate should continue.

The parliament acted fairly swiftly amid an ongoing, developing crisis in London. It was the correct decision to suspend proceedings – such an important debate in Scotland requires MSPs' full attention, and that would have been impossible in the circumstances, not least because of their concern for colleagues in Westminster who were in a locked-down parliament.

However, until that point, it had been set to be a big day in Holyrood. It's no surprise that activists would have been gathered there, and Greene's comment was in severely poor taste.

But his tweet was mild in comparison to others which intimated similar notions of a repugnant and disrespectful Scottish Parliament, and taking such cheap political swipes was shameful.

Before anyone could get on the moral high ground, however, one controversial figure associated with the independence movement had already sent everything in entirely the other direction. Stuart Campbell, who blogs as Wings Over Scotland, infuriated tweeters with a flippant approach to the unfolding tragedy.

"I hear all McDonalds staff have walked out of work to show respect over the Westminster attack. No of course they haven't," he tweeted, followed by: "I wonder if hundreds of furious Yoons are screaming that the Welsh Assembly needs to be suspended."

Campbell's later tweets clarified that he didn't think parliaments should give in to terrorism. The rest of us were left wondering whether he'll ever give in to common sense.

The inevitable result of all this was horrendously insensitive bickering. There were unionists arguing with nationalists in Scotland; left-wingers arguing with right-wingers throughout the rest of the UK and beyond; journalists and members of the public using criticisms of point-scoring as point-scoring exercises against one another; and let's not even get started on the likes of Katie Hopkins and their glee at some chaos to revel in.

All this is saddening, because the many, many people who did use their platforms to urge people to come together and look after one another found it a lot harder to rise above the noise.

A few people really ought to be ashamed. Let’s hope they realise that.