Fear of Failure Leads to Failure
A friend of mine recently said something to this effect:
"Junior devs worry about how to do something right. Senior devs worry about how not to do something wrong."
Put another way, a dev with experience knows that there are many ways to solve just about any problem. Don't hold one approach too precious, but instead be more focused on creating something that will allow you to grow and adapt your design with the inevitably changing needs of the application.
Of course, the best way to understand the pitfalls is to have failed to avoid them in the past. The more times in the past that you've painted yourself into corners, written entirely unmaintainable code, or accidentally taken down a production server, the less likely you are to do it tomorrow.
Build things. Lots of things. Little things and big things. Stupid things and important things. Learn how to be a software developer by pushing up against the edge of your abilities.
Get out there and start failing.
Next Up:
How to Get Good at Talking About Code
Previously:
Rubber Ducking