Why learn to programming is so hard for many people?

This is another essay I wrote for the MOOC of which I previously wrote. It is about some personal reflections on the difficulty of learn to program computers for some people.

I’ve been trying to write this essay several times. Curiously, I found difficult to explain why learning programming is hard without involve a lot of knowledge that help me to conquer this activity.

In my nearly 30 year of professional experience, I had to learn to code in several dozens of computer programming languages. Some of these languages are disappeared. Some other still exists but are rare and few people know them. Some other are old, very old and still there is an active community of programmers and enterprises that use them. I can tell you, some languages are similar to others and when you learn one you almost learnt the other. But there are other programming languages that are unique, even beautiful on how they allow you to express your ideas in just few lines on the steps to solve a problem or just get result after you process a bunch of data.

Learning to program is hard for several reasons. That’s why there is no simple answer to “Why learn to programming is so hard for many people?”. Sometimes helps knowing how the computer works. Sometimes there is no difference if you know what the CPU does  and how it does it. Sometimes is better if you know about your problem and the domain which it belongs. And, sometimes even this is not enough.

A very important aspect of learn to programming is understand the programming language’s vision of the world. Every programming language has a particular idea of how the programmer has to code. How he or she must structure his or hers ideas to get a response from the computer. This is not limited to just learn a bunch of reserved words, syntax, data or control structures. You have to understand which is the philosophy behind the programming language. For example, if the language comes from what is called an imperative paradigm (like Pascal or C), the main idea is to think in instructions that sequentially are executed just simply commanding to take some data, work in them and returning a result, over and over, controlling the work flow with just blocks of sequential instructions, and loops and branching statements. In contrast, to think code in languages like Prolog, which belongs to what is called declaratives languages or declaratives paradigms, is different. In this family language you don’t have to worry for the internal data manipulation or representation. In this case you have to worry for express your problem in terms of a declarative of facts and rules over them, and just let the interpreter or compiler generate the detailed program to find the solution which satisfy all constraints.

Imagine this in terms of two robots, one with an imperative brain and the other with a declarative one. The task for both robots is to change a defective bulb. For the imperative one, you have to tell it: go, take an staircase and put it below the bulb, up there steps, take the bulb with  a 3 lb per squared inch of pressure and turn it clockwise until it left its socket. The put the new bulb with 3 lb per squared inch pressure, press it into the socket and turn it counter clockwise until it stops. Then go down the staircase, dispose the defective bulb and remove the staircase. Of course this must be made with much more detail description but I think you got the whole picture at this point. Now, imagine the same task with the declarative brain robot. You only have to command it: There is a defective bulb, go change it.

So, generally speaking, learn to programming is hard because you need to think in terms of what the programming language is designed, you need to express in this terms the idea you have on how a task or problem must be approached. You need to understand the syntax of your programming language and you have to realise what computer are able to do and what don’t. That is, understand how the computer works gives you a much better  idea on how to express what you want the computer do for you.

Responder

Introduce tus datos o haz clic en un icono para iniciar sesión:

Logo de WordPress.com

Estás comentando usando tu cuenta de WordPress.com. Cerrar sesión / Cambiar )

Imagen de Twitter

Estás comentando usando tu cuenta de Twitter. Cerrar sesión / Cambiar )

Foto de Facebook

Estás comentando usando tu cuenta de Facebook. Cerrar sesión / Cambiar )

Google+ photo

Estás comentando usando tu cuenta de Google+. Cerrar sesión / Cambiar )

Conectando a %s