Earthquake engineers often say earthquakes don't kill people, collapsing buildings do. The tragic loss of life that followed the huge earthquake in Nepal on April 25 occurred despite the fact that the country is among the world's leaders in community-based efforts to reduce disaster risk. But poverty, corruption, and poor governance have all led to a failure to enforce building codes – as has a shortage of skilled engineers, planners and architects.

Sadly the country was on its way to deploying knowledge and skills to tackle its long-term vulnerability just as the ground shook.

So why aren't more buildings designed to withstand shaking – even extreme shaking.

To keep buildings standing, it is essential to have adequate building and planning codes, as well as proper training and certification for professionals such as engineers, architects, and planners. But having certification and codes on paper does not ensure implementation or compliance. Nepal does, after all, have some of these things. Laws and regulations must also be monitored and enforced. That is not easy in a country such as Nepal, which has isolated villages, a history of conflict and many governance difficulties.

Vast vulnerability

Financial as well as social resources are needed to set up earthquake resistant buildings. Governments at all levels need to be functioning and competent in order to engage with processes such as urban planning and earthquake-resistant construction. Citizens must trust and have the opportunity to work with their governments, including the law enforcement and judicial sectors.

It's not just about buildings. Many non-structural measures are needed to ensure survivability in earthquakes. Appliances such as televisions, microwaves, hot water boilers, and refrigerators (which do not always exist in Nepalese homes) must be securely fastened to the floors and the walls. Otherwise, they move and topple, killing as readily as building collapse. Even in affluent earthquake-prone locations such as New Zealand and California, we see shockingly low rates of households enacting these basic measures.

But Nepal is not New Zealand or California. It has been wracked by conflict and troubled by unstable governments, not to mention the governance issues caused by being sandwiched between China and India. It has long had high poverty and low formal education rates.

Despite recent improvements, Nepal still lags behind other countries when it comes to human development and it is still seen as highly corrupt. It also scores badly on child health and gender equality measurements.

When families struggle daily for enough food to keep their children healthy, they are not likely to spend time thinking about making their home earthquake resistant.

And when children are malnourished and stunted, they perform worse in school. That leads to long-term education inadequacies that prevent them from developing into adults with the skills to lobby for adequate and enforced building codes. What's more, when women lack the same opportunities as men, half the population is excluded from demanding and enacting good governance.

All these factors contribute to the country's vulnerability. All these factors have led to housing and infrastructure prone to collapse in an earthquake.

Rebuilding a nation

None of these things can be solved overnight. Tackling vulnerability is a long-term process, yet earthquakes strike and bring down buildings in seconds and minutes.

As the earthquake struck, Nepalese people were working hard to overcome these vulnerability conditions. My friends and colleagues from the country have taught me plenty about retrofitting buildings and constructing earthquake-resistant homes.

They travelled to communities with small shake tables, which are used to simulate earthquakes by shaking model houses or building components, showing the difference between an earthquake-resistant house and a non-earthquake resistant house. They made many schools safe. They taught school children and their parents about earthquake-safe behaviour.

These efforts saved hundreds of lives, if not more, during the recent tremors. With a few more decades, a mere instant in geological time, they could have made Nepal comparatively safe from earthquake disasters despite earthquakes. In that time, so many more buildings would have been retrofitted, we might have had adequate building code enforcement, and most importantly, an earthquake-educated and vulnerability-educated generation would have started to take power.

Nepal must now continue these efforts in order to avoid similar future devastation. We can be optimistic. Education is happening – for boys and girls. Women are increasingly being given equal opportunities as men. This means the Nepalese people are taking charge of their own health, their own environment, and their own sustainability. That is vulnerability reduction over the long-term.