It's really hard to know how competent you are in any field, if you are incompetent.
There are known knowns, known unknowns, and unknown unknowns. The problem with really bad programmers, is that the unknown unknowns for them are really large... so they have no ability to gauge just how incompetent they are.
On the contrary,when you get better at coding, just like mathematics,whe you compare your codes with others programmers and are comfortable with the similar code patterns and habits, thats one of the indications that you're becoming a great programmer, just like mathematics.
There are known knowns, known unknowns, and unknown unknowns. The problem with really bad programmers, is that the unknown unknowns for them are really large... so they have no ability to gauge just how incompetent they are.
http://en.wikipedia.org/wiki/Dunning-Kruger_effect