Humans and other mammals are endotherms, meaning we generate our own heat. Reptiles, on the other hand, are ectotherms and rely on their environments for whatever heat they can muster. To maintain their high temperatures, and thus their speed, whipsnakes spend a lot of time basking in the sun. But lying out in the open would expose them to hawks and other predators. The relatively open scrub and chaparral gives them both protective cover and sufficient exposure to the sun.
Whipsnakes do their best hunting in the morning.
Even before whipsnakes get to work, however, they often come completely or partially out of their burrows to sunbathe, soaking up the solar energy that will allow them to strike with lightning speed at the lizards, particularly fence lizards, that make up the bulk of their diet. According to California State University at Hayward herpetologist Sam McGinnis, this specialization is the secret to both the whipsnake's success and predicament. Instead, says McGinnis, whipsnakes are sight hunters. And nothing stimulates a whipsnake like a lizard. Generalists, like coast garter snakes and ourselves, are better at adapting when conditions shift.