> Experiments going back to the 1980s with teaching children how to program using Lego blocks and robots with Logo seem to indicate that nearly everyone can learn how to program, but possibly not when they’re 18 or 19 and possibly not with the kind of academic environment represented by the test.
I only learned how to program at around age 20 or 21, but at that point I had already been a CS student for 2 years, and of course had failed most of the actual programming-related classes (even though I had earned a A+ in calculus, with congratulations from the professor). I am now a professional programmer, I'm in my early 30s, and as such I'll quickly write down my thoughts on this, maybe it helps someone make some sense of it.
Now, about the particular example in the article, I can still remember the first programming class during my first semester at Uni. I can still remember about how baffled I was when seeing almost the exact same code as in the above article, I was wondering to myself: "assignment works left to right, is the only natural way, what do you mean now "a has the value of b"? You first write down a, the 'equal' sign, and then b, it's only normal that b, coming at the end, takes the value of a". And so on. Someone also mentioned the "competitive" nature of a CS-class, which is 100% spot-on. I had never owned a computer during high-school, while some of the my then-colleagues had been programming for 10 years already, and because of that I was afraid to ask questions or even to ask for help from my colleagues.
And in case you're wondering how did I finally became a programmer, well, it was thanks to Python. At first I started writing some ugly scripts in PHP, but after 6 months I stumbled upon Python. I don't know exactly why, but it's something about this language that makes it very easy for non-programmers to grasp programming language concepts. After one year of doing Python I finally had the balls to try and take my most difficult programming class again. I got an A (the class was taught using the C programming language), with the professor surprised about how had I managed to do that.
I think Python's a great language to start with, maybe. What turned me on to PHP and web programming is that I could do things easily and get visual results back. Flask is a better way to build server side apps than raw PHP, but it hides a lot and a significant part of the Python language needs to be understood to understand a lot of it.
I spent a year learning about website design shortly after turning 14 and during that time eventually came across PHP. For about another year until 10th grade started, I kept doing simple PHP sites. I had looked at Python once and felt kind of offended by it, and I didn't understand OOP. "Why do I have to do mystr.split(' ') instead of explode(' ', $mystr)?" "Why don't variables have sigils?" "What's this import crap?" "Why do I have to have indentation?" (I commonly didn't indent my PHP code during this time.) I also used Windows. I still hate cmd.exe.
I took the AP CS course in 10th grade, and Java forced me to at least partially understand OOP and why it may be useful or cool. (We also did everything on a Mandrake Linux computer.) I looked at Python again about midway through the year and started loving it (I was in the habit of indenting with one space at that point since the teacher required at least some indentation so Python's forced indentation didn't bug me anymore). After several months in Python I began to understand that real OOP went far beyond what Java supported. Now that I'm 21 Python is still my favorite language, but I do really like Clojure.
So I still think Python is a perfect beginner's language, but I'm not entirely convinced that Python as Python is enough to spark an interest to go do your own thing. The first thing I reached for when I learned Python well enough to do anything was video game programming. Making interactive applications that aren't limited to the terminal held my interest a lot more back then.
(My CS teacher also resolved many difficulties with the = sign by always reading code like "a = b" as "a gets b". Some people have trouble enough with homonyms in language, seeing the '=' mean something completely different to what they've been used to for 10 years can be startling.)
'My CS teacher also resolved many difficulties with the = sign by always reading code like "a = b" as "a gets b"'
This is one of the great things about Pascal. The := sign is used for assignment, and the equals sign alone is used for equality. It's very natural to call := 'gets' and keep a clear distinction between assertions and assignments.
I totally agree, := should be used more. (More than once I've had (define := define) in my personal Scheme code.) Unfortunately my enthusiasm in the past has been met with the quip "Any language that uses := as the assignment operator inevitably dooms itself to never becoming more popular than Pascal." Not many people care anymore. (They did at one point; a lot of 80s and some 90s C code is so macro'd up it looks a lot like a dialect of BASIC.)
I only learned how to program at around age 20 or 21, but at that point I had already been a CS student for 2 years, and of course had failed most of the actual programming-related classes (even though I had earned a A+ in calculus, with congratulations from the professor). I am now a professional programmer, I'm in my early 30s, and as such I'll quickly write down my thoughts on this, maybe it helps someone make some sense of it.
Now, about the particular example in the article, I can still remember the first programming class during my first semester at Uni. I can still remember about how baffled I was when seeing almost the exact same code as in the above article, I was wondering to myself: "assignment works left to right, is the only natural way, what do you mean now "a has the value of b"? You first write down a, the 'equal' sign, and then b, it's only normal that b, coming at the end, takes the value of a". And so on. Someone also mentioned the "competitive" nature of a CS-class, which is 100% spot-on. I had never owned a computer during high-school, while some of the my then-colleagues had been programming for 10 years already, and because of that I was afraid to ask questions or even to ask for help from my colleagues.
And in case you're wondering how did I finally became a programmer, well, it was thanks to Python. At first I started writing some ugly scripts in PHP, but after 6 months I stumbled upon Python. I don't know exactly why, but it's something about this language that makes it very easy for non-programmers to grasp programming language concepts. After one year of doing Python I finally had the balls to try and take my most difficult programming class again. I got an A (the class was taught using the C programming language), with the professor surprised about how had I managed to do that.