当前位置:网站首页>Are these old system codes written by pigs?
Are these old system codes written by pigs?
2022-06-25 16:53:00 【Hollis Chuang】
Xiao Wang has joined a new company , This company is a little old , So even Shishan is fermented , It tastes very strong .
Like most unlucky programmers , In this company , Most of the work done , Is to repair these shit mountains , Add bricks and tiles to it to create a bigger Shishan . Every time I am exhausted by tossing , I can't help the turbid air in my nostrils :“ The people who designed this system , It's really rubbish ”!
Of course , The people who designed this system , May have left long ago , It could also be your immediate boss . If you are lucky enough to get a gentle - tempered elder , He will tell you with great regret :“ The system is really riddled with holes , If only we had designed it in the right way ”!

No programmer has ever regretted , It's like people who lose money regret buying stocks , People who grow up regret coming to this world .
Many people see bad code , That's all in hindsight . At the moment the code runs ,“ Can run ” That's what matters . Rotten code can enter the warehouse and be put into production , It must be caused by the lack of some links .
Bad code has its own background .
Rush for construction period
There are countless managers , Want to quantify the work of programmers , And out of that came KPI、OKR Such a tool . At some time , It may be useful , But this way of working, measured by deadlines , It will cause a large accumulation of technical debt .
Under the pressure of construction period , Few people can think about the rationality of the demand , And subsequent extensibility . Bad code before Review Under the circumstances , Lack of refactoring 、 Limited testing , They rushed to the online operation . Some designs , It can be said that it is unreasonable from the source , However, due to the need for rapid implementation , The plan has to be compromised .
Most of the time , Code that lives and dies doesn't cause much problems . But there are always some projects , Very long life cycle , There is still a lot of need for repair . Build a building in a place where the foundation is unstable , There will always be a day of collapse .
But whatever it is , As long as it's not in your own hands .
Hand training program
I even found a very interesting phenomenon . Many departments want to train new people , Some very important modules and functions , Let new people do it .
Due to lack of experience , The newcomers have many defects in the scheme design . But in terms of time cost , It is not much different from the old bird . A lot of hands-on projects , Inadvertently, it will grow into a big mac , Then the defects left by it will be magnified .
Contrary to what most people think , The newcomers are in the technical scheme , Will adopt more new technologies and exotic skills , The old bird is good at using the most basic and simple tools to complete the design . This may be a kind of utilitarianism that wants to put what we have learned into practice and vanity that pursues fashion .
Unfortunately , The code that pursues skill , There will be many conventions and specifications in it , If the project is not under unified control , Such conventions and specifications will be contrary to other conventions and specifications in the project , The code style is not uniform , Debugging difficulty , Can't expand .
Self starting stove
Many programmers are very confident , Think of yourself as english Level and coding level are particularly high , In the code, the Dragon flies and the Phoenix dances , Self starting stove .
They don't care about the conventions and norms of the entire technology community , Name the interface , foreign API I put too much effort into my work , We usually call these people brother wheel who imitates others .
such as /health Interface , I don't call health, My name is /server_status.
Another example is the error code , I must have one called success_200, A place called fail_500. The subsequent entry correction Emperor sees such an error code , Scoff but dare not change , So he made his own set 200 and 500.
Such agreement and Amendment Agreement , Will accumulate more and more under the erosion of years , So that no one knows what it is .
therefore , If you see a project with very bad code , Don't rush to revise , Be sure to follow its rotten logic . believe me , It must be more secure than your correction .
copy emperor
In many companies , You go to see their products and codes , There will be a sense of deja vu .
you 're right , They copied it .
In the absence of product design and funding , The boss gave the ultimate order .
“ According to xxx Give me a copy One , Don't let go of a button ”.
copy One and design one are two concepts ,copy It usually means simple thinking , It is much worse than the mold in terms of details and functions .
What's worse , The mold is changing . If you're not lucky , A team just copy There is a product , The next day, I opened other people's products , good heavens , They have all changed their editions .
Si Xiang and UN designed code come from this .
Of course copy Emperor also means cv The engineer , But their destructive power is limited , The initial intention is also good , It can't cause much damage .
What do I do ?
regret , At least it's good .
This is relative to people who never regret . Regret shows that he knows what is right , It is only in some special circumstances that such consequences have been caused .
If the same reincarnation is given to people who have regret experience , He will think more about the time and personnel allocation of the project . The man who never regrets may be a stubborn donkey , Or maybe he really thinks he is right , This is a very sad thing .
If you are unlucky enough to maintain these shit mountains , Remember to do what you can , Don't venture in , And don't over correct . Unless your team gives real time and people , To really shovel this shit .
These codes , Of course it wasn't written by a pig , It's just putting people in a pigsty .
End
My new book 《 In depth understanding of Java The core technology 》 It's on the market , After listing, it has been ranked in Jingdong best seller list for several times , At present 6 In the discount , If you want to start, don't miss it ~ Long press the QR code to buy ~

Long press to scan code and enjoy 6 A discount
Previous recommendation I'm stupid , A bunch of them will only “ Google ” The programmer !
ArrayList#subList These four pits , If you're not careful, you'll get caught
If you enjoyed this article ,
Please hold on to the QR code , Focus on Hollis.

Forward to circle of friends , It was my greatest support .
Order one Looking at
Like is a feeling
Looking is a kind of support
边栏推荐
- Data type variable operator
- Bypass technology to talk about 'cross end'
- Mysql database multi table query
- 深入浅出对话系统——自己实现Transformer
- Navicat Premium 15 for Mac(数据库开发工具)中文版
- 3年,我是如何涨薪到20k?
- Reverse series to obtain any wechat applet code
- Multiple decorators decorate a function
- Cache architecture scheme of ten million level shopping cart system
- 论文笔记:Generalized Random Forests
猜你喜欢
随机推荐
Kalman Filter 遇到 Deep Learning : 卡尔曼滤波和深度学习有关的论文
Coredata data persistence
Reading mysql45 lecture - index continued
Generate post order traversal according to pre order traversal and mid order traversal
APIJSON简单使用
Day21 multithreading
tensorflow 旧版本
Day_ 04
2022-06-17 advanced network engineering (IX) is-is- principle, NSAP, net, area division, network type, and overhead value
The third day of mysql45
八种button的hover效果
Do you know all the configurations of pychrm?
微信公众号服务器配置
【機器學習】基於多元時間序列對高考預測分析案例
JVM内存结构
绕过技术聊'跨端'......
1-8Vmware中的文件共享
【精通高并发】深入理解汇编语言基础
[100 questions of Blue Bridge Cup intensive training] scratch command mobile Blue Bridge Cup scratch competition special prediction programming question intensive training simulation exercise question
Day_ 18 hash table, generic












