当前位置:网站首页>Be a professional software craftsman
Be a professional software craftsman
2022-07-23 21:04:00 【InfoQ】
The smallest unit of iteration can be a function
The purpose of red green switching is to solve the current demand / problem , And restructuring is to reduce technical debt , Deal with future changes .
When you don't know how to refactor , That is, the step is not small enough
- Start with a small step , It doesn't require a single refactoring to solve all the problems .
- Change the code to the same form , See if you can merge similar items .
- Tests must be run after every change . Ensure that all pass .
- repeat 2~3 Step , Until the refactoring is satisfactory .
TDD The three law
- Don't write any functional code before testing
- Just write test code that just happens to reflect a failure
- Only write test code that just passes .
The steps of reconstructing the legacy system
- Writing tests preserves the behavior of current functionality , Instead of modifying it .
- After the current function test fails due to the new function , Then modify the test logic .
- Only aim at bug Add test start . Don't deliberately write tests for parts that work well , Until necessary .
At the end

边栏推荐
- ssm+mysql实现零食商城系统(电商购物)
- Failed to introspect Class FeignClientFactoryBean 异常排查
- 信号的理解
- Understanding of signals
- Install under win7-vs2012 Net framework work
- [Yunxiang book club No. 13] Chapter V ffmpeg common methods for viewing media information and processing audio and video files
- VLAN综合实验
- 一时跳槽一时爽,一直跳槽一直爽?
- 第十二天:续第十一天(BGP相关知识)
- Oom mechanism
猜你喜欢

信号的理解

高数下|三重积分的计算2|高数叔|手写笔记

221. 最大正方形 ●● & 1277. 统计全为 1 的正方形子矩阵 ●●

STM32C8t6 驱动激光雷达实战(二)

1309_STM32F103上增加GPIO的翻转并用FreeRTOS调度测试

LU_ Asr01 voice module usage

Quick connect selection recommendation: what are the potential opportunities in the Korean market?
![[attack and defense world web] difficulty four-star 12 point advanced question: flatscience](/img/fc/6648116f1bb47f1888035796fa5a58.png)
[attack and defense world web] difficulty four-star 12 point advanced question: flatscience

Understanding of signals

高数下|二重积分的计算3|高数叔|手写笔记
随机推荐
从哪些维度评判代码质量的好坏?如何具备写出高质量代码的能力?
(Note)优化器Adam的学习率设置
05_ue4进阶_材质UV缩放
2022.7.11 MySQL job
第3章业务功能开发(创建线索)
Vite3 learning records
[shader realizes roundwave circular ripple effect _shader effect Chapter 6]
221. 最大正方形 ●● & 1277. 统计全为 1 的正方形子矩阵 ●●
Stm32c8t6 driven lidar (I)
1062 Talent and Virtue
The common interfaces of Alipay are uniformly encapsulated and can be used directly for payment parameters (applicable to H5, PC, APP)
高数下|二重积分的计算4|高数叔|手写笔记
【着色器实现RoundWave圆形波纹效果_Shader效果第六篇】
视觉slam学习|基础篇01
An interview question about common pitfalls in golang for range
最小生成树:Prim
OpenLayers实例-Advanced Mapbox Vector Tiles-高级Mapbox矢量贴图
The best time to plant trees is now
Detailed explanation of MSTP protocol for layer 3 switch configuration [Huawei ENSP experiment]
做一个有职业操守的软件匠人