As most have said here, Barracks "right off the bat" isn't a good idea. I'd suggest building a Barracks after the first or second expansion city is founded.
We should aim to pump out a settler as soon as our Capital is able to produce one, whether that is 2nd in line, or 3rd in line will depend on the surroundings, and as Cyc's research suggests it's likely it could be pumped out 2nd or even first thing.
However, I'm not sure I like the Idea of havin the Settler being the FIRST unit we produce, because it's good to get an explorer out there to make sure we're not sending our settler into a vast wasteland, wasting time.
When we contact our Neighbors, we need to first analyze our military strength verses them (for future referance) and keep track of it every turnchat, whenever possible. Secondly, Blackheart is right, if possible we need to try to prevent their expansion, however it's unlikely we'll be able to do this early in the game, our best chance early on is to find an Isthmus seperating us and them which we can take 1-2 units (or even a city) to block their passage. This city would also be able to serve another purpose in the future as a Canal for ship travel. However, whether we get such an Isthmus is not garenteed.
As I see it, we have three research options early on
Bronze Working - For spearmen and lead to Swords
Warrior's Code - Lead to Horsemen should we have horses nearby
Masonry - So we can get an early start on Wonder Race if we wish.