技术债务_技术债务的10倍解决方案-程序员宅基地

技术标签: python  java  人工智能  物联网  大数据  

技术债务

Case study on an early-stage startup’s React.js front end

早期创业公司React.js前端的案例研究

You blame high technical debt for low velocity. You get asked: How much time do you need to address it? Unknown. But when will you start seeing a tangible improvement in productivity? If you do it right, from day one.

您将技术欠佳归咎于速度慢。 您会被问到: 您需要花多少时间解决? 未知。 但是,什么时候开始看到生产率的切实提高? 如果做得对, 从第一天开始

This is a compilation of practical advice on how to get the fastest, front-loaded ROI during this process.

这是有关如何在此过程中获得最快的前端投资回报率的实用建议的汇总。

明智地选择您的重构战斗 (Choose your refactoring battles wisely)

识别 (Identify)

Use product-driven bugs, new features or change requests as opportunities to identify refactoring candidates.

使用产品驱动的错误,新功能或变更请求作为识别重构候选者的机会。

跟踪 (Track)

Prefer a tool that facilitates communicating this work with the business and provides transparency.

建议使用一种工具来促进与企业的交流,并提供透明度。

划分 (Divide)

You don’t have to refactor modules or even components in full. Break work down to smaller tasks and prioritize separately.

您不必完全重构模块甚至组件。 将工作分解为较小的任务,并分别确定优先级。

The same principle applies for new code too; it doesn’t have to be “state of the art”, it’s okay to reuse patterns that you are planning to change but not just yet.

同样的原则也适用于新代码。 它不必一定是“最新技术” ,也可以重用您打算改变的模式,而不仅仅是现在。

优先排序 (Prioritize)

Some of the parameters you’ll need to consider:

您需要考虑的一些参数:

  1. The frequency of change requests

    变更请求的频率

    If a certain feature is not frequently touched, the value in refactoring it, is minimal.

    如果不经常触摸某个功能,则重构它的价值将很小。

  2. The product roadmap

    产品路线图

    Refactoring a soon to be a deprecated module, even if it’s frequently changed, could be mostly a throwaway.

    即使将其频繁更改,将很快重构为已弃用的模块也可能会很容易被丢弃。

  3. Onboarding and mentoring

    入职和指导

    New developers tend to follow patterns found in the existing codebase; this is acceptable and desirable. Removing code smells from modules that you use as a reference can save you and your team time.

    新的开发人员倾向于遵循现有代码库中的模式。 这是可以接受和期望的。 从用作参考的模块中消除代码异味可以节省您和团队的时间。

  4. The cost of identifying, tracking, and prioritizing itself

    识别,跟踪和确定自身优先级的成本

    If you see a quick win, it’s better to go for it immediately and avoid the overhead of re-identifying, tracking, and communicating the issue. Just be sure it is indeed quick.

    如果您看到了捷径,最好立即采取行动,避免重新识别,跟踪和传达问题的开销。 只要确保确实如此即可。

  5. Future technical debt

    未来技术债务

    Adapting to an evolving product and new technology, or even to your own improved skills and domain knowledge means that regardless of how much thought you put on a design today, you are also introducing the technical debt of tomorrow. Avoid refactoring something until you see clear value in doing so.

    适应不断发展的产品和新技术,甚至适应您自己提高的技能和领域知识,意味着无论您今天对设计有多大的想法,都在介绍明天的技术债务。 避免重构,直到您看到这样做的明显价值为止。

Our phase 1 refactoring was a mix of critical architectural issues (e.g. extensive prop drilling — poor component wiring), quick wins (e.g. converting magic numbers to semantically named constants), and building the most commonly used core components (buttons, form fields, etc).

我们的第1阶段重构是混合了关键的架构问题(例如,广泛的道具钻Kong-不良的组件布线),快速的胜利(例如,将魔术数字转换为语义上命名的常量)以及构建最常用的核心组件(按钮,表单字段等) )。

Looking for some quick wins? Here’re 5 good tips that mostly aim to reduce cognitive complexity.

寻找一些快速的胜利? 这里有5条很好的技巧 ,主要旨在降低认知的复杂性。

回归分析 (Regressions)

You’ll often hear that to refactor some code, you should start by covering its functionality with automated tests first (if there aren’t any). We couldn’t do this. A trick to mitigate the risk of regressions is to always combine refactoring with some product-driven work. Then QA and UAT for that work will naturally cover the refactored code too.

您经常会听到,为了重构某些代码,您应该首先使用自动化测试(如果没有的话)介绍其功能。 我们做不到。 减轻回归风险的一种技巧是始终将重构与某些产品驱动的工作结合在一起。 然后,这项工作的QA和UAT也自然会涵盖重构的代码。

测试覆盖面不止一个数字 (Test coverage is more than a number)

Going from 0% to optimal test coverage takes time. During this journey, whatever your coverage is, make it as worthwhile as possible. Here’s how:

从0%达到最佳测试覆盖率需要时间。 在此过程中,无论您的覆盖范围是什么,都应尽可能使它值得。 这是如何做:

从集成测试开始 (Start with integration tests)

They will cover larger areas of functionality more quickly and provide you with more confidence. Read Kent C. Dodds’ blog for more best practices in testing.

它们将更快地覆盖更大的功能区域,并为您提供更多的信心。 阅读Kent C. Dodds的博客 ,了解更多测试最佳实践。

优先确定应首先测试哪些组件 (Prioritize which components should be tested first)

Some things to consider:

要考虑的一些事情:

  1. Complexity

    复杂

    Overly complex components are more susceptible to regressions.

    过于复杂的组件更易于回归。

  2. How popular is the user journey that the component belongs to?

    该组件所属的用户旅程有多受欢迎?

    A regression that manifests during a very common user journey can quickly and severely hurt the product’s credibility.

    在非常普通的用户旅程中出现的回归可能会Swift严重损害产品的信誉。

  3. Business-specific importance factors

    特定于业务的重要因素

    If an admin-only platform configuration form is the first thing a user does when evaluating your product, although it doesn’t affect many users, it still could be relatively high-priority.

    如果用户在评估产品时首先要做的是仅管理员平台配置表单,尽管它不会影响很多用户,但它的优先级仍然较高。

  4. Previous regressionsUsers are less forgiving when it comes to repetitive issues on things that they have already brought to your attention. The rule of thumb is that you should write tests asserting every bug fix you deploy.

    以前的回归对于涉及已引起您注意的问题的重复性问题,用户不太宽容。 经验法则是,您应该编写测试来断言所部署的每个错误修复程序。

Image for post
Our most complex components — not all of them belong to popular user journeys
我们最复杂的组件-并非全部都属于流行的用户旅程

监控与测量 (Monitor and Measure)

Yes! If you’re doing this right, your team velocity should be increasing every day and after a few months, the improvement should be significant.

是! 如果您做对了,您的团队速度应该每天都在增加,几个月后,改善应该是显着的。

If you really want to see the debt reduction progress in numbers, you can set up some tools, besides the test coverage report, that monitor the health of your codebase. This could also reinforce the business’s confidence in your approach.

如果您确实希望看到减少债务的进度,可以设置一些工具,除了测试覆盖率报告以外,还可以监视代码库的运行状况。 这也可以增强企业对您的方法的信心。

We’re using both the CodeClimate CLI and SonarQube. Both of these tools come with specific suggestions about what should be refactored, however, we mostly use them to get summaries and check how the code quality is trending over time.

我们同时使用CodeClimate CLI和SonarQube。 这两个工具都带有有关应重构内容的具体建议,但是,我们大多使用它们来获取摘要并检查代码质量随时间的变化趋势。

Image for post
Our Test Coverage & Code Climate report history
我们的测试范围和代码气候报告的历史记录

We went from 1490 issues in February 2019 to 786 in May 2020 (-47%). The results are even more impressive if we focus only on those categorized as “Major” (-57%). Note that despite the continuous development of new features, the total lines are down by 18%, which is another by-product of the ongoing refactoring.

我们从2019年2月的1490期增加到2020年5月的786期(-47%)。 如果我们只关注那些被归类为“主要”(-57%)的结果,结果将更加令人印象深刻。 请注意,尽管不断开发新功能,但总行数却下降了18%,这是正在进行的重构的另一个副产品。

外卖 (Takeaways)

优先,优先,优先。 (Prioritize, prioritize, prioritize.)

Addressing your technical debt means that you’re working today on improving your tomorrow’s productivity. In this context, timing is more important than anything else.

解决您的技术债务意味着您正在努力提高明天的生产率。 在这种情况下, 计时比什么都重要。

翻译自: https://medium.com/swlh/technical-debt-the-10x-way-of-addressing-it-9669dcec6190

技术债务

版权声明:本文为博主原创文章,遵循 CC 4.0 BY-SA 版权协议,转载请附上原文出处链接和本声明。
本文链接:https://blog.csdn.net/weixin_26705651/article/details/108915457

智能推荐

oracle 12c 集群安装后的检查_12c查看crs状态-程序员宅基地

文章浏览阅读1.6k次。安装配置gi、安装数据库软件、dbca建库见下:http://blog.csdn.net/kadwf123/article/details/784299611、检查集群节点及状态:[root@rac2 ~]# olsnodes -srac1 Activerac2 Activerac3 Activerac4 Active[root@rac2 ~]_12c查看crs状态

解决jupyter notebook无法找到虚拟环境的问题_jupyter没有pytorch环境-程序员宅基地

文章浏览阅读1.3w次,点赞45次,收藏99次。我个人用的是anaconda3的一个python集成环境,自带jupyter notebook,但在我打开jupyter notebook界面后,却找不到对应的虚拟环境,原来是jupyter notebook只是通用于下载anaconda时自带的环境,其他环境要想使用必须手动下载一些库:1.首先进入到自己创建的虚拟环境(pytorch是虚拟环境的名字)activate pytorch2.在该环境下下载这个库conda install ipykernelconda install nb__jupyter没有pytorch环境

国内安装scoop的保姆教程_scoop-cn-程序员宅基地

文章浏览阅读5.2k次,点赞19次,收藏28次。选择scoop纯属意外,也是无奈,因为电脑用户被锁了管理员权限,所有exe安装程序都无法安装,只可以用绿色软件,最后被我发现scoop,省去了到处下载XXX绿色版的烦恼,当然scoop里需要管理员权限的软件也跟我无缘了(譬如everything)。推荐添加dorado这个bucket镜像,里面很多中文软件,但是部分国外的软件下载地址在github,可能无法下载。以上两个是官方bucket的国内镜像,所有软件建议优先从这里下载。上面可以看到很多bucket以及软件数。如果官网登陆不了可以试一下以下方式。_scoop-cn

Element ui colorpicker在Vue中的使用_vue el-color-picker-程序员宅基地

文章浏览阅读4.5k次,点赞2次,收藏3次。首先要有一个color-picker组件 <el-color-picker v-model="headcolor"></el-color-picker>在data里面data() { return {headcolor: ’ #278add ’ //这里可以选择一个默认的颜色} }然后在你想要改变颜色的地方用v-bind绑定就好了,例如:这里的:sty..._vue el-color-picker

迅为iTOP-4412精英版之烧写内核移植后的镜像_exynos 4412 刷机-程序员宅基地

文章浏览阅读640次。基于芯片日益增长的问题,所以内核开发者们引入了新的方法,就是在内核中只保留函数,而数据则不包含,由用户(应用程序员)自己把数据按照规定的格式编写,并放在约定的地方,为了不占用过多的内存,还要求数据以根精简的方式编写。boot启动时,传参给内核,告诉内核设备树文件和kernel的位置,内核启动时根据地址去找到设备树文件,再利用专用的编译器去反编译dtb文件,将dtb还原成数据结构,以供驱动的函数去调用。firmware是三星的一个固件的设备信息,因为找不到固件,所以内核启动不成功。_exynos 4412 刷机

Linux系统配置jdk_linux配置jdk-程序员宅基地

文章浏览阅读2w次,点赞24次,收藏42次。Linux系统配置jdkLinux学习教程,Linux入门教程(超详细)_linux配置jdk

随便推点

matlab(4):特殊符号的输入_matlab微米怎么输入-程序员宅基地

文章浏览阅读3.3k次,点赞5次,收藏19次。xlabel('\delta');ylabel('AUC');具体符号的对照表参照下图:_matlab微米怎么输入

C语言程序设计-文件(打开与关闭、顺序、二进制读写)-程序员宅基地

文章浏览阅读119次。顺序读写指的是按照文件中数据的顺序进行读取或写入。对于文本文件,可以使用fgets、fputs、fscanf、fprintf等函数进行顺序读写。在C语言中,对文件的操作通常涉及文件的打开、读写以及关闭。文件的打开使用fopen函数,而关闭则使用fclose函数。在C语言中,可以使用fread和fwrite函数进行二进制读写。‍ Biaoge 于2024-03-09 23:51发布 阅读量:7 ️文章类型:【 C语言程序设计 】在C语言中,用于打开文件的函数是____,用于关闭文件的函数是____。

Touchdesigner自学笔记之三_touchdesigner怎么让一个模型跟着鼠标移动-程序员宅基地

文章浏览阅读3.4k次,点赞2次,收藏13次。跟随鼠标移动的粒子以grid(SOP)为partical(SOP)的资源模板,调整后连接【Geo组合+point spirit(MAT)】,在连接【feedback组合】适当调整。影响粒子动态的节点【metaball(SOP)+force(SOP)】添加mouse in(CHOP)鼠标位置到metaball的坐标,实现鼠标影响。..._touchdesigner怎么让一个模型跟着鼠标移动

【附源码】基于java的校园停车场管理系统的设计与实现61m0e9计算机毕设SSM_基于java技术的停车场管理系统实现与设计-程序员宅基地

文章浏览阅读178次。项目运行环境配置:Jdk1.8 + Tomcat7.0 + Mysql + HBuilderX(Webstorm也行)+ Eclispe(IntelliJ IDEA,Eclispe,MyEclispe,Sts都支持)。项目技术:Springboot + mybatis + Maven +mysql5.7或8.0+html+css+js等等组成,B/S模式 + Maven管理等等。环境需要1.运行环境:最好是java jdk 1.8,我们在这个平台上运行的。其他版本理论上也可以。_基于java技术的停车场管理系统实现与设计

Android系统播放器MediaPlayer源码分析_android多媒体播放源码分析 时序图-程序员宅基地

文章浏览阅读3.5k次。前言对于MediaPlayer播放器的源码分析内容相对来说比较多,会从Java-&amp;amp;gt;Jni-&amp;amp;gt;C/C++慢慢分析,后面会慢慢更新。另外,博客只作为自己学习记录的一种方式,对于其他的不过多的评论。MediaPlayerDemopublic class MainActivity extends AppCompatActivity implements SurfaceHolder.Cal..._android多媒体播放源码分析 时序图

java 数据结构与算法 ——快速排序法-程序员宅基地

文章浏览阅读2.4k次,点赞41次,收藏13次。java 数据结构与算法 ——快速排序法_快速排序法