This is based on the experience of getting my CS degree 10+ years ago. I'm not going to prefix every sentance with IMHO. Of course you don't know how to program, because most computer science programs suck. They teach how to code, the basic stuff like variables, if statements, loops, etc. You probably had a course in data structures and algorithms where you learned how to code your own lists and then how to sort them…
That was all first year in my program. Second year was algorithm design, architecture, source control, *nix devlopment, etc (in addition to math, technical writing, etc).
I don't think my school is particularly spectacular, but even in second year we've gone beyond what you describe, and the people who take the attitudes you talk about have failed out. I don't think most CS programs are as bad as you say.