Researchers working in Australia have discovered ways in which fruit flies might react to extreme fluctuations in temperature. Short-term exposure to high heat stress ("heat hardening") has been known to have negative effects on Drosophila. But Loeschcke and Hoffmann discovered that it can have advantages too. Flies exposed to heat hardening were much more able to find their way to bait on very hot days than were the flies that were exposed to cooler temperatures, but the heat hardened flies did poorly on cool days.
Loeschcke and Hoffmann did field releases with colored flies exposed to different heat hardening treatments to get estimates of a fitness component in the wild. They used the likelihood to be caught at baits in field sites without natural resources as an estimate of fitness in Drosophila. The results showed that heat treated flies were much more often caught at the baits at very hot temperatures while control flies were more often caught at cooler temperatures, while there was an overall balance between negative and positive effects of the heat treatment at intermediate temperatures. As Volker Loeschcke puts it, "a small amount of heat exposure really toughens flies up against a heat wave, but they don't do quite as well when things are cooler." This means that heat hardening is really important in climates where there are hot days over 37 Celsius in summer, but there's not much benefit when it's always warm or always cool. Hardening is likely to become increasingly important for survival as global warming makes our weather more variable.