I would much rather do the right thing poorly than do the wrong thing well.
Doing anything well requires effort. Understanding, failing, learning - it's a huge investment of time and energy. It is not wise to put that effort forward unless you're sure you're doing the right thing. Of course, it is impossible to know for sure whether something is worth doing. But we should try our best first.
This is also a good remedy for perfectionism. If being on the right path is more valuable than how well you tread it, it's okay to be bad at something. At least you're moving in the right direction, which is certainly more valuable than being great at something that has little value.
It's important to mention that deciding what's right and wrong is up to an individual. What you assign meaning to is what matters. Just make sure you're not wasting your discipline.