I have always considered that when I hit this point of frustration that I'm talking about. It feels like it's the only variable I've not taken into account.
are you in a city with PHP/python /ruby usergroups/Meetups or hackerspaces or maybe coffee shops where people hang out and code? It's hard to code for extended periods in isolation