The study of formal languages and automata is essential for understanding the theoretical underpinnings of computer science.
I think that’s the single best piece of advice: constantly think about how you could be doing things better and questioning yourself.
It may be the cock that crows, but it is the hen that lays the eggs.
Only by continuous learning can we make continuous progress.