I was in my forties before I figured out the relationship
between mathematics and computer science. Up until
my late thirties they seemed only vaguely related.
I can put a modest amount of the blame for this on
my university, however; they pushed calculus and
more calculus at me, which I have never found an
application for, and ignored logic, statistics, set
theory, and most of abstract algebra. I suppose this
in part derives from the perception of computer
science as being closely related to other engineering
fields where I believe calculus is more relevant.