I really genuinely empathize with you. Here is what helps me when I feel the way you're feeling now:
Remember that nobody expects a junior to know everything, or even most things. Focus on being easy to work with, coachable, and positive. The knowledge and confidence will come.
Remember that if you don't know how to do something, you can always find out how to do it using Google or other programmers (even those outside your organization) as resources. The sum of human knowledge about programming is on the Internet, and you have access. (I know this is pretty obvious but it always helps me to remind myself of it).
I get very tongue-tied and freeze up when asked to explain my code. Remember you don't always have to explain in words. You can show your coworkers or boss what you're doing or how you're working on a problem. If you're put on the spot, open your laptop and give them a demonstration.
Emotions shut down the problem-solving part of your brain. If you find yourself overwhelmed by a feeling of fear that you can't solve a problem, try breathing exercises, take a walk, play Tetris for five minutes, or whatever you find helps you exit that state of anxiety.
I hope this helps!
I still experience #4 even if it no longer is my first job. If possible getting a good night's rest also helps:)
Thanks very much
We're a place where coders share, stay up-to-date and grow their careers.
We strive for transparency and don't collect excess data.