Religion or ethics until you've covered the relationship between unhappiness and unrealized desires.
I believe that "the relationship between unhappiness and unrealized desires." would be better understood by studying psychology and neurology - and maybe some anthropology, rather religion or/and ethics,though it probably wouldn’t hurt.
I've just gotten to the end of Udacity's CS262 course in programming languages. It's been pretty good. Wes Weimer, the lecturer, seems to be a really cool guy. There's a quote from HPMOR in the final exam, which I thought was pretty cool.
In the last part of the last lecture, Weimer gives advice on what we should learn next. You can watch it here.
He advises that you learn the following (paraphrased):
I thought that was all really useful (except maybe the last two). I've learned up to his required level of philosophy, cognitive psychology, and religion and ethics. I'm working on the physics and gender studies.
(Incidentally, I strongly recommend Udacity for learning programming. It's really good.)