[PYTHON] Why super-intelligents couldn't understand the class

From March, my workplace has been working from home for the time being. This is due to the prevention of the spread of the new coronavirus. The amount of work is reduced because there are some jobs that can only be done at work. Now that I have time, I'm thinking of writing an article on Qiita and leaving something useful later.

Why Python study sessions failed

A few years ago, I hosted a weekly Python study session at work. A few people who were much smarter than me attended. From now on, Python will be popular, so it was supposed to be a cool project to get ahead and acquire skills. But it didn't work. The biggest reason was that the class was difficult to understand. Even the super-intelligents who use the world's best supercomputer, K computer, could not understand the concept of class.

A feeling of helplessness that could not explain the class

First, people who have used older languages seemed to have trouble understanding the class. Many of the people who attended this study session were old-timers who used FORTRAN77 or just took c-language exercises when they were students. There are still ordinary people in the engineering field who use FORTRAN. For those who mainly come to procedural languages, class definitions seem very verbose and unnecessary. Even if I explain the merits of object-oriented programming, I get a response saying, "But if you do your best, you can do it with FORTRAN." If that is said, it will be "That's right ...", and I can't argue except to explain the merits of large-scale development at best.

Secondly, the example seems to be unfamiliar to those who have little experience writing programs. An example of deriving an ambulance class from a car class is a staple of object-oriented introductory books. However, when I talk about this, I get a response saying "So what do you want to say?" When people say, "I understand the story of ambulances, but I don't know what they have to do with programming," I feel like "that's the case ...".

Why classes are difficult

The difficulty with object-oriented explanations was the inability to convey the meaning of the terms. In technical writing, if you cannot find the corresponding Japanese translation, you basically translate the English words in katakana. But for high-abstraction stories, this hinders understanding of new concepts. When you first hear the word "object-oriented", do you really get a sense of it? It is absolutely impossible for the owner of ordinary Japanese sense. But when an English-speaking person hears object-oriented, the feeling of the word triggers "something better to spend more time on the objects the program handles than the processing steps. An image like "Isn't it?" Will spring up in your brain.

Similarly, when you hear the word class, the image of an elementary school class comes first for Japanese people. Even if you listen to the story of the ambulance while dragging that image, it is natural that the image in the brain is not focused. Moreover, the instance, the object, and the override can only be heard as the name of the weapon of the Chunibyo anime that caused the Gestaltzerfall.

It ’s not a laugh, it ’s a big problem.

This is not just a problem for the study session I sponsored, it is not a problem for old or inexperienced people, but it is a common problem for programming learning. In addition, the Japanese who are studying with incomprehensible translation may have wasted the difficulty of learning programming. Perhaps we are losing a tremendous amount of time.

What to do then

We need a clearer overview of object-orientation. Since a program is an instruction to a computer, it is natural to think of a chronological order of instructions. Even so, I'm trying to explain a different method, so it's better to show a familiar bird's-eye view at an early stage of learning and have people understand that there is certainly such a method. After convincing the big story, the hurdles should be lower if you go into details such as operators and variable definitions.

It is also necessary to use a little more practical example. The examples of making an ambulance from a car or making a manager from an employee are straightforward for those who already understand. But for those who don't understand it yet, the source code and ambulance are irrelevant. The last way to convey an abstract concept is to give some concrete examples to get an idea of something in common. It would be better to use a more realistic example.

A more understandable Japanese translation is needed for terms that refer to abstract concepts that appear in programming. Since we are talking about invisible things, it cannot be explained by arranging katakana words that cannot be understood. If Japanese uses Chinese, it may help to form a little first-look image. Also, although it is not a general method, if you are dealing with super-intelligent people like the study session I sponsored, having them study with the original work is also an option.

From now on, even elementary school students are trying to do programming, but at present, it seems that they have completely failed to import the imported "object-oriented paradigm".

Recommended Posts

Why super-intelligents couldn't understand the class
Why is the first argument of [Python] Class self?
Understand the tensor product (numpy.tensordot)
Understand the Linux audit system Audit
[Machine learning] Understand from mathematics why the correlation coefficient ranges from -1 to 1.