One somewhat useful heuristic I've found for judging my own competence: If I think someone is wrong but I can't say why, I'm probably the incompetent one (they may be also). But if I think someone is wrong and I can give clear directions as to what they are doing wrong and how to fix it, I probably have a better understanding of the subject domain than they do.
It doesn't always work, and but it's especially handy when you turn it around and get someone else to tell you exactly why what you are doing is wrong.