There may be errors in this code; I only proved that it is correct, but did not check it.Donald whip
Today I stumbled upon a post stating that you cannot use the C ++ STL function make_heap, because almost no one can use it correctly. At first, I was indignant at the ridiculousness of this idea - anyone with at least an initial understanding of algorithms should know how to correctly use make_heap. But then I thought about how many programmers do not know what a bunch is, moreover, they don’t even need it ... And then I realized that all these people are equally called programmers.
When I was little, they gave me a lot of bad tips about the right programming techniques. Over the years, I realized that most of the councils were not bad in themselves, but were given in isolation from the context. The heyday of start-ups that is being watched has made many hackers realize that “efficiency doesn't matter” —a tip that holds many traps and nuances of context, especially when it comes to complex architectures that can interact in unexpected ways. The effect of a spoiled phone, due to the lack of context in such statements, is in itself a problem, but in fact it is only a symptom of a deeper problem.
')
The term "programmer" covers a huge range of abilities and skills. On the vertical axis, the programmer can hardly be able to write on vbscript - or develop compilers for Intel or scientific software for airlines. Along the horizontal axis, he can be an expert in databases, improve GPU performance, write parallel computing libraries, physics engines or drivers for printers, do image processing, generate 3D models or research in artificial intelligence, use coffeescript, HTML5 and AJAX to develop web applications or nginx and PHP to develop the LAMP stack on which web applications run ... And that’s all - programmers.
This is madness!
Our world is absorbed by programs. In the future, programming will be a basic course, along with reading, writing and math. To talk about someone "programmer" will be meaningless, because 10% of the population, and even more, will be programmers at one level or another. This word has so many meanings that with equal success you can call yourself a scientist instead of a physicist. What are the alternatives? The best attempt to fix it (
The difference between a developer, a programmer and a CS scientist ) gives you only three options and is unable to distinguish between me and a college graduate with a degree in artificial intelligence. They are engaged in multidimensional mathematical analysis and evaluation using functional languages, on the understanding of which I have to spend years. I write fast code in C ++ and HLSL assembler and juggle with matrices of complex transformations to draw pretty pictures on the screen. And that, and that - is a hell of a difficult task (for completely different reasons), and neither of us could do the work of the other. That for one of us is a good habit, for the other - just disgusting. And both of us are programmers.
Do you know why aimless language holivors and senseless debates about what is best from a practical point of view? Do you know why no one ever comes with a friendly agreement in such questions, except for narrow circles, in which “practice” means the same thing for everyone? Yes, because we too generalize ourselves. We think of ourselves as programmers who simply specialize in different things, and we believe that our experience is applicable outside of our specialty - and this is not so. We are like industrial engineers who tell chemists how to conduct experiments, or architects who teach linguists to write essays on the basis that both of them use a lot of paper.
This attitude is rooted in the very basics of computer science — that a set of basic data structures can do everything you ever need. But it’s a mistake to generalize this to programming as a whole, simply because it is not true. We forget that these abstract data structures do everything we need only in an ideal country of mathematics, and ignore the differences in realizations created for different areas and completely different applications. Donald Knuth understood the difference between theory and implementation, and we need to learn to distinguish between theoretical and implementation-based advice.
It is not enough to ask someone if he is a programmer. “Programmers write programs” sounds almost like “scientists do science” - only botanists do not create nuclear reactors.