I bet there are many undergrads who would like to end up between WordPress "gluer" and JIT programming language author. (Personally, the thought of computer research seems extremely boring, so I'll let someone else have that fun). For these people, a degree in Math could be a good alternative to a CS degree. In my case, I had terrible CS professors but not enough money to move away to a better university. Luckily the Math program at my university is composed of excellent professors with extremely challenging content. Proofs have taught me how to think in different ways, greatly aiding my critical thinking abilities. Additionally, a degree in Math could help you become a more specialized programmer in an area such as finance or biology.
TL;DR If you're a CS undergrad thinking of dropping out, give your math department a chance.
I have to agree about Math as an alternative. While I was not a great Mathematician ( a few classes I barely managed) but the content is very interesting and often mind boggling. Stictly CS would have been maybe more direct for my choosen job but the cool thing about Math degrees is that since a huge chunk of prereqs for comp sci degrees are math courses, you can probably take most course in the CS dept you want. And you get to learn something just for fun (aka advanced math to me was fun).
Agree that Proofs, logical thinking, creative thinking are all things that can be learned in a Math degree. Those skills are what I use the most at work.
or maybe give a math minor a chance! I ended up majoring in both Computer Science and Theoretical Mathematics in my undergraduate institution - and while I feel that Real Analysis did not directly help my programming skills, it's definitely made me a lot more comfortable with proofs and being able to make sense of things like approximation algorithms for NP-Complete problems. I also concur that it's improved my general thinking prowess, since at the end of the day, math is just reasoning about well defined systems, which definitely has many parallels to computer science.
TL;DR If you're a CS undergrad thinking of dropping out, give your math department a chance.