Will Hurd is one I can think of off the top of my head: https://en.m.wikipedia.org/wiki/Will_Hurd
the current mayor of Nashville, TN is a software architect (took a sabbatical to run for office, was a 2 term city council member).
Not exactly a programmer, but a professor of computer science. He was the mayor of the city where I lived
Aaron Swartz: https://en.wikipedia.org/wiki/Aaron_Swartz
Thomas Massie would be the example that comes to mind.
The perl6 brosephina for sure.
I believe the former prime minister of Singapore studied Math, CS and worked as a programmer for some time, here is more discussion and some other examples: https://news.ycombinator.com/item?id=9419035