Alan Kay, the author of SmallTalk, is working on an experimental STEPS system - an environment that can replace the operating system and application programs, and the amount of code in this environment should not exceed 20,000 (twenty thousand!) Lines of code. Perhaps many
have already heard about this. This is one of the attempts to make a programmer's dream come true: to write everything anew and beautifully. But is it possible?

640K again
If the famous 640K is divided into 20 thousand lines of code, then it turns out to be 32 bytes per line - this is very similar to the truth. It seems that Alan Kay keeps this reference point in mind, hesitates to say out loud: “640K is enough for everyone”.
Bill Gates guessed this even 3 decades ago. His money was spoiled later, but at first he was the right kid: his BASIC occupied only 4K. Over time, he guessed to adapt Moore's law to the size of the software and the size of his income, and he was not short.
In his youth, Bill's parents even took him to a psychiatrist, seeing the obsession of their offspring with programming. But over time, Bill stopped programming because he became the boss. “I used to love summer. But when I grew up, I realized that summer could be all year round, if only there was money. Now I love money. ”
')
It would be naive to think that bloated code is written only in Redmond. Even Linus laments, looking at his creation: “The core is bloated and huge.” With each new release, the Linux kernel loses about 2% of its performance. And this is inevitable,
says the mighty Finn .
Let's think, can the volume of software be reduced, and significantly? Take, for example, any text editor. To implement the declared functionality, the author applies, for example, a certain search algorithm. But in the code of the browser installed on the computer there is also a search, and, possibly, with the same algorithm. He is also in the office suite, and in games, and in the OS, over which it all works. It would be logical to implement this search once, and then only use it. With in-depth analysis, you can identify a lot of repetitive things.
Literate, jewelry decomposition can work wonders, the main thing is to see the repeating fragments, select them into separate abstractions and then simplify them. Alan Kay does it: the code implementing TCP / IP takes 160 lines. Not one he is so smart. Hovik Melikyan
gives an example , when a program of 80,000 lines of C ++ code and 55,000 lines of VB code was replaced with 10 lines on a shell script.
But is it possible to replace everything with twenty thousand lines of code? It is possible, but only if you abandon many standards. For example, web pages, from the point of view of the authors STEPS, need to be replaced with documents using hyperlinks. Those. “The wrong bees and the wrong honey” (http, html, css, etc.) are replaced with the right ones. And so almost everything.
What is there for such a magic code?
And what will this code represent? Well, if he was not "
interference in the telegraph line ." Robert Sebesta writes about such code: “Daniel McCracken once noted that reading and analyzing a four-line program written in the APL language took him four hours.”
This system has high-level languages ​​OMeta and Nile, whose syntax looks like C and Python, respectively. Programs on them are eventually translated into programs in the low-level language Nothing. Here is an example on OMeta: calculator syntax:

In appearance, nothing magical, easily read and understood.
Why is this impossible even theoretically?
To help Alan Kay’s ideas for conquering world domination, we will have to accustom ourselves to asceticism. Take, for example, a text editor. It is the 21st century, but there should be no spelling in it. Why? Yes, because it does not fit into these 20 thousand. Natural languages ​​are complex. If a hundred lines of code suddenly suffice to analyze text in a language, it must be taken into account that the number of languages ​​is actually measured in thousands. But even if the number of languages ​​equates to the number of states, then these hundred lines must be multiplied by another two hundred. It turns out those same 20 thousand ...
And the driver? If the same 100 lines are enough for one type of device, then the types of devices are much more than the number of languages ​​and states. If device manufacturers decide to help Kay and store the drivers in the devices themselves, the “bloated software” will simply change its storage location.
Even if we assume that 20% of the code will cover 80% of user needs, it turns out that each 20% of unmet needs will be different. Someone will need Photoshop, someone - AutoCAD, and someone - and at all Deep Fritz. And so in many ways.
The reasons why STEPS does not "fly up".
1) Trillions of dollars are invested in software development around the world, most of which are not at all companies that STEPS potentially competes with. There are not even compilers of the most common languages ​​for it, so for now there is not even a hint of the possibility of transferring what has been gained.
2) There is no need for such a short code. To save memory? Memory costs a penny, its volume even on the simplest devices exceeds those 640K. Maybe the program will run faster? No, all programs in this system are first translated into programs in the low-level language Nothing, and only then executed. According to Kay himself, his code is about 30% slower than the traditional one.
These are the most obvious reasons. So the development of Alan Kay and his team will not be able to supplant modern operating systems, browsers, office applications.
And if STEPS suddenly becomes popular?
1) Then the largest taxpayers such as Microsoft, Apple, Google, Adobe and others convincingly prove to housewives and governments why Kay’s approaches are erroneous. And in general, they violate a lot of patents. Under STEPS, there are no familiar applications. Data on computers is not protected, security is not ensured.
2) Against 20 thousand lines of code that will shake the world, even the great and terrible Linus will speak! For what to do?
Dragging the sofas ?
Even secretly sympathizers will find reasons to oppose such a perspective.
3) Virus writers will find that the STEPS system is extremely friendly to them. And there and antivirus companies catch up. Google will popularly explain that storing data on a computer is no longer comfy: let the data be stored in the cloud, and “good corporation” will write for us its 20 thousand lines of code.
This is not all ...
What then will be STEPS?
She will remain the blue dream of the poet. Sleep exhausted by the routine work of a programmer. A reminder that in this world there are eternal values: brevity, clarity and beauty of the code. Propaganda of the power of thought. A role model. And, of course, a testing ground for experiments.