Your comment got me thinking about street food and I remembered that the best tacos I ever had were at a hole-in-the-wall that was a favorite of Mexico City Taxi Drivers. But, I went with a local guy, who knew what he was doing...the only advice he gave me was to drink the beer out of the bottles and not out of the grimy glasses. So, yeah, if you have local friends or colleagues, your options really open up and you can safely experience the "real" food of the city. I wouldn't rely on advice from strangers on the street, though.
And, yeah, you're clearly well-traveled. I had my own "ten days" problem once in India...before I knew not to take ice in my drink. You can drink all the bottled water you want, but if you put ice cubes made from tap water in your drinks, it's all over (same thing with brushing your teeth...bottled water only).
The only good thing is that an experienced traveler can recognize that s/he made a mistake in an hour or two when you get that familiar "bad feeling" in your stomach and gut...we all know what it feels like. After that trip, I started calling my doctor and getting a prescription for a ten-day course of Cipro that I took with me in my travel kit whenever I went to a Third World country. If you start taking it as soon as you "know" you've consumed the wrong thing, it'll knock it out in 24 hours. Now, I guess it would be a Z-pack.