Today, a true tale of heroism that takes place not in a war zone, nor a hospital, but in Victoria station in London in 2007, during a tube strike. Our hero – a transport journalist and self-described "big, stocky bloke with a shaven head" named Gareth Edwards, who first wrote about this experience on the community blog metafilter.com – is standing with other commuters in a long, snaking line for a bus, when a smartly dressed businessman blatantly cuts in line behind him. (Behind him: this detail matters.) The interloper proves immune to polite remonstration, whereupon Edwards is seized by a magnificent idea. He turns to the elderly woman standing behind the queue-jumper, and asks her if she'd like to go ahead of him. She accepts, so he asks the person behind her, and the next person, and the next – until 60 or 70 people have moved ahead, Edwards and the seething queue-jumper shuffling further backwards all the time. The bus finally pulls up, and Edwards hears a shout from the front of the line. It's the elderly woman, addressing him: "Young man! Do you want to go in front of me?"

The study of happiness rightly focuses on such indisputable virtues as gratitude, generosity, and forgiveness. But any honest accounting of the sources of daily pleasure – for me, anyway – must include the exquisite joys of what I've come to think of as Politeness Enforcement Tactics: the guerrilla moves we use to avenge boorish behaviour in public places. Edwards' queue manoeuvre is an extreme example, and not one to be recommended for those of more slender build: in that case, the thwarted queue-jumper eventually threw a punch. But a whole repertoire of lesser tricks is available to the rest of us. If you're hogging an extra train seat with your bags, I'll probably ask to sit there, even if others are free. If you're male, and sitting on a bus or underground train with that absurd, wide-legged, testicle-ventilating stance that implies the need for two seats, I may choose to sit next to you. And if you're obviously speeding when you screech to a halt at the zebra crossing where I'm waiting – well, don't be too surprised if you find that I cross slowly, with a limp. I'm dispensing justice, that's all.

And justice is key: it's only a Politeness Enforcement Tactic if you're punishing a wrong. Make a large person squeeze up unnecessarily on one of the hopelessly inadequate bus seats prevalent today, for example, and you're just being mean. That's also why – with some regret – I can't endorse the amusing product marketed as Knee Defenders, two small plastic chocks for attaching to an aeroplane seat-back table, to stop the person in front reclining their seat: reclining isn't breaking the rules. The true pleasure is in seeing rule-breakers get their comeuppance. This is what psychologists call "altruistic punishment" – "altruistic" because the punisher gets no direct benefit, and may even risk a confrontation, in order to enforce a social norm. It's not rational, in strict economic terms, but it recurs repeatedly in experiments, and it's easy to see the argument that it helps bind societies together. Brain-scan studies aren't the best way to understand such pleasures, but I enjoyed the finding that avenging bad behaviour stimulates the same brain regions as sugary foods: revenge really is sweet.

Yes, I realise these tactics are arguably passive-aggressive. What can I say? I'm stopping civilisation collapsing. You can't have everything. Now, is anyone sitting here?

oliver.burkeman@theguardian.com

twitter.com/oliverburkeman