IN a few hours' time, the Olympic flame will be extinguished and the Rio Games will be history. So how will we remember them? Undoubtedly, the sporting heroics that had us cheering ourselves hoarse into the wee small hours will linger long in the memory.

But these Games were notable for many things besides great sporting achievements. And for those of us who have been glued to the action which unfolded across 306 events in 28 sports over the past 19 days, there are important lessons to be learned ...

1. Olympians bleed – then bounce back up again

Who didn't wince when French gymnast Samir Ait Said broke his leg as he vaulted in the men's gymnastics qualification? The chilling sound as his tibia and fibula snapped is reported to have echoed around the arena.

Watching on television, it took a few seconds to make sense of the unfolding images, his left leg floppy and twisted at an awkward angle, before the camera swung away from the grisly scene.

Mere mortals would have vowed "never again", but within hours Ait Said was talking about getting back on the horse, metaphorically speaking, and his dreams of competing at Tokyo 2020 in four years' time.

Nor was he alone. Fellow gymnast Andreas Toba tore the anterior cruciate ligament in his knee after a hard fall in the floor exercise but braved excruciating pain to compete on the pommel horse and assist Germany's progress to the team finals.

A day later, Great Britain gymnast Ellie Downie showed her mettle after landing awkwardly on her head and neck following a mistimed tumble on the floor. Taken from the arena by paramedics, she later returned to nail her vault and cement Team GB's spot in the final.

Anyone who has ever called in sick to work with a minor ailment or moaned for hours about a nippy paper cut was instantly humbled. Next time you stub a toe on the bed post and consider calling an ambulance, ask yourself: what would Ellie Downie do? Suck it up.

Mo Farah had his own Chariots Of Fire-esque moment after he tripped and fell halfway through the 10,000m race, then scrambled to his feet and went on to capture gold. A new poster boy for inspirational "Never Give Up" memes was born.

Granted, Farah has some stiff competition in that vein. The sight of Kristin Armstrong completing pretty much the entire cycling time trial with blood streaming from her nose was a remarkable one.

Ditto the determined lunge of Bahamian runner Shaunae Miller as she appeared to lose her balance and topple forwards in the closing metres of the 400m. Miller made a last-ditch dive for the line, throwing herself along the track and edging out USA's Allyson Felix to take gold.

"My mind went blank," Miller said. "The only thing I was thinking was the gold medal and the next thing I was on the ground. I've never done it before. I have cuts and bruises, a few burns. It hurts."

It is a tactic I may employ the next time I'm running to catch the last bus. Or when the chocolate croissant stocks dwindle to perilously low levels in Pret A Manger. Watch out, world.

2. Everyone is an expert

There has been no shortage of "four-year fans" – a nickname for those who rarely watch sport but suddenly become top pundits on everything from archery to wrestling whenever an Olympic Games rolls around.

"Too much splash," they mumble between mouthfuls of crisps while watching the diving from the sofa, before furiously firing off tweets berating Olympic silver medallist Mark Cavendish for "deliberately" causing a crash in the velodrome during the omnium. (He didn't, it was an accident.)

Don't get me wrong: as a sports fan, I love that everyone is taking an interest in a subject that for the 208-odd weeks between Olympics typically musters at best glazed eyes and polite-but-disinterested smiles when I try to engage people in conversation.

My heart sings to overhear chatter on the bus about "that lassie fae Milngavie who won the gold in the cycling" (congratulations Sunday Herald columnist Katie Archibald). It's great that people are marvelling as gymnast Simone Biles defies gravity and awestruck at the fact Usain Bolt can make running 200m look as effortless as an amble to the corner shop.

Less endearing is athletes being lambasted for "poor race tactics" and "easy shots missed" by people who would get out of breath running a bath.

Few will forget the horrific sight of Dutch cyclist Annemiek van Vleuten lying crumpled in a ditch after she crashed while leading the cycling road race. The rider was rushed to intensive care with three fractures to her lower spine.

When van Vleuten later tweeted from hospital to lament on her disappointment at missing out on gold, one chap responded: "First lesson in bicycling. Keep your bike steady … whether fast or slow." Yes, he mansplained cycling to an Olympic cyclist. Let this be a masterclass of what not to do.

3. The 'gods' are still male as sexism endures

No matter how hard women train or how brilliant their performances, the world seems determined to traduce them as lesser to the male gods of the Olympics. We've long known that women in sport face a battle on two fronts. Besides the fight to reach the pinnacle of their chosen discipline and win medals, they have to overcome a slew of sexist and misogynist commentary about the way their achievements are reported.

On the day the Rio Olympics began, Cambridge University Press published a study of the language used to talk about men and women in sport. Analysing 160 million words from newspapers, academic papers, tweets and blogs, researchers found that men are almost three times more likely than women to be mentioned in a sporting context.

While adjectives such as "fastest", "strong", "big", "real" and "great" are regularly attributed to men, women are disproportionately described in relation to their marital status, age or appearance. Terms used include "aged", "older", "pregnant", "married" or "unmarried".

Nor did it take long for this hypothesis to start playing out in real time. When Hungarian swimmer Katinka Hosszu obliterated the world record in the 400m individual medley to win gold, the camera panned to her husband and coach Shane Tusup celebrating. "And there's the man responsible, remarked a commentator for the US-based NBC network.

In volleyball, when Egypt's Doaa Elghobashy and Nada Meawad took to the court, more attention was given to what they were wearing (leggings and sleeved tops – Elghobashy also chose to wear a hijab) than the fact that they were the first women from their country to compete in the sport at an Olympics.

Uzbekistan gymnast Oksana Chusovitina, meanwhile, was criticised for a leotard which "failed to complement her skin tone". Never mind that this is a woman competing in her seventh Olympics and capable of performing the most difficult (and dangerous) vault in the world.

Top billing on "Super Saturday" was the Team GB trio of Jessica Ennis-Hill, Mo Farah and Greg Rutherford as they defended the gold medals won at London 2012 in the heptathlon, 10,000m and long jump respectively.

One didn't need to be a top statistician to tally that the references to Ennis-Hill, motherhood and her post-pregnancy athletics career far outweighed personal comments about Farah and Rutherford who also have young children.

USA star Katie Ledecky, winner of four golds and a silver medal in the pool, was described as swimming "like a man" rather than in terms of her remarkable world-beating athleticism.

Her compatriot Kristin Armstrong triumphed in the cycling time trial, prompting BBC Sport to breathlessly tweet: "At 42 years old she is the oldest rider in the event and it's her third Olympic gold!" How about best rider? Most prolific? Or simply: three-time Olympic champion?

The examples go on. Simone Biles – who claimed four golds and a bronze for USA in gymnastics – was repeatedly compared to a raft of male sporting greats as if that is the only way we could comprehend her colossal achievements.

"I'm not the next Usain Bolt or Michael Phelps," she responded. "I'm the first Simone Biles."

Tennis ace Andy Murray had to remind BBC presenter John Inverdale that women are people too. In a post-match interview, Inverdale stated: "You're the first person ever to win two Olympic tennis gold medals. That's an extraordinary feat, isn't it?"

"Well, to defend the singles title, I think Venus and Serena [Williams] have won about four each," replied Murray dryly – prompting First Minister Nicola Sturgeon to tweet: "Yet another reason to love Andy Murray."

Nor was it only athletes who came under scrutiny. BBC presenter Helen Skelton faced a barrage of criticism for wearing shorts as she fronted the swimming coverage. "Helen Skelton should not spin in the chair ... can tell she's not wearing any knickers," bleated one outraged viewer on Twitter.

The shorts worn by Skelton's colleague Mark Foster, who was sitting beside her, went unremarked upon. It was a jarring case of blatant double standards. When even the often polarising Katie Hopkins spoke out in support of Skelton, you know that the shark has been jumped.

If there is good news to be gleaned from these Olympics, it's that all those expressions of outrage at the sexist commentary suggest that the tide is turning. There is still a long way to go – don't get me started on the thorny issue of financial parity in sport – but the days of batting away casual sexism are gone. Here's hoping that upward trajectory of progress continues.

4. All that glitters is not gold

For all the heart-soaring spectacle, the XXXI Olympiad has had its share of murky moments. The build-up to Rio was largely overshadowed by fears over the Zika virus and marred with drug scandals including the publication of a World Anti-Doping Agency (Wada) report that confirmed allegations of Russian state-sponsored doping.

Many were angered that the International Olympic Committee (IOC) decided against a blanket ban and allowed athletes embroiled in the furore to compete.

Yet, Yuliya Stepanova – an 800m runner and the main whistleblower in this whole sorry affair – was refused the opportunity to take part under a neutral flag. It smacked of cowardly hypocrisy. What chance now of others to come forward in the future and expose cheating?

As her former team-mates competed in Rio, Stepanova has spent recent days being moved from one safe location to another after it emerged Wada had been targeted by hackers and Stepanova's account containing her "whereabouts" information had been compromised.

There have been operational glitches too. The Rio Olympic Games organising committee has come under fire for issues from unfinished accommodation, gas leaks and dodgy plumbing in the athletes' village to poor ticket sales, a stray bullet hitting the roof of equestrian media centre and claims that a kayaker capsized after hitting a submerged sofa.

Then there was the debacle of the diving pool turning green, which, despite repeated claims from organisers that it was "perfectly safe", has since been confirmed as algae-infested.

It transpires that someone accidentally added a large amount of hydrogen peroxide to the pool. This made the chlorine inactive, allowing algae to cloud the water on a hot, humid and windless Rio day. The result? Pea soup. Voila!

Yet, all that pales next to the tawdry antics of 12-time Olympic medallist Ryan Lochte and his fellow US swimmers Gunnar Bentz, Jack Conger and James Feigen.

Brazilian authorities produced evidence on Thursday which appears to contradict claims by the quartet that they were robbed at gunpoint by men pretending to be police officers. It has been alleged that they fabricated the entire story to cover up a brawl at a petrol station.

The US Olympic Committee apologised for the "unacceptable behaviour" of the four men and the media has been far from forgiving. Washington Post columnist Sally Jenkins said Lochte was "caught in a riptide of self-absorption" and "the dumbest bell that ever rang".

The New York Post didn't hold back either, with its headline "Liar, liar, Speedo on fire" branding Lochte "everything the world hates about Americans". Lochte has since apologised "for not being more careful and candid". On Twitter the hashtag #LochteGate has continued trending. Personally I prefer #LochteMessMonster.

Despite all these embarrassing moments there are tangible positives that can be drawn. For the shining beacon of light, we must also have darkness. It is yin and yang. Good and evil. Repeat to fade …

5. We all love a feel good story (especially if there is an underdog involved)

Let's be honest, the pinnacle of watercooler chat is less about who won what and more about triumph over adversity, heart-warming tales and moments of unabashed joy.

It is Argentina's Santiago Lange, a lung cancer survivor, winning gold in sailing. That poignant selfie between North and South Korean gymnasts Hong Un-Jong and Lee Eun-Ju. Gregarious Irish brothers Gary and Paul O'Donovan, who claimed rowing silver, wearing their beloved "podium pants".

I defy anyone not to have had a tear in the eye as the Olympic refugee team walked into the stadium at the opening ceremony. Likewise when five-year-old Finn McManus wrote to Irish bantamweight Michael Conlan, after the Belfast boxer's controversial unanimous loss to Russia's Vladimir Nikitin in the quarter-finals, offering a medal from his school sports day to cheer him up.

And what's not to love about the Olympic super-grans? South Africa's Wayde van Niekerk, who won 400m gold, is coached by a 74-year-old great-grandmother Ans Botha (not his, we should add). Then there was swimmer Adam Peaty's nan, Mavis Williams, proudly tweeting when her grandson triumphed to take gold in the 100m breaststroke. Williams was a delight with her flurry of congratulatory messages to Peaty and his GB team-mates.

All of human life is here. The Olympics is a reminder of how magnificent that can be.

The Rio 2016: Closing Ceremony at the iconic Maracana Stadium, will be on BBC One, tonight, 11.25pm-4am