We are organizing Free Code Camp on every Saturday.
CodeCamp uses a "teaching machine" model for training you to understand the code. You have a problem, you type in answers, and test. There are comments that help you debug your answer.
Generally, this is a great way to start out learning code - it gets you into the "write -> test -> debug" loop characteristic of productive coding.
Once you understand the basics of coding, you can use other resources like instructional websites (with text) or video tutorials.
This is the "instructional text" or "instructional distance learning" model and is a bit more like a regular classroom. These may be too hard until you've actually written some simple code, so it makes sense to try FreeCodeCamp first.
The other advantage of the "teaching machine" model is that you can work at your own pace. If you are watching a video on coding, you have to try to keep up with the lecturer - a very similar problem to sitting in class trying to keep up with a (live) teacher.
Overall, both methods are complementary.
However, the best way to force learning (though not the best way to code) is to have a client that expects you to write some code.
These days, learning how to structure your code (meaning you learn how to plan out your code before writing it) is important.
(1) Bring laptop
(2) Solving any challenges coding
(3) Ask for help from mentors
(4) Focus until the end.