Can anyone learn to program? No. I would say half the population could learn at least the basics and mechanics of programming. So should everyone of those learn to program? In my opinion, absolutely no. Remember, it is widely considered that it takes about 10 years or 10,000 hours to be good at skills like programming or playing an instrument. A majority will not invest that time in practicing unless they really have the passion.
I think you also need to have a special mindset to become a good programmer. If you learn to program just because you think it is a good career, or something that will pay you a decent salary, but you don’t have the deep interest or the right aptitude, then you will most probably not be a good programmer.
I’m still wondering: why do people who can’t write a simple program even entertain the idea they can get jobs as working programmers? Clearly, some of them must be succeeding. Which means our industry-wide interviewing standards for programmers are woefully inadequate, and that’s a disgrace. It’s degrading to every working programmer.
At least bad programmers can be educated; non-programming programmers are not only hopeless but also cheapen the careers of everyone around them.
A sign of a good or great programmer is passion. You must be really interested in it to be good at it. Anyone can learn to drive a car, but you need passion and dedication to become a Nascar or F1 driver. This is what drove me to spend hours every day after school in the computer room, until the school closed for the night and I was kicked out. I did not have a computer at home, so this (together with the breaks between classes) was my only chance to practice programming. I wanted to learn, to be good at it, to get the computer to do what I wanted it to do. I wanted to find a problem and solve it, and then find a better way to solve the same problem, until I was satisfied I had the best solution I was able to create.
Problem Solving Skills
When you are a programmer, no matter what level, you need to be able to solve problems. If you are a junior programmer, you might get a task assigned to you by a more senior developer, but you still need to break down that task into smaller parts and solve the problem.
After a fair bit of trial and error I’ve discovered that people who struggle to code don’t just struggle on big problems, or even smallish problems (i.e. write a implementation of a linked list). They struggle with tiny problems.
So I set out to develop questions that can identify this kind of developer and came up with a class of questions I call “FizzBuzz Questions” named after a game children often play (or are made to play) in schools in the UK. An example of a Fizz-Buzz question is the following:
Write a program that prints the numbers from 1 to 100. But for multiples of three print “Fizz” instead of the number and for the multiples of five print “Buzz”. For numbers which are multiples of both three and five print “FizzBuzz”.Most good programmers should be able to write out on paper a program which does this in a under a couple of minutes. Want to know something scary? The majority of comp sci graduates can’t. I’ve also seen self-proclaimed senior programmers take more than 10-15 minutes to write a solution.
Logical and Abstract Thinking
This skill goes hand-in-hand with problem solving. You must be able to think though a problem and look at the logic behind it. What tasks/steps are being done in what order? What holes are there in the process? Where could things go wrong? You must be able to anticipate where errors might happen and put in preventive code for that.
Technical Knowledge and Interest
You also need to understand the limitations of the platform, and how code is handled internally. A typical example is how new Notes developers still often use GetNthDocument(), because they don’t understand how it works. In most cases, GetFirstDocument/GetNextDocument() is the preferred way to loop through a collection. Yes, there are some cases where GetNthDocument() can be used without any degradation in performance (I believe in a ordered collection, i.e. the result of FTSearch), but to avoid confusion, I alway recommend new Notes programmers to avoid using that specific function altogether.
Finally you need some basic match skills, as well as knowing your language. If you don’t know about the Modulo operator (available in all programming languages I know), you will struggle with your Fizz-Buzz code…
This is really a combination of everything listed above. Either you have it, or you don’t. You can’t teach aptitude.
Despite the enormous changes which have taken place since electronic computing was invented in the 1950s, some things remain stubbornly the same. In particular, most people can’t learn to program: between 30% and 60% of every university computer science department’s intake fail the first programming course. Experienced teachers are weary but never oblivious of this fact; brighteyed beginners who believe that the old ones must have been doing it wrong learn the truth from bitter experience; and so it has been for almost two generations, ever since the subject began in the 1960s.
So if you don’t have passion and aptitude for programming, perhaps you should consider some other type of work? The world don’t need more programmers who can’t program. But we need to find the ones that have the aptitude and passion and help them become better programmers, or at least give them the chance to learn.
The year I started 7th grade, a computer club was founded in my school. I had never programmed before, but I liked technology and had a cousin who worked as an engineer at Hewlett-Packard in Sweden, so I joined the club from the beginning.
In order to get an access card to the computer room, we had to take a couple of evening classes in Basic programming and general computer knowledge. While I was waiting for the classes to begin, I went to the library and borrowed a book on programming, read it and wrote programs in a notebook, just to understand the principle. When the classes started, I already had a good idea about how it worked, and soon I was spending all my free time after school in the computer room.
Over the next 6 years, I spent probably an average of 3 hours per day writing code, understanding how the computers worked, testing and learning different programs, and exchanging ideas with other and older students. I even choose programming (combined with geography, another favorite subject of mine) to be the subject of my graduation project. Together with my best friend, we calculated that we spent about 800 hours on the project. It even involved me writing a graphics program first, to allow us to draw the maps to use in the program…
We need to give the students of today, starting already in Middle School, the opportunity to learn programming. They need teachers with real work experience as programmers, not just theoretic experince. I know that for example Bruce Elgort (well known in the Lotus/IBM community) is teaching programming at Clark College in Vancouver, WA. But I think we need to find the students with aptitude for programming much earlier and help them become successful.
Perhaps with better education in the US, there would be less of a need to import foreign workers on H-1B visa. Or at least the companies would have a harder case to argue for importing less costly workers from India and China if there were enough good programmers already living in the United States to hire.