One does not simply … teach programming
By Dr Shawn Tan August 29, 2013
- Programming not something that can be taught; it is not a mechanical skill, but a creative art
- The ability to program is more than just a collection of language and structural knowledge
RECENTLY, I was asked by several people how come some Computer Science graduates are incapable of programming. There are anecdotes all over the Internet about how some Computer Science graduates cannot write even simple programs.
Now, some will argue that it is not the job of a computer scientist to write software programs as Computer Science is seen as a branch of mathematics, which is more theoretical than applied. While that may be true, coding is essential to realising the solutions and therefore, one must be capable of doing it.
Before I proceed further, I will state this up front – it is my opinion that programming is not something that can be taught. It is not a mechanical skill, but a creative art. I will even go one step further and say that it is impossible to teach someone the ability to be a good programmer.
Some may agree with me and some may not. Some may think me elitist for taking this position and some may even accuse me of being hypocritical. As usual, my opinions are my own and I have my reasons for saying this.
If we look at the body of knowledge that is required in our computing curricula as defined by the MQA (Malaysian Qualifications Agency), it covers areas such as computer architecture, databases, mathematics, data communication, operating systems, programming fundamentals, and software analysis and design.
If we zoom into Computer Science curricula, they go into specific areas such as algorithms, programming languages, human-computer interaction, graphics, intelligent systems, social issues, software engineering and computational science.
In practice, university programmes typically teach at least one programming language and make their students write programs for projects and assignments. There are also many references available on learning a language in 24 hours or 21 days, along with even more websites and tutorials.
However, the flaw with this assumption is that knowledge of a programming language equals the capability to code.
This is absolutely not true. Just like how knowledge of English does not magically make the person a poet, mere knowledge of Java won't make a person a programmer.
Schools can teach programming languages. Every graduate lists several programming languages in their CV these days. When interviewed, some may even be capable of describing what each line of code does. However, few are capable of telling you what the application actually does.
Schools can also teach structure. Some graduates can describe the differences between iteration and recursion, or talk about the many virtues of a hash-table versus a binary-tree. However, few can tell you what is wrong with the way data is organised and how it should be used in an application.
All this point to one fact: That the ability to program is more than just a collection of language and structural knowledge.
A programmer must be capable of grasping complexity while, at the same time, pay great attention to detail. It requires one to be capable of holding the whole of Michelangelo's David in the head while chiselling away at an individual vein on one finger.
This kind of mental acrobatics is not something that simply anyone is capable of doing, nor is it possible to train someone to do it if they do not have the in-born capability to do so. There is a reason why great artists are hard to come by.
I am not saying that good programmers are born with a computer keyboard in their hands. But if you look at the good programmers around you, you will find that they possess certain traits that are often in-born and neither developed nor grown.
This is where our Computer Science programmes will falter. While we can definitely teach language and structure, we have not yet figured out how to train someone with the capability to perform mental feats of this nature.
However, this is not to say the programming cannot be learned. It definitely can.
I would like to suggest that our universities adopt a problem-based approach, which has found some success in other countries. Just like art, the key to improving programming fundamentals is through consistent practice. However, this is of limited help, and will produce average programmers only.
To produce good programmers, we need to take programming out of the classroom and into the real-world. Good programmers have a deep appreciation of how every piece of the pie interacts with the real world. Good programmers must see the bigger picture and work with details.
Our students must be given the opportunity to explore. I would suggest that our universities also adopt a sandwich-like programme, with students working on long-term internships instead of the very limited two-month stints that they do now.
A longer stint would help mould them into better programmers, particularly if they work in teams that share code with each other. They will get to learn good coding practices and learn how to avoid common pitfalls while exercising their brains on real world challenges.
In my next article, I will explore some ways to learn programming, in the classroom and solo.
Dr Shawn Tan is a chartered engineer who has been programming since the late 1980s. A former lecturer and research fellow, he minds his own business at Aeste while reading Law. He designs open-source microprocessors for fun. He can be reached via Twitter as @sybreon.
Bad Computer Science programmes: Parents and industry
Bad Computer Science students, and what must be done
Bad Computer Science lecturers
Is accreditation a bad thing for Computer Science programs?
Too many computer science degree programs in Malaysia?