I'm not an anti snake person. I don't say let's hunt them all down and kill them. They do their part of nature and do help us control other vermin. That said, you would certainly never see me keep one for a pet.
My run is enclosed by half-inch hardware cloth. The Gap around the door, I think, is close enough that any snake big enough to eat an egg could not get through. So I don't worry about snakes in the chicken run or coop.
My dog, on the other hand, is definitely not a fan of snakes. So far this year, she has killed three black snakes that I know of. Each has been over five and a half feet long. On the three occasions I have observed her confronting a snake, I'll let nature take its course. Just as nature tell snakes to go after an easy meal, nature tells my dog to go after snakes. It's brutal to watch, but afterwards my dog is just so pleased with herself, you can see her Beam with pride. Now she has never been trained to be violent with anything. In fact, I got her with the hopes that she would be more threatening to any two-legged varmints that might come around. Failure. I call her my watchdog. Because if somebody broke into my house, she would watch them take all my belongings. But I have seen her deal with snakes and feral cats. And even if I wanted to intervene, there is not time. She sees, and it's over. Except for my chickens. I did train her to not attack the chickens. That was a long, arduous, and a couple times even a little brutal training. But other than my chickens, let nature do what nature does.