Abstractions

in #programming9 years ago

I tidied up a bit on the terrace, took out the garbage, ate and sat drinking wine and looking through the tape on my voice. I stumbled upon the post "A little bit about IT (50-50)" from @kvg which there curses the IT industry. I decided to write a letter to Chamberlain.
In essence, of course it is, it's all because of the nature of man. Rather than the brain. I read somewhere that an untrained brain has more than seven concepts in my head can not hold. To simplify one's life and make room in the head for something else, a person unites some of the things into an abstraction, calls it Ta-Shtukentsiya and introduces it beyond the limits of consciousness. The brain immediately becomes easier, for a while it feels relieved because the memory has been freed up and there is no need to spend "processor" time on retaining unnecessary entities in the mind.

Here's to take the car. There are a lot of details, wheels, engine, gasoline, gearbox, battery, electronics. Everything interacts, twists, switches, reacts differently to the pedals, the wheels turn after the lamb, dragging behind this pile of details and the person in it. And who thinks about everything, about this when he goes? No. For a person, the car is an abstraction. It is enough for a person to study only the interface to the car. How to turn it on, how to switch the speed, where the gas and brake. And that's all. He does not think how much it is necessary to inject fuel into the combustion chamber at any given time, how much air to launch there, at which point it is necessary to start a spark, so that the piston goes up. And these pistons are several. We just press the pedal and enjoy the ride. Until the car breaks. But for this we have another abstraction,

And so with everything. To the TV remote control, to the refrigerator door handle, to the light bulb button on the wall. We do not need to know more - the brain is ready to process additional information. Another thing is that by taking things out into separate abstractions we lose knowledge about the insides of these abstractions. In the hope that there will be someone who will understand this. Okay a light bulb, there are a lot of experts, and the bulbs are full for every taste. And there are things and unique, experts on which in the day with fire you will not find.

It's the same in IT. Let's say I want to write a program - a text editor. You can, of course, having studied the device of the computer from and to, learn what chips in it are soldered, what is inside the chips, how many transistors, what inputs and outputs. How much RAM. And then to learn the assembler of this particular processor. Yes, and take and write a program that controls the computer, initializes the memory, the processor, flashes the bulbs, accepts input from the keyboard, mouse, displays the text on the screen and acts as a text editor.

So it was at the dawn of the computer industry. Yes, even in the early 90's, if you look at the source of the text editor - there's no mum. The text editing function takes only 5 percent of the code, the rest is computer management.

That's when they began to remember the golden rule of "divide and conquer." First they took out all the methods for working with the mouse and keyboard into a separate library, then they wrote a library for working with windows, one more for initializing the computer and recorded it in the BIOS. The functions for working with files were also transferred to a separate library. And the programmer saw that it was good. Now he could concentrate directly on programming a text editor, and not waste time writing a program to manage a computer. Having been delighted with this obviously cool idea, he began to produce libraries. To check the syntax in the text, to automatically move the lines, to manage fonts, and so on. And libraries began to use other abstractions-libraries. After all, to download a font, we need at least access to the disk, find the desired file on it, allocate space in memory, load the font there, and so on. There are specialized libraries for this. Abstraction on abstraction and abstraction drives.

In the picture yellow is highlighted that part that is directly engaged in "editing the text," the logic of our application, and the rest of the library.
staktrace.png
And as you know, how many people have so many different tastes and preferences, and libraries on the same topic began to multiply an uncountable number of programmers. Many are just too lazy to deal with the interface, some do not like the interface and indeed, professional pride will leap and you will often hear "I can do better." Even there is a special term for this syndrome - Not Invented Here (not invented by us). "In the figure this library, I myself will write steeper". Happens that they will write a library, and the application for which it was done, and did not master. Not enough time and resources. So they start selling their own branded framework. Which also needs very few people. But it is.

It may seem that everything is bad, but in fact, no. No, no, yes there are good "libraries", applications that really make life easier for programmers. Accelerate the writing of applications. The essence of course in all this does not change, only fashion changes.

But here it is just that the cheaper production comes to the rescue. The cheapening of technology, iron helps to support the whole fragile hierarchy of libraries. Memory is cheap, the processor is fast. Added ten percent of performance - then this niche is occupied by new abstractions.

Abstractions are useful, people are easier to concentrate on the subject area. New cool ideas are born. New generations of programmers do not think about the computer, they abstract from all this, their brain is not occupied with unnecessary nonsense. They sit behind the wheel and enjoy the ride.

And it brings more than worry about memory consumption and CPU time. Progress, a new food processor, is more important than grinding an old kitchen knife. Few people wash their dishes now in the average family. Rather, they put the dishes in the dishwasher. Although the flow of water is probably not as effective, but our time is more expensive.

While writing, the wine ended and seems to have lost the essence. )) Zasim and bow out.
not a pipe.jpg
thanks for reading ^^. if you like it vote and follow.

Sort:  

Congratulations @mrtrieu! You have completed some achievement on Steemit and have been rewarded with new badge(s) :

You published 4 posts in one day

Click on any badge to view your own Board of Honor on SteemitBoard.
For more information about SteemitBoard, click here

If you no longer want to receive notifications, reply to this comment with the word STOP

By upvoting this notification, you can help all Steemit users. Learn how here!

Coin Marketplace

STEEM 0.05
TRX 0.33
JST 0.079
BTC 63481.02
ETH 1684.55
USDT 1.00
SBD 0.42