I'm a developer with children in NYC. If you don't want to live in another state, Brooklyn and Queens are fairly common options for tech folks who work in Manhattan.
Commuting from Brooklyn (which isn't technically another city) to where I work in Manhattan takes about 45 minutes. That includes the walks to and from the subway. It's a quite pleasant commute...I live far enough away that I basically always get a seat on the subway and can comfortably read on my way into work.
If you live closer to Manhattan, the rents go up and the commute gets shorter, but you're less likely to get a seat every morning. Standing isn't that big of a deal, but it makes it tougher to read sometimes.
I'd say 45 minutes each way is pretty easy. 30 minutes and under can be tougher and more expensive to pull off.
Walks to/from the Subway in Manhattan are typically less than 10 minutes, almost no matter where the office is. There's a lot of tech in the Union Square area, which has a ton of subway access.
In Brooklyn, depending on where you live, it can be a bit more of a walk to the subway, but I've never had more than a 12 minute walk and today I can do it in 5.