当前位置:网站首页>Why do programmers have the idea that code can run without moving? Is it poisonous? Or what?
Why do programmers have the idea that code can run without moving? Is it poisonous? Or what?
2022-07-02 12:22:00 【Master Ma Nongxing】
An interesting thing happened in the company .
01
First of all, let me introduce my company code , Probably 5 Years ago , The company needs to upgrade gcc Code , Try turning docker, Put it in the cloud environment , However, this batch of code is 2000 In, there was , The earliest part may be written in 1980 years bell laboratory , The first batch of people who need maintenance and upgrading have long retired , The second group also retired , Every line of code moves with fear .

Then Lao Zhang suddenly shouted at work that day , Ask loudly who changed the code , So obvious bug Can come out , Don't write notes yet .
Because there was a major accident in production , Otherwise Lao Zhang wouldn't be so angry , System memory leak , The system crashed , Affect customer use .
At that time, the project manager spoke , You check git Record of submission , See who submitted the code , Find out that the whole company notifies , Deduct his year-end bonus and project bonus .

Then Lao Zhang said , Looks very angry , say , I'm already checking .
After a few minutes , I only heard Lao Zhang say : Impossible , How could it be ?
So the project manager came up to see , I found that this code was submitted by Lao Zhang himself a year ago .
Don't mention how embarrassed Lao Zhang was at that time .
It is hard to imagine , How much shit the code of this project will be , After the senior programmer moved, he didn't know it was written by himself , So who else dares to move ?
02
Then Lao Zhang was criticized by the whole company , Require the project team to rectify , And a review . Now can you understand ? Code can run , Don't change it , If you change it, there may be some moths .

Changing the code is not a person's business , But the common work of development and testing , Can run , It can run even if the code looks chaotic , Also passed the professional test . And the code you changed , You can't experience as much testing as old code in a short time . There may be hidden diseases . Unless the company decides to refactor the code , To move .

also , Code that can run without moving , Generally, it will be called Shishan like code , I believe we all have the fear of being dominated by Shishan , The humiliating experience of being trapped in Shishan , The only way to control the shit mountain , Not change , It is No changes .

What I want to say is , If your code can run , But you don't know why it can run , You'd better not submit this code , Understand and then submit . A colleague wrote a code before , The function is for capacity 1000 The user of a server is assigned a unique ID. His approach is also very simple , You can run, too ? But when it's online , The number of online users of this server is about 800-900 about , It will probably lead to server downtime . After reading his practice , Is in 1-1000 Take a random number from , If this number is used , Change a number randomly , Then determine whether someone uses , repeat . When there are more users , Assign new ID when , Will hit frequently ID, It's hard to jump out of that cycle .
therefore , Don't move the code when it runs .
About Python Technology reserve
Python Learning route summary
Python The technical points in all directions are sorted out , Form a summary of knowledge points in various fields , The use of it is , You can find the corresponding learning resources according to the above knowledge points , Make sure you learn more comprehensively .

Python Essential development tools 
The high-quality goods Python Learning books
When I learn a certain foundation , When you have your own understanding , I will read some books compiled by my predecessors or handwritten notes , These notes detail their understanding of some technical points , These understandings are quite original , You can learn different ideas .

reminder : Limited space , Packaged folder , The way to get it is : At the end of the article
Python Learning video 600 Collection
Watch the zero basics learning video , Watching video learning is the quickest and most effective way , Follow the teacher's ideas in the video , From foundation to depth , It's still easy to get started .

Practical cases
Optical theory is useless , Learn to knock together , Do it , Can you apply what you have learned to practice , At this time, we can make some practical cases to learn .

100 Avenue Python Exercises
Check the learning results . 

Interview questions



边栏推荐
- Maximum profit of jz63 shares
- Drools executes the specified rule
- 记录一下MySql update会锁定哪些范围的数据
- SCM power supply
- drools动态增加、修改、删除规则
- Error in kubeadm join: [error port-10250]: port 10250 is in use [error fileavailable--etc kubernetes PKI
- [geek challenge 2019] upload
- 字符串回文hash 模板题 O(1)判字符串是否回文
- Leetcode14 longest public prefix
- AAAI 2022 | Peking University & Ali Dharma Institute: pruning and compression of pre training language model based on comparative learning
猜你喜欢

Drools dynamically add, modify, and delete rules

使用Sqoop把ADS层数据导出到MySQL

【C语言】十进制数转换成二进制数

The blink code based on Arduino and esp8266 runs successfully (including error analysis)

排序---

AI中台技术调研

Tas (file d'attente prioritaire)

Thesis translation: 2022_ PACDNN: A phase-aware composite deep neural network for speech enhancement

Embedded Software Engineer career planning

arcgis js 4. Add pictures to x map
随机推荐
堆(優先級隊列)
中国交通标志检测数据集
Fresh, 2022 advanced Android interview must know 100 questions (interview questions + answer analysis)
Leetcode209 subarray with the smallest length
Leetcode122 买卖股票的最佳时机 II
FastDateFormat为什么线程安全
SCM power supply
MySQL and PostgreSQL methods to grab slow SQL
Map and set
Leetcode209 长度最小的子数组
5g era, learning audio and video development, a super hot audio and video advanced development and learning classic
Less than three months after the programmer was hired, the boss wanted to launch the app within one month. If he was dissatisfied, he was dismissed immediately
Sub thread get request
使用Sqoop把ADS层数据导出到MySQL
mysql数据库基础
上传文件时,服务器报错:IOFileUploadException: Processing of multipart/form-data request failed. 设备上没有空间
寻找二叉树中任意两个数的公共祖先
Multiply LCA (nearest common ancestor)
drools决策表的简单使用
Go学习笔记—基于Go的进程间通信