<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>工程 on E7Coding</title><link>https://www.e7coding.com/tags/%E5%B7%A5%E7%A8%8B/</link><description>Recent content in 工程 on E7Coding</description><generator>Hugo</generator><language>zh-cn</language><managingEditor>Joy</managingEditor><webMaster>Joy</webMaster><lastBuildDate>Thu, 11 Jun 2026 00:00:00 +0000</lastBuildDate><atom:link href="https://www.e7coding.com/tags/%E5%B7%A5%E7%A8%8B/index.xml" rel="self" type="application/rss+xml"/><item><title>重构老项目前，我会先做这三件事</title><link>https://www.e7coding.com/posts/before-refactoring-legacy/</link><pubDate>Thu, 11 Jun 2026 00:00:00 +0000</pubDate><author>Joy</author><guid>https://www.e7coding.com/posts/before-refactoring-legacy/</guid><description>&lt;p&gt;接手一个没人敢动的老项目，最容易犯的错就是上来就大改。我的经验是先做三件事：&lt;/p&gt;
&lt;h2 id="1-给关键路径补上测试"&gt;1. 给关键路径补上测试&lt;/h2&gt;
&lt;p&gt;哪怕只是冒烟测试，也能在你改坏东西时第一时间报警。没有测试的重构，等于闭着眼睛拆炸弹。&lt;/p&gt;
&lt;h2 id="2-划清模块边界"&gt;2. 划清模块边界&lt;/h2&gt;
&lt;p&gt;先理清「谁依赖谁」，把要动的部分和外界的接口固定下来。边界稳了，内部怎么折腾都可控。&lt;/p&gt;
&lt;h2 id="3-留好可回滚的退路"&gt;3. 留好可回滚的退路&lt;/h2&gt;
&lt;p&gt;小步提交、特性开关、灰度发布——确保任何一步都能快速退回。重构是马拉松，不是一锤子买卖。&lt;/p&gt;
&lt;p&gt;做完这三件，再开始动手，心里就有底了。&lt;/p&gt;</description></item></channel></rss>