So there are lots of programming jobs out there at places that are not like the valley. Thing Initech from Office Space - business casual dress code, gantt charts, dreary cubes, long death march schedules you have no control over, people are resources first, salaries are intentionally below market rate...
I landed at one of these a few years ago and got out ASAP. They're out there, but not so much in the Bay Area because the talent war is so hot - any place like that wouldn't be able to hire or keep anyone.