📜 ⬆️ ⬇️

Sins and virtues - in web development

This, of course, is a weakness, but a strong love for programming, computer systems and algorithms burns me and makes me sometimes self-destruct and do stupid things. You should never forget that it is laziness that is the engine of progress and the ability to be lazy and not write extra code is an important and valuable skill of a modern developer.

The question “how to achieve a high level of professional excellence and what is needed for this” has tormented me for the past 20 years. In addition to reading and reading the correct books, studying the source programs of the correct programs and periodically diving into Computer Science, we had to constantly communicate with different colleagues from different development sub-spheres.

With the “pure” developers of the “brain” it got pretty quickly boring, because It often turned out that the movement to the goal (project, TZ) is somehow side, and the main thing is the process and the need, being like bureaucrats, religious sectarians and experts on Russian language bugs - learn the subtleties of the interpreter-compiler and the more you know any garbage crap, born of chaos, the steeper. The feeling that the neurons of the brain grew into each other, entangled and dried out, creating a pulsating ring of contempt for beauty and simplicity - did not leave.

With the "pure" managers of the "brain" was also not very fun. Yes, yes, of course, in this case, the main goal was to make the project on time, but arising at the time of technical and analytical difficulties and overcoming risks, emotions and psychosis with a desire to find those guilty of bugs and subconscious blackmail, in order to take responsibility for the deadlines imposed from above and frank disregard for technical excellence - led to the idea that real managers still have to be as professionally developed as the developers, often solving complex puzzling tasks, debaze odes and nights and weekends. But from the manager, of course, much more human qualities are required: courage, clarity, confidence and ability to motivate.
')
But, fortunately, such “clean” cases are quite rare, and in the conditions of the flow of projects and the deadline after a fairly short time, real fighters remain in the teams - and it is in communications with them and in active project work that the correct answers to the At the beginning of the post edge questions.

And, how useful some time to sit on the support of the code ... especially your own! When you can see with wide eyes, how grief from the mind (“why do it just if you can be difficult?”) And the developer’s attempts (maybe you) only hear yourself and assert themselves - give rise to monsters bleeding in support and development, which cannot be shot or fed - life threatening.

So, these are the answers to the questions I have formed and I am ready to share them.

Question: what programming languages ​​to learn first?

The question is outdated! :) If you do not have a goal to enjoy the process and salary for the lines of code and troll the reality, confusing others in the depths of their own knowledge of compiler / interpreter bugs, i.e. if you are not a Freak (replace an extra letter), then languages ​​no longer need to sit straight and study. Now there is a pleiad of languages ​​that learn in just a few days and allow you to quickly solve business problems with good quality. For the web, there is a definite leader - PHP, for machine learning / deep learning, laconic Python shows itself perfectly, and for backend services you can start with a quick solution of the problem on the same PHP / Python / Ruby / Go / Node.js, and finish ( by experience, “complete” occurs in 0.1% of cases) in more cumbersome and low-level languages: Java / C # / C ++.

Question: what algorithms should be studied first?

You will not believe, but the algorithms from Computer Science are often counterintuitive and destructive to consciousness and no matter how much you study and remember, you will forget them after a good vacation only if you are not a genius on the way to Nobel. The maximum that you need to know to begin with is that apart from the sorting functions built into the language , there is also, how is it ... sorting by “bubble” - but you should forget about it right away, because There are more efficient sorting methods described in books that can be read in retirement (I honestly read more than once Sagewick ), but it is much more useful to know the name of the library sorting function in the language and use it.


You do not need to know the principles of the internal combustion engine to drive well and get pleasure from life! You do not need to know the subtleties of the work of virtual destructors in order to effectively use a database with an HTML face and quickly solve business problems with a short time2market.

Similarly, we should approach both search and trees and graph theory and string processing. Most likely, this is all already implemented in the programming language in an optimal way. And if you still do not know that regular expressions are the tip of the iceberg of the theory of finite automata - hammer and relax and learn how to make good use of regulars. And if VDRUHHHX load testing after 10 years of successful operation of the web project reveals the inefficiency of the algorithm - then read and at the same time understand the basics of the theory of computational complexity .

Much more interesting, if we talk about Science, is to delve into the statistics, the server, the ruler to understand what they are talking about in the context of deep learning . Believe me, this is much more interesting than the endless capping in the Turing machine.

Question: should we delve into relational algebra and DBMS?

Be sure and as soon as possible. But first of all, you should feel the simple and beautiful philosophy of relational algebra and immediately see what you can not do . Most likely, you will use DBMS for storing and aggregating data and then it will be much easier for you to deal with various modern and sometimes very useful non-DBMS , which are much simpler and more primitive than classics both in terms of capabilities and in architecture.

The question is: is it worth digging in unix and the operating system?

If you use 50 lines of javascript, then Cthulhu will probably not notice this. But if you confuse the fundamental network protocols, as IP is sometimes confused with TCP, you cannot avoid troubles. I think that studying the architecture of the operating system , bash, system calls and network protocols and standards is worth spending the maximum available time and you will not regret it. Language "C" should also be felt, well, so that there is an understanding of what is happening under your hood. The fact is that modern, especially web projects, require very close interaction and understanding of the subtleties of operating systems, the ability to monitor and understand processes, threads, system calls, know TCP / http details - this will allow your project to take off quickly and work right and long.
Therefore, invest in the study of unix as much time as possible - believe me, it will pay off with interest and bearded guys stop laughing at you, setting up nginx / apache / mysql with eyes wide closed.


No need to be a geologist to conquer the top! You do not need to memorize Shell sorting to sort the form data :)

Question: why write unit and integration tests to the code?

You have been deceived. Earlier, in the era of popular techniques of development on the verge of sadomasochism, when languages ​​were full of holes and programs were created over the years - everything needed and cannot be covered with automated tests with a mixture of schizophrenia. Now it is very expensive, programs, and especially web projects, are created by orders of magnitude faster, the requirements are constantly changing - and the only way for the project to work correctly and for a long time is to “write right and without errors” (C) :-) I'm not joking . Here’s how they usually do it:


But if you did, despite the warnings above, climbed unnecessarily into low-level languages ​​like java and C # (and God forbid, in C / C ++), you will have to write unit tests, because you will quickly get confused in your own code on the third day putting the monitor on the floor and crawling on it with a magnifying glass on all fours and falling, sometimes, on colleagues surrounding the hero :) Low-level languages ​​are good for certain services and narrow tasks and in conditions of sufficient time and people and the department of testing - show themselves from the best side .

Sometimes, however, in large and complex projects, functional tests help well. In Bitrix24 , automated from the inside exclusively on bash / php, we have several hundred of such tests and they justify the time spent on them.

Question: Is it worth writing TK and deeply designing?

This is a philosophical question :) In web projects, it is usually written, but the requirements often begin to change immediately, so the advice is simple: let managers write TK and read it themselves, and developers should be given 2-3 days to torture with addiction of subject matter experts by the customer. Designing in web development with a desire to get into the head of the Client and still see the future development of the system - this is the key moment that influences success.

The question is: if languages ​​are learned to learn only to the creators of compilers, then what is to learn something with passion?

Learn standard language libraries and web technology features (for example, WebRTC). In PHP, you can simply find a sea of ​​connectors to standard and very powerful ops libraries, in Python, libraries for working with tensors and deep learning frameworks are a bonus, in java it is a library of collections and an executor framework, etc.

Also invest time in learning the frameworks. In java there is a whole library of this kind - Spring / EE. There are a number of interesting and popular web frameworks in php. Python has some wonderful machine learning frameworks, etc.

Question: so the fascination with programming is all the same good or evil?

Of course evil! :) You need to learn how to get involved in effective and concise problem solving with the help of the currently available toolkit. If the puzzle can be solved on bash, write to bash, if you can go to the DBMS from PHP, take it and use it. If there are ready-made frameworks for creating a website with admin panel - take them and do not suffer from sadomasochism.

The code written even by you, in 2-3 months, you will forget and no matter how hard you try to remember it, the brain will resist and you will suffer. Therefore, the easiest way to enjoy the development is to use ready-to-use and tested libraries and solve problems with the MINIMUM volume of your own code, licked by all standards.

It is important to understand that programming can be learned quickly, but expressing one's thoughts clearly, succinctly and beautifully in code, following the principle of “a fool loves work” is very difficult and this should be learned most of the time. It is much more useful to study ready-made libraries from cover to cover and build your projects based on ready-made algorithmic algebra than to write “everything from scratch”. And the modern trend of creating laconic and laconic languages ​​with collections built in the syntax for expressing one's own thoughts (php, python, kotlin, scala), often in a functional style, suppressing cognitive noise from heavy structures - convinces me of this even more!

The world moves along the path of simplification, clarity and beauty. The compilers defeated assembler. Laconic functional languages ​​with a variety of libraries - low-level sado-masochism on working with memory and “OOP of the brain” conquer.

Colleagues, I hope I managed to answer some of the questions that torment each of us and advice will be useful not only for novice web developers, but also for more experienced and experts who are looking for ways of self-realization. Good luck and good mood to all!

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


All Articles