Ask for Forgiveness or Look Before You Leap?

Ask for Forgiveness or Look Before You Leap?

The problem with looking before leaping, is you never know if you will catch everything odd that will come your way, and still raise an exception. Therefore, you are best to handle inappropriate input as exceptions in a try/catch block rather trying to catch it in advance.
Plus it's actually faster to ask for forgiveness than permission -- as looking before leaping means you are always checking, rather then capturing the exception and dealing with it when it's raised.

NPR

Most Oil Should Stay Underground, Study Finds : NPR

With tens of thousands of people displaced by floods, wildfires and hurricanes this summer, researchers warn that the majority of untapped fossil fuels must remain in the ground to avoid even more extreme weather.

Fossil fuel producers should avoid extracting at least 90% of coal reserves and 60% of oil and gas reserves by 2050, according to a study published in Nature, to limit global temperature rise to 2.7 degrees Fahrenheit. Even then, that gives the planet only a 50% chance of avoiding a climate hotter than that.

Global temperatures have already warmed about 2 degrees Fahrenheit since the late 1800s, due in large part to the burning of fossil fuels, which releases gases that trap heat in the atmosphere. As a result of the warming, droughts, storms and heat waves are becoming more extreme, causing a cascade of disasters.