The old code of the pits, whether or not to change the old code?

Original October 31, 2017 09:00:40

In software research and development, we will always encounter a scenario that is to change or add a function to the code which is not part of the system that we are creating, nor familiar with, and more responsible for its own system. It will be in trouble, but the heart will collapse at this time.

So, in the face of the code left by the former programmer, do you want to change it? To rewrite the old code, how can we keep the pit away from it?


A caricature of the programmer 's "programmers", published in the "programmer"

For a long time, the industry has been spreading a common taboo: if you hate a programmer, let him maintain the old lost code! Mention the old code and believe that all the programmers have what they have to say.

Perhaps everyone has a border expansion ambitions, so the entry back to the old code redundancy complex, hope everything will overthrow. After all, the code structure Bug, the slow operation is too challenging the aesthetic and so on, it is easy to make people crazy. But for a software enterprise, the old code is the symbol of the assets, the core and the important competitiveness that has been accumulated for many years.

For software products, it is very common for people to maintain code several times. If your new technology, new language or new framework is not able to bring a qualitative leap to the product, why do technical leaders agree to rewrite project code? Not to mention the existence of unexpected conditions such as the break of capital chain and the separation of core programmers during the maintenance process.

Based on the thinking above, do we still move or do not move to the old code? In the industry, there are voices of approval and opposition:

@mostone:
Of course, it can move, but generally, the code of a project is large. If the coupling is high, the risk of modification is bound to be great.

@u013553804:
In a big way, we all push back, when there is nothing to do.

@u012377333:
Whether old code can move or not depends on how old code is written. For example, some open source frameworks, many of the underlying codes do not need to move or simply add new code related to business logic. If the old code is not based on the code code, it is bound to bury a lot of thunder, and who dies. This involves a problem. Every code merge must be code review, so that all developers can agree on the code, so that the old code will become more durable.

@chinglish:
The revolutionary time before you go to the revolution will eventually reform his life; the revolutionary time to go revolution that is what people should break edward.

@dreaper126:
From the business needs, from the upper support from a well-off period, do not open the thunder, the 10 Fen lost benefits, you will become a traitor through the ages.

@ Wang ocean's blog:
Variable names did not point, sometimes write back by mistake; interface magic number, I see on the timid; public private mix, proxy is confused; message everywhere, commissioned a bunch of ways; third party libraries no source, no single object with change notes; many responsibilities and sadness reverse flow into the river; products the sudden increase of new features, a line of code to the task has become great God; commissioned to write a line too much.

What do you think about the old code? Welcome to share your old code each one airs his own views, and the love and hate in the message area.

Copyright declaration: This article is an original article for the blogger. It is not allowed to be reprinted without the permission of the blogger.

Without changing the code, CS turns BS

Through satrda's free browser plug-in, you can directly convert CS programs into BS runs, including PB, Delphi, VB, C++,.Net, and other CS programs. When you enter your own configured address in a browser, the plug-in automatically downloads the uploaded CS application,...
  • Pcwe2002
  • Pcwe2002
  • 2017, 06 07, 2017, 22:20
  • One thousand seven hundred and fifty-eight

Delphi CS to BS

Through satrda's free browser plug-in, the Delphi CS program is converted to BS to run in the browser. ...
  • Pcwe2002
  • Pcwe2002
  • 2017, 06 07, 2017, 15:47
  • Nine hundred and twenty-nine

Linux only changes the date and does not change the time

In order to bypass some
  • Tanweii163
  • Tanweii163
  • 2014, 19 06, 2014, 14:45
  • Eight hundred and one

Oracle official network downloads the old version of JDK

1、进入http://www.oracle.com 2、点击Downloads---->Java for Developers 3, in the pop-up page, drop-down page to the bottom,...
  • Xuke6677
  • Xuke6677
  • 2015, 30 01, 2015, 12:31
  • Two thousand three hundred and thirty-six

Is bitcoin a digital currency or a virtual currency?

Is bitcoin a digital currency or a virtual currency? Is the bitcoin a virtual currency, a digital currency, or both? Why is this problem very important? In recent news reports, bitcoin is often referred to as the two names. The Bangkok post today said "virtual money, including bitcoin", and...
  • U013954688
  • U013954688
  • 2014, 20 03, 2014, 12:05
  • Nine hundred and sixty-three

Several ways to remove text without changing the background in PS

Photoshop several ways to remove the text on a picture 1, use the copy stamp tool to remove the text. This is a more common method. The specific operation is to select a copy of the stamp tool to hold down Alt key, clicking similar in no text area...
  • Yangzaiqiu1986814
  • Yangzaiqiu1986814
  • 2014, 07 01, 2014, 17:38
  • Nine thousand one hundred and twenty-one

We don't need to give you an IOU!

My friend sent it to me, and I thought it was very realistic, funny and even exaggerated. Source text connection: Http://toutiao.com/i6257302629982929410/ introduction You = client For the company that makes 2C products,...
  • Wangshubo1989
  • Wangshubo1989
  • 2016, 05 03, 2016, 22:49
  • Four thousand six hundred and twenty-eight

At the beginning of the heart does not change, not

There is love, work, dream, and youth. Love books, love movies, love music, love travel, love thinking. Wait to become thin, wait for a fortune, wait to go abroad, wait for the dream to come true, wait for the winter to pass, wait for you to love me; A four five seven boy, continue my pursuit, in the way of practice. Once I saw the difference.
  • Zbwroom
  • Zbwroom
  • 2017, 21 08, 2017, 10:30
  • One thousand one hundred and fifteen

WeChat browsers on pits

Preface As we all know, the WeChat browser (X5 kernel) is called the "IE6", which is called the mobile end. Recently discovered that a WebApp of mine appeared on the bottom of WeChat, so I want to write an article to summarize some problems and solutions encountered in WeChat development.
  • Lxcboke
  • Lxcboke
  • 2017, 05 04, 2017, 17:15
  • Six hundred and forty-seven

The pit of the pits

1, session_start () Description: in the first two days, when doing a function, you need to get different data from 6 places. The first thing is to send 1 requests to get 6 different data. After that, it finds super slow!!! Then it changes to 6 requests, first and then eggs.
  • V587_lu
  • V587_lu
  • 19:41 in December 11, 2016
  • Two hundred and twenty
Content Report
Back to the top
Collector assistant
Bad information report
You report the article:The old code of the pits, whether or not to change the old code?
Reporting reasons:
Reasons for the following:

(at most only 30 words are allowed)