简体   繁体   English

删除不推荐使用的代码是坏主意还是好主意? [等候接听]

[英]Delete deprecated code is bad or good idea? [on hold]

In the previous version API, we created a module for creating a schedule in Webservice.在之前的版本 API 中,我们创建了一个用于在 Webservice 中创建计划的模块。 Next week we'll release intermediate version product in production but we have one trouble.下周我们将在生产中发布中间版本产品,但我们遇到了一个问题。 Customers said that they don't need this functional more.客户说他们不再需要这个功能了。 I'm a backend developer in this project, I refactored a few domain models and that saves this functional I must to refactored dto, view models and structure database.我是这个项目的后端开发人员,我重构了一些领域模型,并将这个功能保存到我必须重构的 dto、视图模型和结构数据库中。 PM offers that I should use @Deprecated and save this part of code but I think that we should delete this part of code because in the next version API we have to write another module for creating schedules. PM 提议我应该使用@Deprecated 并保存这部分代码,但我认为我们应该删除这部分代码,因为在下一个版本 API 中,我们必须编写另一个模块来创建计划。 I know that this part of the code will not be used in the next versions.我知道这部分代码在以后的版本中不会用到。

Dead code needs to be found and removed;需要找到并删除死代码; leaving dead code in is an obstacle to programmer understanding and action, and there's the risk that the code is awakened which can cause significant problems.留下死代码是程序员理解和行动的障碍,并且存在代码被唤醒的风险,这可能会导致严重的问题。 Deleting dead code is not a technical problem;删除死代码不是技术问题; it is a problem of mindset and culture, argued Kevlin Henney. Kevlin Henney 认为,这是心态和文化的问题。

more: https://www.infoq.com/news/2017/02/dead-code/更多: https://www.infoq.com/news/2017/02/dead-code/

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 Java对EXE的好坏有什么好处? - Java to EXE good or bad idea? 聪明的二传手? 好主意还是坏主意? - Smarter setter? Good or Bad Idea? 在测试中重用生产代码:好主意还是坏主意? (或者我可以在测试和生产中使用相同的代码)? - Reuse production code in tests : good or bad idea? (Or can I use the same code in test and production)? 在Abstract类上实现侦听器是个好主意吗? - Is it a bad or good idea to implement a Listener on an Abstract class? 为错误的配置抛出Unchecked Exception是一个好主意吗? - Is it a good idea to throw an Unchecked Exception for bad configuration? 删除包装程序异常的stacktrace:不好的主意? - Delete stacktrace of wrapper exceptions: bad idea? 通过setAttribute在ServletContext中存储常量枚举值是好事还是坏事? - Is storing constant enum values in the ServletContext via setAttribute a good or bad idea? RxJava-一个单一的热源观察? 好主意还是坏主意? - RxJava- A single Hot Source Observable? Good or Bad idea? 将所有国家和城市存储在Lucene索引中是好事还是坏事? - Is storing all the countries and cities in the world in the Lucene index a good or bad idea? 使应用程序上下文在全球可用-好/坏主意? - Making Application Context Globally Available - Good/Bad Idea?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM