当前位置:网站首页>"Nowadays, more than 99.9% of the code is garbage!"
"Nowadays, more than 99.9% of the code is garbage!"
2022-07-25 01:45:00 【CSDN information】

author | Cliff Harris
translator | Meniscus
Produce | CSDN(ID:CSDNnews)
By chance , I need to use network disk service , Is to upload the file to a certain place ( Don't say which service it is , It's all the same ). This is only a very simple operation , First, copy the files in a folder on the hard disk to the remote server , Then perform some database operations , Give the file a name , Then provide it to download , That's it .
It is a large company that provides online disk Services , Large scale , It is estimated that many hackers visit every day , So they need some safety measures , When uploading and downloading, you have to verify whether the file has been tampered with , It's all right .
however , The most basic function is just to list files 、 Read the file 、 Upload files , Then close the connection , Write success in the log , Or if there is an error, write the reason for the error in the log . This is not rocket technology , Actually, I use it myself wininet API Write this code , The service is used PHP and MySQL, Although it can't reach the enterprise level , But it can also support the uploading of hundreds of thousands of files 、 Downloading and logging —— A person writing code is about twoorthree weeks of work ?
However , The client of the special upload tool I used is 230MB, contain 2700 Multiple files .
Yes , You read that right ,2700 Multiple files ,237MB Executable files and all kinds of garbage , Just to copy files to the server . This can no longer be called inflation , It's not over designed , This is completely unreasonable .
actually , Not only this upload tool , Nowadays, any software of any large software company is the same .


In the computer 99.9% The above code is useless garbage
I know what's going on , I've also seen other programmers' implementations . The root cause is , Programmers simply don't know how to achieve their goals through efficient underlying code , They have never even seen the low-level efficient code . How can you make something you haven't seen , We need to do better ?
Write a safe 、 Software to quickly upload files to the server , It takes up to one twentieth of the amount of code . Just one file , One exe Documents are enough , It doesn't need hundreds at all DLL. It is entirely possible , And it will be easier 、 More reliable 、 More efficient , It's also easy to debug , It can even work more stably .
Code bloat seems to be a bit of an old guy like me , After all, I'm old . But what these old guys are thinking about is not that the code is slowing down 50%、 The scale has increased 50%. The actual situation is far more than that .
I believe in your computer 99.9% The above code is useless garbage , Will never be run . But all this code is piled up there , Pile on 65 individual DLL In the document , This is because programmers want to do something less important , For example, save a picture , But they don't know what to do , Just import a lot of garbage to realize .
As I said , I shouldn't be angry watching young programmers do this , After all, this is the way they learned to realize . They have no idea what high-performance development looks like , I have never seen what software with limited conditions looks like . If you tell them , The original Elite The game can generate the whole galaxy , Yes 3D Dogfight , There is a career system , trading system , And explore thousands of planets , And all this only 64KB, They can also accept , But there is no way to understand the gap between this and current software .

CPU And memory are limited is the golden age of programming
Why do I care about this matter ? There are many reasons , The simplest thing is when you spend twothousand times the time to do something , It should work . But more importantly , That's true. 99.9% Of CPU Time is wasted on this garbage . Execute hundreds of thousands of instructions per second , The result is useless . Originally, my computer should be in a very low power consumption , The fan should not turn , Because what I'm doing now is just wordpress Just writing in it .
Today's computers are fast , It's really magic . Everything you can think of , Can refresh once on the screen 1/60 seconds . however ! When I was there Surface The notebook ( Almost new !) Click the hard disk icon on , I can see the obvious delay , The computer draws the user interface little by little . It will take a long time , I guess it will take at least half a second , about CPU It's like billions of years .
If I'm right , Because there is 99% Garbage ,99% All the electricity is wasted , This can no longer be described as a crime . What has all this wasted power done ? I don't know , But look at the task manager : A lot of things that don't know what they are or what they are doing .
I'm just writing an article now ,Windows It's about to run 102 Background processes .NVidia The video card has 6 A process , Some even have child processes . What are you doing ? I didn't play games , For graphics cards, what I'm doing now is similar to 20 It made no difference years ago , But just 6 A process .
Microsoft Edge Browsers also have 6 A process , its Web View also 6 individual . I didn't even open it Edge. Maybe I opened one yesterday SVG chart , And here it is 12 A useless process wastes memory and CPU? This is simply unreasonable .
That's why everything doesn't work properly , Why is everything slow , Why do you buy new mobile phones and new TVs every year , Buying new ones is just to run more junk programs .
I think pessimistically , Things will only get worse , Because like Facebook、Twitter、Reddit These stupid Big Mac companies are the current trend . There are thousands of people in every company “ The programmer ”, Use machine learning to learn from GitHub Copy and paste these useless junk code . Add two numbers to use 32 individual DLL and 16 individual Windows There are hundreds of millions of lines of code in the service .
Twitter There are 2000 programmers . but Tweetdeck Occasionally, the timeline of a user cannot be loaded . This bug It has been more than four years , I guess no one knows why , The code behind it is just a pile of copy and paste garbage .
Besides, Reddit, The function of reading titles from links cannot be handled correctly & And semicolon , This is all 2022 Years. . I guess they do, too 2000 Multiple programmers , But no one even writes text analyzers , So what do they do with money ?
once CPU And memory were limited , Is the golden age of programming ; And now , We live in a pile of inefficient garbage . Alack! !
— Recommended reading —
— Recommended reading —
《 New programmers 001-004》 Fully listed , Welcome to scan the QR code below or Click on the subscription , You can enjoy e-books and exquisite paper books

边栏推荐
- [programmer interview classic] 01.09 string rotation
- Research 280+ documents! The team of Tsinghua Huang Gao, the winner of CVPR best paper, proposed the first dynamic network overview to comprehensively review the development of dynamic networks!
- Data integration | what are the tools for data integration at home and abroad?
- POM reports an error
- Summary of the most complete MySQL data types in history (Part 2)
- CSRF attack principle scenario
- Luo min cannot become Dong Yuhui
- Seven text editors that programmers should know are necessary for programming
- Pursue and kill "wallet Assassin" all over the network
- The current situation of the industry is disappointing. After working, I returned to UC Berkeley to study for a doctoral degree
猜你喜欢

Pychart exits pytest mode (run pytest in mode)

Thinkphp5.0.24 deserialization chain analysis

Promise basic use

Take the first place in the International Olympic Games in mathematics, physics and chemistry, and win all the gold medals. Netizen: the Chinese team is too good

Target segmentation for 10000 frames of video, less than 1.4GB of video memory, open source code | ECCV 2022

Custom type
![[hero planet July training leetcode problem solving daily] 20th BST](/img/25/2d2a05374b0cf85cf123f408c48fe2.png)
[hero planet July training leetcode problem solving daily] 20th BST

Hcip - BGP - border gateway protocol

Cloud native platform, let edge applications play out!

The most complete summary of MySQL data types in history - (first)
随机推荐
Open source demo | release of open source example of arcall applet
Performance analysis method - Notes on top of performance
[summer daily question] Luogu p1605 maze
Speed comparison between 64 bit width and 32 bit width of arm64 memory
Peripherals: interrupt system of keys and CPU
2022.7.20 linear table
Thinkphp5.0.24 deserialization chain analysis
Freedom and self action Hegel
Web Security Foundation - file upload
How to use ES6 async and await (basic)
xts performance auto fix script
Several schemes of traffic exposure in kubernetes cluster
JVM Foundation
G025-db-gs-ins-02 openeuler deployment opengauss (1 active and 1 standby)
Take C language from 0 to 1 - program structure and use examples
The cloud ecology conference comes with the "peak"!
Peripherals: timer, watchdog and RTC
Windows security hardening -- close unnecessary ports
Completefuture parallel asynchronous return processing
Research and application of scientific data management strategy for high energy synchrotron radiation source