Speaking for Competitive Programming, MOOC's will provide good foundation for Theory. However you've to participate eventually in contests to realize depth level and understand that its a different mine field entirely. Note that it will improve your overall problem solving but it has very less in common with interview based question (which are very short, usually need specific DSA/Trick and need to be solved within 10 - 15 mins).
For myself i keep a balance keeping CP more as a hobby and mixing it with other learning.
In my perspective CP and DSA stuff fits much better with Backend Programming compared to UI development. I focussed on full stack initially but came to a realization that i need to move to Backend to avoid the load and conflict of UI work with my DSA related stuff and my interest in high scalability.
Again but that's just my perspective. Might turn out something different for your career path :)