The typical advice about goal setting goes something like this: Set a goal and then tell lots of people about it. That will keep you accountable. The problem? It seldom works. In fact, it can have the opposite effect.
Multiple psychological studies, some going back as far as 1927, back this up. But here's the gist: When you tell someone about your goal, you get a sense of satisfaction and even a little tingling sense of achievement. Your mind becomes somewhat content, as if you've already achieved that goal. Announcing the goal makes you feel closer to achieving it even though you haven't actually done any work yet.
Psychologists call this a problem of "social reality" or "social acknowledgment." You've identified with an end goal and get a little smug about the thing you haven't done yet. Now you're less likely to do the work. This is also known as having a premature sense of completeness.
Imagine the guy with the Tapout shirt telling everyone he's going to be an MMA champ. Makes him feel like a badass. He's already adopted that identity in his mind, and well, he's got the T-shirt! Problem is, he's never even trained for it, doesn't know even one martial art much less a mixed variety, and he's horribly out of shape. Socially and mentally he's a mixed martial artist. In reality, he's just a fan with delusions of grandeur and bad taste in T-shirts.
First, you can keep your mouth shut. Resist the urge to talk about your goal. Delay the sense of gratification. Be the person that achieves cool things, not the person who talks about achieving cool things and never does. Or do as Derek Sivers says: go ahead and talk about your goal but do so in way that doesn't give you much satisfaction. Two examples:
My goal is to stop drinking sodas. It's going to suck.
My goal is to bench press 400 pounds. It'll take a year or more of intense effort and smart programming.
Another problem: people are assholes. Or at least a lot of them are. They're dealing with their own inner whirlwind of doubts and insecurities, and when someone decides to do something great, well, that hurts their wittle feelings.
They usually won't blatantly discourage your aspirations, but they will do it in more subtle ways: little comments or small actions that cause you to waver. Tell your coworker your goal is to lose ten pounds and sure enough she'll shove a cookie in your face the next week because, "You deserve a reward." The bitch.
Better to keep your mouth closed, do your thing, and celebrate your actual achievements, not your make-believe good intentions.