📜 ⬆️ ⬇️

Why programming is easy

I read here on Habr an excellent article “Why is programming so hard?” And immediately imbued with sympathy for it. “My God!” I thought. Finally, it is possible to show a sensible and weighted text to some of my acquaintances who consider me a highly paid idler, explain to relatives what kind of work this is - “poke buttons all day” and provide friends who defended their dissertations with proof that I, too, are not cows tails I twist during working hours. “What a wonderful article!” I thought. Finally, someone understood the whole essence of the programmer's work and explained its complexity in an understandable language!

And only one tiny detail in this article was missing. The truth.


The truth is that programming is easy and pleasant, that complexity is contrived, and the advantages of work are underestimated. And I think it is worth correcting this injustice by writing such an article. And no, I'm not going to slip into chatter about high wages, market demand and high mobility. This is not about programming, it's about the programmer’s lifestyle, which is not quite right. And we are on Habré, and not on the Megamind some, therefore let's consider programming, in all its bewitching beauty and intimidating power!

To begin with, we will crush all the arguments of the original article. This is not very interesting, since they all stem from one wrong premise and are refuted by its correct wording, but you need to start somewhere. This is the premise on which all that article is built: " The programmer’s dream is to not think at all with your head, the best thing is to do nothing ."
')


Pancake! The author of that article really thinks so! He considers us lazy (well, that is), but at the same time also unintelligent (and this is already unforgivable!). From this, he concludes that we do not like to think, do not like to create, do not like to experiment, make the world around us better! You just listen!

A program is something that converts the source data into a result and depends on the following conditions:

  • The result of the program is excellent.
  • The baseline is excellent.
  • The program is excellent.
  • The source data are well documented with high quality.
  • The program itself is well documented with high quality.
  • The program is well tested and executed correctly.
  • The problem to be solved is clearly detailed.
  • The task is clearly detailed.


With these additional conditions, programming becomes extremely difficult.


This text looks like the shoemaker’s complaints that the heels on the shoes are stapled and have to be changed or the dentist’s complaints that people have sore teeth and they have to be treated. Damn, everything described above is our work, this is our bread, this is what humanity needs us for, this is the added value we produce, the benefits of us, the things we learn from. I do not even know how to describe it more precisely. The work of a programmer is to make the world better, simpler, safer, faster, more reliable. Solve other people's problems. Yes, to write an "excellent program" is our job! And yes, she needs to be “perfectly tested” and yes, she needs to provide the correct source data, and if you need to write another program to get them, of course, you need to take and write it!

Programs need to be supported, ” says the original article. Well, of course, you need! But what is the difficulty here? On the contrary, this is happiness! I read one quote here: " Hardware eventually fails. Software eventually works ". And it's true: most of the goods and services produced over time become worse (wither, grow old, rust, deteriorate) and only our program only gets better every day - fix one bug here, then the second one, add a feature here, and then repaint the button . Our creations live! We breathe life into them, raise them, support them. Nobody thinks that supporting, for example, a child when he learns to walk is bad? We want him to learn, help him. So why is program support perceived as bad?

" We have to fix problems that shouldn’t be at all, " says that article. Br-rr-r, wait. And what are the problems that are directly obliged to be? All problems are undesirable, and the fact that we have to correct these problems saves the user from them (see above the paragraph about the meaning of the work of programmers). Moreover, unexpected problems do not make you bored, train your brain. Who likes to solve every day the same predictable problems - can go to the janitors or diggers.

" Solving problems without obtaining new knowledge " - the publication is fascinating to us. I can not imagine how you can solve the problem without obtaining new knowledge. At least in the course of solving such a problem, we gained knowledge about how to solve such problems without obtaining new knowledge - and this is already new knowledge and quite useful for ourselves (long live mutually exclusive paragraphs, yes!). In addition, no one bothers to really understand the problems of interest. Yes, it does not always have time at work, but what do you think, did the Wright brothers understand the nuances of aerodynamics strictly 8 hours a day during working hours, or did the Lumières saw down their film projector for government wages? Not! You want to be a pro, a master, you want to achieve something - work on yourself!

Nothing else is written in that article, so let's forget about it. We turn to the pure benefits of programming.

Programming is easy to learn
What is not today only! There are universities with specialized professions, there is computer science in schools, there are books, there are online courses, there is the Internet with all its mass of information, there are experts who can ask for advice, there are companies where you can get a job. Children in lower grades can learn Scratch, accountants can learn Excel macros and singles. Yes, in the end, tutorials "something is there in 24 hours" are sold in every grocery store! Yes, a lot of nonsense and yes, it’s all necessary to take, read and try, but if you compare the situation with that which was 20 years ago, when the lack of normal software was harmoniously complemented by the lack of books, hardware, teachers and the Internet - yes, we live in paradise! The programming learning curve is incredibly smooth, there is no “how to draw an owl” in 2 steps. Any textbook starts with print (“Hello, world”) and leads us by the handle through all these conditional operators, cycles, functions, classes, etc. At each step, we can run something, check something, set breakpoint, modify the code for experimental purposes, etc.

Programming is logical and predictable.
2 + 2 = 4. The OR operation has such a truth table. The for loop runs as many times as specified in this condition. And it always works! There are no exceptions like “it doesn't work on Saturdays”, unless we create these exceptions ourselves. The conditional if statement will work the same on all platforms, in all languages ​​and on any hardware, unless we specifically create circumstances when it is different. No need to take anything on faith - everything can be proved, checked. Having learned something - you can be confident in your knowledge. There is no magic, there are no emotions, everything works “honestly”.

The programmer does not need to know math deeply
We love with a smart look to fill in the importance of studying mathematics, discrete, theory, statistics, quantum mechanics and string theory. Stop making this nonsense! 95% of programmers from mathematics use 4 arithmetic operations, percentages \ roots \ degrees and slightly remember what logarithms and matrices are. Everything! The remaining 5% are the developers of scientific software, which means that mathematics can be considered not necessary knowledge, but their subject area (just as the software developer for the observatory would have to study astronomy). In general, secondary education at the level of the sixth grade is sufficient.

The programmer does not need to know all kinds of programming.
For a long time there is no "universal programmers." We do not need to know everything. There are frontend developers, backend developers, there are network programmers, Android and iOS developers, there are specialists in game development and databases, there are developers of embedded systems, but there are a lot of things! You do not need to spend your life learning all languages, operating systems, frameworks and patterns. Just choose what you like!

Programmer can learn all his life
Once in my childhood, while relaxing in the village with my grandmother, I helped the local children to feed the cows. Among them was the "professional shepherd" from the local collective farm. He has been grazing cows for 40 years. I remember that I really liked this profession - it is studied to Junior level for 2 hours, and even the Senior level (training a shepherd dog, basic veterinary medicine) is taken for a year or two. And then everything, the next 38 years, you can do the same thing. Now I remember it and am terrified. People got into a situation when their whole life did not need to use the brain at all.



Programmers are different - we can learn every day. We get paid for what we learn every day! The whole amazing process of obtaining new knowledge, experiments, solving educational and then practical tasks is our work, our life. What could be more beautiful?

We make our own tools
There are few professions that people create their own work tools. Most often, they use something created by other people according to their ideas about how these tools should look and work. Programmers can make software for themselves, and really do it. The whole history of Linux development, many opensource tools are proof of that. Even proprietary development tools are created by people who really understand what is at stake and themselves use what they produce every day. We are flying forward by train, which is being rebuilt on the move, and by people who travel on the same train themselves and strive to do it quickly and comfortably.

Low cost of error
Whoever said there about broken rovers or a glitched X-ray machine, in most cases the cost of a programmer’s error is low. Well, “float” a block of text on the page, well, the function will work for a second longer, well, the program will fall with the exception. Everything can be fixed. We, unlike surgeons or bridge builders, most often can afford to make a mistake, get an error message, fix it and pretend that it should be so. As a rule, we are not jailed or even fired for an error if we are able to correct it in a reasonable time and suggest some way to avoid similar mistakes in the future.

And now about why programming is not only easy, but damn nice!



We are changing this world
Moreover, we are changing it more than anyone else. Everything, literally everything now depends on computers, is developed on computers, controlled by computers. Some professions are completely supplanted by computer programs, others are harmoniously complemented by them, others are completely transferred to the virtual world. And we all do it, programmers! I press a few buttons and something happens. Something that seemed like a fantastic fairy tale a couple of decades ago. And now it works. And I did (well, at least partially) me!

We create new worlds
Ordinary people live in the ordinary world, in our reality. Programmers live in the same universe of pure creativity, where artists, poets, writers, directors. Our world is in our head and it is beautiful! Things in it work simply and logically, the air castles of the layers of architecture and abstractions are built without any effort, and are also rebuilt (and sometimes collapse). Moreover, all this, in contrast to the result of the same poets with writers, turns not only into words on paper, but also into programs and hardware that actually work in the real world. I can not only imagine a dancing robot, I can write a program for it and get this robot in reality! Creation in the purest form!

We love our work.
I do not know about you, but I love my job. Difficult is it, you say? Come on! We always have simple tasks. We always have the opportunity to solve complex problems by splitting into smaller simple ones. We have laziness helping to solve problems in the least costly way. We have testers correcting us when we are wrong. We sometimes have grateful users. We always have ungrateful users who do not allow us to turn into idlers and sluggard. We often have employers trying to make our work more comfortable. We have our victories and achievements. We still have so much interesting ahead!



PS When writing this article, I had a feeling of deja vu. Well, something was spinning in the back of the mind, some kind of elusive thought. And only by writing, I realized ... that I already wrote such an article 3 years ago! “This is a disaster!” I thought. “We need to tell the people about it on Habré, let them fool me” - I thought.

I leave both articles, because it is written in them, though on one topic, but still with different words, so let it be.

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


All Articles