The confusing part is that industry doesn't care to differentiate between the two. I think computer science in its purest form is applied mathematics. This becomes especially apparent beginning with analysis of algorithms. In that sense, it has nothing to do with programming: it's general enough to be done by an electrical engineer making the logic in a circuit board rather than a program, or even by a manager devising a new business process. However, programming is where CS is most applied itself. Correctness, Turing-completeness, automata, and complexity are computer science, but these are the tools that assist programming. Programming in its purest form is pretty much the same job as back in the early 19th centry with punch card-driven looms. Good programmers, however, utilize the theory in computer science to be more effective.