This summer has given us all a taste of what’s to come as the world heats up – and it’s shown what we need to do in order to deal with the coming challenges.

In July, a high-pressure system called the Azores High – which usually sits off Spain – grew larger and moved further north pushing temperatures in the UK to 40C.

August has seen a second heatwave – though temperatures did not reach the heights they did earlier in the summer.

And throughout all of this, we had very little rain.

Water companies were forced to implement hosepipe bans and elsewhere in the country tankers and lorry-loads of bottled water have been getting people through extended periods of time without running water.

Criticism was – rightly or wrongly – levelled at water companies for a lack of investment in pipes and reservoirs that make sure water comes out of our taps.

Then, as the heatwave broke earlier this week, rain lashed down on some parts of the country.

In north-east London, some rain gauges recorded as much as 120mm in around 24 hours. While closer to home, one near Monewden, in Suffolk, recorded nearly 60mm. Other parts of East Anglia did not register any rain at all.

On the Suffolk/Essex border, some roads flooded, while 40 beaches around the country issued pollution warnings after sewage overflowed following the heavy rainfall.

Again, water firms were criticised.

In response, Anglian Water said: “Combined storm overflows (CSOs) were originally designed to protect homes and businesses from flooding during heavy rainfall, like we saw last night.

“In parts of our region last night, we saw almost 100ml of rain fall in only a few hours. That’s the equivalent of well over a month’s worth on to ground that is essentially like concrete.

“As it’s been dry for so long, intense rainfall on to hard ground will not soak in and instead runs straight off.”

This response misses one key aspect of the weather we have seen this summer: it is going to become the new normal.

Mark McCarthy, head of the Met Office National Climate Information Centre, said in the future the UK is projected to have hotter and drier summers because of climate change.

At the same time, short periods of heavy rain are expected to increase because of climate change.

So the pendulum of extreme weather we have seen this summer – from hot and dry, to very wet – is only set to swing more quickly as climate change takes hold.

The infrastructure that sustains life as we know it will rapidly struggle to keep up with the changing climate.

Already this year we have seen problems ranging from overflowing sewage systems to roads melting and even train tracks warping.

What is the solution?

The most painless solution would have been to stop the runaway train of climate change before it ever got going. Sadly, that option has now passed.

Instead, we need to adapt.

We need to invest in infrastructure – enlarging sewers so they are capable of handling larger volumes of water in shorter spaces of time, building roads capable of withstanding the heat of the sun, laying railway tracks that don’t warp in 40C heat and planting trees to keep urban areas cool.

But we should also adapt how live our lives.

During a heatwave in Chicago in 1995 around 700 people died.

But in a study of the events, sociologist Eric Klinenberg found that people in a rundown, unsafe area of the city died at 10 times the rate those living in a bustling community just a stone's throw away, despite the fact that both areas had plenty of residents who were particularly vulnerable to the heat.

His conclusion? That an area where people felt safe leaving their homes to step into the air-conditioned cool of a nearby shop and felt part of a community, had helped people survive the heat.

Building good places to live, then, is something we must do – alongside beefing up our infrastructure and cutting emissions – if we’re to weather the storms climate change will bring.