📜 ⬆️ ⬇️

Philosophy of language

I find absolutely surprising imperturbability with which the world community of programmers accepted this notational monster ( N. Wirth ).
Imagine what an activity is, how programming has received the official status of "Art . " Today, being engaged in a regular application program or web-portal, the programmer does not solve those problems that he would have solved 5-10 years ago. Obviously? Fact? With the widespread advent of accessible cross-platform technologies, productive computing resources, high-speed electronic networks, widespread relaxation in professional circles has come. A lot of literature, various convolution methods and quality units are devoted to the problem of program code evaluation. I want to dwell on the almost imperceptible, almost imperceptible - the beauty of the program code.


We can easily pick out a beautiful thing, pay attention to the elegant page on the network, appreciate the beauty of the new sports car. Being engaged in group development of the software, it is often possible to allocate "the quite good programmer" and "the pupil housewife". What will be the criteria for evaluating the beauty of the program code? Can we try to systematize our understanding in this area, despite the fact that most of them are on the side of emotions and feelings?


In my opinion, the assessment of the beauty of any object should be carried out systematically, namely, considering not only the object itself and comparing it with a certain ideal (optimum, as is customary in optimization theory), but also a number of things associated with it. For software code can be identified:
  1. solvable problem
  2. solution algorithm
  3. means and instruments of implementation
  4. implementation (the code itself)
  5. various interactions of the listed elements.

Consideration of the first two aspects, in this article, will be neglected, leaving the formulation of the problem to customers and analysts, and the choice of algorithms for theorists-nuclear physicists. The main focus, in turn, I propose, nevertheless, is to concentrate on the consideration and selection of means and tools for the implementation of algorithms that we kindly composed. This is where the fun begins. Suppose that no one restricts us in choosing a favorite language, IDE, libraries, yes, even the platform will be customized for our software, and then what? Most of the developers are narrow specialists and thanks to them for it, but still, coming to the solution of a specific task it is necessary to rely on the clarity of the means, and not their convictions. “It is almost impossible to teach students who have previously studied Basic to good programming. As potential programmers, they were subjected to irreversible mental degradation, ” said Dijkstra, and probably was right, I don’t know, I didn’t have to teach programming, but his phrase clearly describes the topic of language inconsistency and learning objectives. So damn it, do you need to be able to dig with a fork when you have a shovel? And if there is a bulldozer nearby, why bother to get your hands dirty?

Causes, tasks, concepts

I believe that everything created has its own reason. Creating such a complex mechanism as a programming language, the authors, be they at least people, even robots, rely on the reasons that motivated them to this very laborious event. Hence the task of the developer, in my opinion, to be able to evaluate the existing products, understand the reasons for their creation and be aware of their tasks and compare these very tasks with the reasons for which the authors of languages ​​made their developments. There is not and will not be a universal programming language, there is not and will not be a universal programmer. The beauty of code implementation, as in any language (I mean natural ones), is achieved by continuous practice; there is no secret here. The art is to paint an oil painting with a brush, to be able to do it and, which is a lot important, to adequately decorate it in a suitable place. Imagine a beautiful flowerbed with fresh flowers, beautiful? And what if this flowerbed is in a disadvantaged area somewhere on the outskirts of a megapolis, a working quarter, darkness, dirt, broken roads and drunken homeless people? It turns out that programming (in the narrow sense - coding) is not an end in itself, not at all. Considering the solution of a problem as a complex, one can see beauty or its absence.

It seems to me that people should understand that the beauty of an element can never be compared with the beauty of a composition and only system analysis can bring us at least a little closer to objectivity. Speaking about the constructions of the C language, Niklaus Wirth solved the problem of the parser, it is unlikely the songwriter would appreciate the Pascal himself created by me (esteemed as the best language of instruction).

Source: https://habr.com/ru/post/105398/

All Articles