It has been suggested that the three core concepts of assignment, encapsulation, and inheritance are unteachable/unlearnable and have to be present a priori in order to become a programmer with any competence.
I've seen people not be able to answer these questions, even after a term of CS. :c
I would tend to agree.
I have seen over the last couple years a number of people who were passionate and dedicated to learning programming fail, and fail hard.
Two years ago I was tutoring a young lady that had a serious passion for programming, it was what she talked about constantly, and she was in college taking a number of beginning courses in programming. She studied day in and day out, working countless hours every night trying to "practice being a programmer". She did every exercise given in the text books, and even had a number of other textbooks on VB.NET (the language being taught in the course.) and she studied them for hours every night. At the end of two semesters she still could not program anything if the steps to the goal were not outlined for her. She could recite to you the syntax of VB.NET and many of its companion (.NET) libraries by heart, she could tell you what a piece of code did when she looked at it (she was strangely adept at reading code and knowing what it did) but to ask her to come up with the required steps to sort an array of numbers from highest to lowest and her brain simply could not break down the logic to a point where she could write it herself.
I also tutored a young fellow last fall that was in a similar predicament. He was trying to pass a basic programming course so he could get an IT diploma and this one beginner programming course was a requirement for this diploma. He was driven to study, and was willing to put forth the effort to get through this course, and he most likely would have (given multiple choice options been) able to see the pattern. On the other hand ask him to assign the value of “b” to ”a” and he would start to get lost. Ask him to assign “b” to “a” and “a” to “c” and “d” to ”b” and he completely shuts down. No matter how many examples he was given, no matter how hard I tried to show him alternate ways of looking at it, the act of assigning values to variables and then interacting with those variables to manipulate the values just would not stick.
My opinion after dealing with a number of others like these two students is that some people lack the ability to develop patterns. Not necessarily to see patterns, but to come up with their own. They tend to have poor visualization skills and they tend to find it hard to understand the pattern links when given something like an analogy. I would say that the ideas behind encapsulation and inheritance stem from assignment but they look at larger assignment patterns than a simple a = b. Thus, if the individual lacks the basic ability to conceive the pattern of assignment required to get to the goal of the code they are not able to learn the ability to program.
I've seen people not be able to answer these questions, even after a term of CS. :c