Design patterns get obsolete.
Programming languages get obsolete.
Libraries get obsolete.
Mathematics doesn't. Learn CS foundations, logic, proofs to get better at understanding and gain abstraction experience.
Edit: books: How to prove it by D.Velleman, Proofs and concepts, Discrete Math by S.Epp