Being confident is about believing in yourself and having knowing you have the abilities necessary to accomplish a task. The task could be anything even programming or asking a woman out on a date.
Confidence is gained overtime, there’s no quick and easy way to get confidence.
Confidence is gained through practice
Confidence is gained through practice and even more practice programming. Try doing things you have done before. Have a look at some of the sites like Project Euler (if you like math) or a site like CodeAbby which is much smaller problems in computer science.
I really recommend trying one of the #100DaysOfCode Challenges or something like it.
Release Your Code
Start a github account and start publishing your code. As a developer, there’s no greater confidence boost than when you see somebody using your code. I absolutely love seeing a star on a project I’ve contributed to in some way.
Read a lot and do the examples
In 2010 or so, I purchased Code Complete and wrote a review about the book. I found that I had learned a lot from it and my confidence really started to grow. I read regularly, but more importantly I try to apply the principles I’m learning in my work. Reading alone may help some, but it’s best to couple it with experience.
Start Writing About the things you’re doing
John Sonmez’s simple programmer blog has really helped me to start sharing more about what I know and what I have done. He has a pretty good five week email course about marketing yourself.
As you write, you will learn a lot more and constantly improve your knowledge and your code.
Set some Goals and achieve them
As a professional, I try to set daily goals, weekly goals and often monthly and annual goals. Goals don’t have to be about earning more money or anything like that. One thing I am constantly striving for is reducing the number of defects in my code, and writing constantly better more readable code.
To conclude, confidence is gained through experience, so remember you need to push yourself to do things you haven’t done before. It’s definitely worth it in the end. Good luck, you can become a more confident programmer over time!