One summer evening, at sunset, I went down to the garden in my apartment to take a walk. Having come out of AC, a hot wave hit me. It turned out it was 36 degrees. I immediately retreated to the comfort of the AC. The garden was no longer gentle, mild and relaxing. It was almost like a harsh alien landscape.
That made me think, what would it be like if we colonised planets that have a breathable atmosphere, but where it reached 90 degrees during the day? Or -200 during the night? If we built an apartment there, a base of some kind, what would it be like?
To begin with, when the environment is harsh, you’d want to minimise contact with it, which means minimising the surface area of the building. That means a hemispherical building .
We like windows on earth, but in a forbidding world, you’d have few of them. Maybe just one or two for the entire apartment complex. The walls would be made of an insulating material, and each room would be airtight so that if it becomes compromised, you’d leave the room and seal the door behind you.
In fact, it would be a rule never to leave a door open to an unattended room. The last person who leaves seals the door. That way, if there’s a leak, the too hot or too cold outside air doesn’t enter other rooms before someone can act.
You’d probably have non-critical facilities like laboratories near the periphery, and bedrooms near the center. A leak has less chance of killing sleeping people before they can act.
All external walls would have their temperature and pressure monitored every few seconds, 24/7. If there’s an anomaly, buzzers ring, and everyone in the entire base wakes up and either helps others or helps fix the problem. At the least, people would be alert in case things go from bad to worse. There’d be an evacuation protocol — if the buzzer rings, leave the room, verify that no one is still there, and seal the door in 10 seconds.
If it’s 90 degrees outside, you obviously need AC, and failure of air-conditioning means death. Maybe you’d have two redundant air-conditioning units, each powerful enough to keep the entire base at a safe  temperature. Each unit would have a separate power supply .
If an AC fails, it should be sealable so that hot air from outside doesn’t enter the base through the AC unit.
Non-critical things like laptops would be on a separate circuit, so that if someone is watching a movie on a laptop, and the laptop causes a short-circuit, the AC wouldn’t fail.
You’d also have a buffer of ice. The air-conditioning unit would create a huge chunk of ice, say a cylinder 6 feet high and 20 feet wide. This would be in the center of the building. If the power fails, or the air-conditioning fails, people would huddle around the ice block to remain alive. Or battery-powered fans will blow air around the ice to keep part of the base habitable while the power or the AC is fixed .
No matter what measures you take, a single building still has a risk of a collapse, fire or explosion. When that happens on earth, survivors can evacuate into the open. Here, you can’t evacuate into 90-degree air.
So, instead of one big building, you’d have two buildings, connected by a walkway. Each building would have its own power, food, water, communication, AC and other life support, and other critical facilities — enough to sustain the entire population of both buildings for a long time, until the time one building can be repaired, or everyone can evacuate to earth, or a rescue mission from earth can arrive.
The two buildings would be far enough apart that a collapse or fire or explosion in one building wouldn’t affect the other one. They’d be connected by a walkway, maintained at habitable temperature 24x7 . The walkway wouldn’t have air-conditioning or power of its own. It would be air-conditioned from both ends, with each end having enough cooling power to keep the entire walkway habitable if the other end looses power.
External repairs and inspections of the buildings would be done at a suitable time, based on the climate. If it reaches 90 degrees during daytime and 20 degrees during the night, you’d probably do it at night. All entries and exits would be logged, and people would be allowed only a certain amount of time outside. Maybe you’d have a two-person rule, that nobody can go out alone. That way, if they are incapacitated, there’s someone to watch out for them.
And so on. It’s interesting to speculate as to how buildings will change if the environment outside isn’t habitable. Maybe in a few decades, we’d have a permanent base on Mars or other planet. We can then see how it would be designed, and how different from this speculation it would be.
 Or the atmosphere had a slight amount of noxious gas in it. Your lungs would become permanently damaged if you spent an hour outside.
 Another type of forbidding environment is a planet that’s like earth, except that winds reach 100 kph every day. In such an environment, you’d probably have a single-story building, to minimise height.
 Even if uncomfortable, like 35.
 Or maybe a configuration where you could swap power supplies, so that power from supply 1 can go to AC 2 and vice-versa, if needed. This matters if supply 1 and AC 2 fail simultaneously. If you can’t reroute power, you die.
But rerouting shouldn’t done using a central junction or switch, because that then becomes a single point of failure. Maybe you’d have two power sockets and plugs. To swap power supplies, unplug the plugs from each socket and put it into the other one.
 Datacenters already use ice, though for a different reason: to freeze water at night when electricity is cheap, and use it during the day when electricity is costly. Our alien base will use ice for a more important reason: to keep people alive. Backup means something different here from what it does in a datacenter.
 Even if costs a lot of energy to do so. A walkway costs more energy to air-condition than a room with the same floor space, since the walkway has more surface area. Especially when it’s 90 degrees outside, air-conditioning it will cost a huge amount of energy. But that’s the price we need to pay to stay alive.