In the past, everybody using a computer was subjected into learning how to program. Most notably in 8bit home micros which came along with a basic compiler. Of course you weren't subjected into professional programming, especially low level (except from those who decide to move from basic to assembly in the 8bits) or object oriented programming but this was a start and I believe it's a skill developed at an early age. You know, programming sometimes look to me like a savant ability, something that it gets hardwired in you brain in an early age because you like to play with computers instead of doing sports or going after girls. If you sometimes wake up and think of algorithms or dreaming of code and hobbyist programming projects you want to do while waiting for the metro then it has become a part of your life and you have become too efficient in this.
So, real programming doesn't mean to me having a degree or having read the textbooks. It means that you breath this stuff everyday. A friend who has a degree in computer science told me about his first interview which was truly terrifying, when they gave him a piece of paper and asked him a simple question. To write some code in his favorite language that calculates the area of a circle. He was stunned and couldn't think of anything for minutes till he wrote something that was probably wrong. He told me that when a white piece of paper is given to him and he is asked to write a program from scratch, he just can't. He would prefer to have the solution in front of him so that he can study and understand. Needless to say, seconds after he told me the question I already had structured the whole thing in my mind but that's a very easy problem anyways.. (I spent more time in doubt to figure out whether the area of a circle is 2*pi*r or pi*r^2 (I always confuse these two for some reason :P))
I understand him. I have the same problem with maths and I have a degree in maths. I admire or tend to be puzzled by some people who have the talent to be given a mathematical quiz or even a question to prove a theorem we haven't done in the book yet and while I am stunned and can't think of anything for minutes, they have already come with the right way to solve these out of the numerous wrong paths you could follow and end up in a dead end. I don't speak about straight mathematical calculation problems or obvious things but things that few people can solve in almost an instant even without having read the solution before and the more common mortals may take half an hour and still need to scrap everything (this cost me a lot during exams, I had to either memorize hundreds of solutions of various problems in my mind or have that talent, neither which happened :P).
I have noticed the same situation when I was doing private lessons in programming to a computer science student. He was curious many times how I could be given a problem that they were just handed in class and tiny moments after looking at it I would already have an overview of which functions, classes, variables and methods I need to write and use. I had a talent and I didn't even noticed, one that non-experienced computer science students had to make me notice (one's ability is another's disability and vice versa). But it's the same kind of talent that puzzles me when I am unable to solve mathematics in a small frame of time while others have the cryptic answers in their mind already.
Of course, I can understand mathematics and use them for practical applications, so it's not a big deal for my job that I am not good at solving problems fast (you would be wondering how did I got a math degree while not being good at it), while a computer scientist not being good at writing code is a different thing. Of course, it's not that my friend (and many other people) is incapable of solving very simple programming problems. Given time even in front of a piece of paper they would be doing something. In the same manner, I would be able to solve any mathematical problem if I was interested enough and I didn't have to do it in a limited timeframe (like exams). We are not incapable, just not talented.
So, what is the think that makes someone a real programmer (or talented mathematician)? It has to be your life. I tell you, first of all since my eighteen or even before (that must be 1996-1998) I got that obsession about being good at one thing that most people see it like magic. It just happened. I just got the virus in my mind and started thinking about programming. It was the same time I met the demoscene and found my focus there. You know, demoscene had that thing (apart from fun or creativity or friendship), the feeling that you were a part of a unique community and you would be honored deeply if once you could make a great demo to inspire next generations of coders. It was the driving force that kept us working hard in endless nights of coding for nothing. One friend told me this particular phrase that I like: "Fame. It's the money of the internet!" (of course demoscene was existing before internet was introduced, but you know the draft). Imagine now how focused I was into this for ten years with what enthusiasm and that I woke up every day and thought of algorithms and code.
If I was so obsessed with mathematics, if I woke up and thought about challenging problems for endless years, then I wouldn't be so bad with it. But those where just studies, something I had to work with just to get my degree, not a passion, not a hobby or a way to gain self-esteem. Remember how many people may have chosen to start a computer science degree because they think it's the future, or they wanted to create computer games or become a hacker, without following a similar route like mine in the past. Of course, even if someone hasn't been self-educated in his youth, I still believe there is a hope for them if the focus to the new goal is huge. But how many of them were so much focused like I was that they ignore common life and become hermits? Most of them end up failing the courses and wondering what they are doing here.
I will tell you something else now: I am currently going through an MSc that involves both my hobby of programming and computer graphics and it's true that my performance is far below than what I thought (but I am surviving and sometimes doing good at courseworks). For various reasons I am much worse when I have to study these stuff than when I am doing it for a hobby. Also, most students I know (not from this master but mostly undergrads) doesn't seem to be the dedicated people or burned out with programming in the past as me but rather the lay off lazy people who aren't truly interested in the subject outside their job. How the hell are these people going to have real experience with the subject when they finish a master of one year if myself with ten years of experience and true love on the subject isn't focused enough (I am a lay off lazy person too and I am feeling guilty about it :P) when studying this stuff? A computer science undergrad who has finished his studies with the same "love" I have taken the math degree, could he possibly considered experienced in the field after getting a master in graphics in one year? (And don't tell me that not failing in the master will prove that he knows his stuff. There are various "alternative" ways to achieve "success" and you know it..)
Real programming is a way of life. You don't just learn it in universities in one or four years. Look at me! I have a math degree. I suck at solving math problems (in time). Usually I am too slow at reading the mathematical language. I can just apply them and make calculations. I have not a degree related to computer science yet but I can be more fluent in programming than most of the students coming out of computer science departments. A question is of course, how do you make someone becoming self-interested in the subject? Most probably you don't. It just happens to some when they decide for any reason to follow this path instead of doing what the rest of the people do. Another question is, how do you create the ground today for trying this in a world where there are plenty of multimedia, movies, games, social sites and other time wasters and the programming world looks so boring in comparison to these marvels (unlike how glamorous it is portrayed in movies). Of course there is a hidden creative magic in programming in the same way there must be in maths. Maybe schools or universities rarely manage to open the view of students towards the good non-boring side of these subjects. But then there must be a true focus from the individual, which would resemble more something like a true life dream rather than just the essentials for a job. But what about this uberinformation and glamorous world of computing today? Too many users but very few real programmers.
p.s. Part of the randomly scattered thoughts written here came after reading this post on Coding Horror (a lot of interesting stuff in this blog btw). It discusses stories of lead developers interviewing hundreds of computer science graduates and finding out that they can't solve even the simplest problems. Just read the post by yourself to find out.