One of the reasons why language immersion programs are so effective is that they force you to use the language daily. Consistency is key to mastering any skill, including coding. Read carefully this article by James Clear in which he shares his findings about what makes great writers. Replace "writing fiction" with "writing code" and you possibly get the single most effective piece of advice when it comes to learning to code.
If you prefer videos, check out Stephen Duneier's TED talk, with much the same message.