Explain why my rocket science backend takes a couple of seconds, and four forms on the front takes six months
Last week I did the impossible – I persuaded my parents to take my kids for the whole weekend. If any of you have a few small ones, you should understand what happiness fell on me. I already looked forward to the best two days of my life – but family life is not limited to problems from children. I have been spending little time with my wife lately – and was sentenced to a weekend in a country eco-hotel. Here I must say that I am an idiot – the only developer in the world who does not have a laptop, so if I leave home, I can say goodbye to any plans to work, or even do something significant, because the phone is not a tool for me.
It’s hard to be an idiot, so I try to learn from mistakes so that I can become less of an idiot in the future. I decided to make myself a good present – and ordered a top-notch laptop. In my city, good hardware does not lie just like that on store shelves, you need to go to the site, choose a wheelbarrow, choose a specific store and call in for it. I wrapped everything up so that just in time for my return from the hotel, my super devbox was waiting for me in the store on the way to my house.
All weekend I was looking forward to returning home, setting the mood of the environment, cutting the dark theme into everything I could. My desktop was outdated, and the thought that I would work on a really nimble machine was mesmerizing. I already knew exactly how I would collapse on my favorite ottoman, put my laptop on my feet, and start figuring out the code at cosmic speed.
The problem with idiots is that they don’t understand the essence of what is happening, they simply copy the actions of smart people, and the result is disappointing. That’s how it is with me – on the way home I received a text message that the delivery of the laptop was being delayed, and I would have to wait another five days. But all weekend I lived with the idea of getting a laptop, and I was not ready to wait. So I took the best that was available – a very average machine, with a gigantic drawback – 8GB of RAM. But. There is one more slot, which can be expanded to 16.
I decided that I could live with an eight for a week. I don’t work in fifty windows, and I can live without constantly running games while I develop. God, my first computer had a hundred times less memory, and everything was fine. there shouldn’t be any problems.
But the problems started – because someone once allowed front-end developers to develop software.
Look, I start the laptop, the operating system starts spinning on it, with all its services and drivers. Dotnet, studio, rider, player, email client, FIFA18, guide, cart. And that’s all – 20% of my operative. And then I run the js interpreters and executors. 80+% operative. Browser, node, vskod. Three applications that I gave one simple task – to render forms and interpret the forms in them. Two-dimensional, simple shapes, no physics.
It turns out my modern 80-piece laptop isn’t good enough for that. With trifles like three-dimensional football with very serious physics and graphics, powerful AI, and very serious calculations in real time, the laptop copes. But football is bullshit. Here are two-dimensional shapes – this is exactly the thing that I have to put all my free memory on.
Let’s do it like this – I’m not a nichrome performance expert, I have very little idea of how programming an operating system differs from creating something like Node.js – in my amateur opinion, the OS solves much more complex and resource-intensive tasks, but to hell with it. Node I have a build code that I wrote in a typescript. But I also have a code that I wrote in sisharp – it builds, runs and executes dotnet. Why does he eat ten times less memory? Does it solve simpler problems? Or is it slower? Less functionality? Dick was swimming there.
Here I have enough experience to evaluate – the studio and will solve no fewer problems than a node with a node. But they work much, much faster, and much more functional. But why then do they have enough of a handful of resources, while the surrounding people go crazy with a car that costs three average monthly salaries in this country?
I have a gigantic back-end project, and a tiny front-end for it – for four forms. I make a feature – I make changes to the codebases of both projects. When the changes are made, you need to build. I press f5 in the rider, swing to the skod – and when I see slender rows of typescript code in front of me, I get a desktop notification: “build succeed”. All.
Now let’s build the frontend – here it won’t work with f5, you need to open the console and enter the NPiM command. I’m a proger, I can type, and I can handle it easily. The computer starts to make noise. Of course, we are solving the most difficult problem – we turn one shitty code into another – smaller – for optimization. This is, of course, for a long time – four forms after all.
I just don’t have the strength to sit and wait at the computer, so I decide to kill time and make some coffee. I am rather lazy – the way to the kitchen from the second floor to the first one seems to me like a whole expedition to the South Pole, so for several minutes I sit, dull and gather my strength. Why is that? If the kitchen was on the same floor with me – even if it was twice as far – it would not have been such a problem to walk. But damn stairs! Physicists need to take a closer look to see if there are any temporary and gravitational distortions.
I nevertheless made it to the kitchen, but the feeling was that I had left my workplace already in my past life. Unfortunately, the luxurious life of a programmer has taught us good coffee, and a thorough approach is important here. Write down:
It is necessary to pour out of the coffee grinder the medium-roasted burda that the wife drinks
Get the necessary grains from a special impermeable jar,
Put into a coffee grinder,
Set the correct grind, turn it on,
Rinse the French press thoroughly.
While the kettle is boiling, you need to keep the jacket under hot water – so that the cold walls do not cool the boiling water
Scald huge amounts of ground coffee quickly.
We fill it, and while it is brewing, we put a mug of milk in a mikruhu – it is impossible for the milk to cool the drink.
While everything is being brewed and heated, I went outside to smoke. I turned on the music, sat down, slowly inhaled, then lit another one – in reserve, so that I didn’t want to go any longer, although I understand that stupid self-deception and just a habit from the army, when I broke off to smoke once a week, and I sucked in eight at a time, until nausea.
I walked around the yard, returned to the kitchen. Here, write down another point:
A couple of tablespoons of cane sugar, stir well.
Meoooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooo3103103103113118 carpet, I crawled back upstairs with a mug filled to the brim. I got a couple of light years to the laptop, very slowly lifted the laptop with one hand – heavy, bastard. Still, I spilled a couple of drops of coffee, but not on the carpet, but on the tiles – for the hundred thousandth time thanks to our Lord for giving the men socks – a graceful movement of the foot, and the traces of the crime disappear. We sit down, put coffee next to us, the laptop is on our feet, we look at the screen –
And the build is still underway. Four forms, son.
I myself have not built tools like a node. Such important infrastructure things are the lot of smart guys with degrees who studied complex sciences while I was drinking at the university. My expertise is not enough to explain reasonably – front-end developers should slap forms, they should not be allowed to do serious projects with complex logic and algorithms.
But. But. There is a known problem with sects and conspiracy theories. When you look at them from the outside, you are – well, this is complete nonsense. They are repulsed, dangerous idiots. No person who has at least one neural connection would believe in a flat earth. All people have neural connections, and even the dumbest of us are still smart enough not to believe in this nonsense. At the same time, followers of sects and conspiracy theories are numerous and powerful. This happens because people at some point move away from thinking in general and begin to think in particular – then the doctrine of the flat earth ceases to be an obvious absurdity, and becomes a harmonious chain of logical and integral inferences. It will fly to pieces as soon as you try to look at the whole situation, but the irony is that you don’t want to – and your teaching will teach you to despise and drive with sticks all fools who decide to suggest such a thing.
All engineers in the world look at the bullshit, which front-end developers call their tulling, and say – this is dog shit! It doesn’t work, it eats too many resources, it solves only those problems that it creates itself. This is the worst way you can imagine solving a problem. You fucking reinvented a thousand things that did their job perfectly, and did it terribly poorly, and you just continue to bury yourself. But front-end developers come and explain that we have not understood anything.
They will come here too. They will say that there is actually a hot-reload in order not to interrupt the project. They will say that the download can be configured so that it is built by pressing f5, they will say that I have the wrong version of the node, and the wrong laptop. What is actually the fact that I have 4 running simultaneously on my work machine! a clone of siplus code that interprets js is a great approach. They’re going to say a lot – whatever they want, just not to redo their shit.
And I will say this. I dumped a bunch of bucks for a computer, and while I was writing this article – I lost my code four times – because I consumed all my memory. And so I finished it
And the build is still underway. Four forms, son.
Epic servers – this is powerful servers based on the latest AMD EPYC processors. Processor frequency up to 3.4 GHz. Maximum configuration – 128 CPU cores, 512 GB RAM, 4000 GB NVMe!