Don't be scared to put yourself out there, even if you feel like you're a fraud. We all do. That feeling never completely dissipates. It might go away for a few years, or even for a decade, and then there will be one day when you just can't do something. Something that should be so easy and straightforward, but you just can't do it. No matter how hard you try.
If you're a programmer you than go to sleep and when you wake up you've most likely found the solution (usually something really dumb), it just came up on its own. It's just like you find that one item that you're really looking for when you stop looking for it.
Everyone is not 100% sure of themselves all the times. Everyone has their own little (or big) insecurities, just because someone looks so sure of himself in public it doesn't mean that in private he has never doubted himself. Accept failure as it happens and learn from it so next time you know how to do better. There's no secret to it, people around you are just better at hiding it than you are.
The key takeaway is that no one knows it all and no one has a clue what they're doing. So stop worrying too much about it yourself