Regarding the switching between different subjects or projects, what helped me was to quickly write down TODO notes of actions I should immediately take when picking up the subject again. For example "Finish exercise X", "Watch lecture Y" or "Run unit tests of project Z".
I found my self dive in to the subject much faster when there was no need to think about where to start.