Yes, but factor in all the activity and opportunities and life of the city, and it's worth moving there. Besides, it's not really higher cost if the wage of the industry you're working in scales nicely with the cost of living (true for programming).
I live in Manhattan. Within some 2-digit amount of minutes, I can experience the Tribeca Film Festival, I can visit some of the best museums and galleries in the world, I can get involved in the thriving nightlife, dozens of top restaurants, hundreds of huge retailers, and a massive tech scene. Whether we're talking conferences or weekly meetups or user groups or opportunities like Hacker School, there's just a higher chance it's going on in NYC than in a smaller city. Obviously when it comes specifically to the tech scene SF+SV+Bay Area is the juggernaut, but comparing NYC and SF to some small town is comparing some top college football player to some NFL players to your local middle school's quarterback. Yes, if I lived in the Midwest, I could get a McMansion and slightly larger numbers in the bank account if my industry's salary doesn't scale well between city sizes (again, programming does), but is it really worth it to give up all the other opportunities and stuff in bigger cities?
I live in Manhattan. Within some 2-digit amount of minutes, I can experience the Tribeca Film Festival, I can visit some of the best museums and galleries in the world, I can get involved in the thriving nightlife, dozens of top restaurants, hundreds of huge retailers, and a massive tech scene. Whether we're talking conferences or weekly meetups or user groups or opportunities like Hacker School, there's just a higher chance it's going on in NYC than in a smaller city. Obviously when it comes specifically to the tech scene SF+SV+Bay Area is the juggernaut, but comparing NYC and SF to some small town is comparing some top college football player to some NFL players to your local middle school's quarterback. Yes, if I lived in the Midwest, I could get a McMansion and slightly larger numbers in the bank account if my industry's salary doesn't scale well between city sizes (again, programming does), but is it really worth it to give up all the other opportunities and stuff in bigger cities?