From Wikipedia, computer science:
is the study of the theoretical foundations of information and computation and of practical techniques for their implementation and application in computer systems.[1][2] Computer scientists invent algorithmic processes that create, describe, and transform information and formulate suitable abstractions to model complex systems".
Should a web programmer learn "computer science"? Well, keep in mind that computer science isn't just one thing. It's not like learning Algebra...computer science encompasses pretty much all the theory behind computation. Computer science varies from algorithm analysis (figuring out how fast something goes or how much space it takes up) to testing the limits of computation (Automata theory, etc.).
There are a lot of "computer science" topics I see being used in my work place. The main computer science topics a programmer needs to know are data structures, sorting algorithms, and Big-oh analysis. Of course, the more you learn, the more you know about computers. However, these three topics are central to actual/typical programming, from what I've seen. Their relevance:
- Data structures will give you insight on better ways to structure your program/data. Understanding the pros and cons of different data structures will allow you to make better programming decisions.
- Understanding the complexity of sorting algorithms will give you insight on what methods to use if you want to sort data.
- Understanding big-Oh will help you analyze the speed and space of different algorithms.
It's actually fairly typical for me to hear workplace dialogue such as:
"You're using a hash-table to implement this? You realize that's going to give you O(nlogn) complexity? In order for this to be fast enough for the customer, we're going to need something that's O(logn)."
(note: dialogue nonsensical)