Coding is fun and easy. However, getting to the fun parts requires patience and practice. While you practice, you build experience. This is work. Work can be very rewarding but it is still work.
Many people think the work we developers do requires you to be a freakishly smart person. This is not so. You do not need be a rocket scientist. You just need to be patient and disciplined in the art of coding.
When you are frustrated the first thing you lose is your patience. You get emotional and flustered and your vision gets colored. Usually in a manner that makes you lose site of fundamentals such as spelling.
Developers would have you believe that their minds are special. They are not. Great developers are just great at following the basics and using simple, logical steps to track down bugs.
Wax on, wax off. It is not sexy but it is effective.