As someone with a degree in chemistry and now attempting to self-learn CS, I have found working through detailed books and problems the best way to learn.
If only I would have known this simple fact in my chemistry lectures instead of trying to look through the book for what the teacher would test on. Yes I tested well but my understanding of the full concepts is not as expected.