惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

云风的 BLOG
云风的 BLOG
M
MIT News - Artificial intelligence
博客园 - Franky
J
Java Code Geeks
V
Visual Studio Blog
G
Google Developers Blog
罗磊的独立博客
MongoDB | Blog
MongoDB | Blog
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
Recent Announcements
Recent Announcements
Last Week in AI
Last Week in AI
Cyber Security Advisories - MS-ISAC
Cyber Security Advisories - MS-ISAC
Stack Overflow Blog
Stack Overflow Blog
博客园 - 司徒正美
The GitHub Blog
The GitHub Blog
腾讯CDC
阮一峰的网络日志
阮一峰的网络日志
V
V2EX
博客园 - 【当耐特】
IT之家
IT之家
I
InfoQ
U
Unit 42
C
Check Point Blog
Martin Fowler
Martin Fowler

博客园 - 顽石

How to run explorer.exe as another user 【转载】Sql中判断"数据库"、"表"、"临时表"、"存储过程"和列"是否存在 【转载】如何修改MSDE的登录方式及sa密码 【转载】windows 2008 r2 AD密码策略 无法启动wicrosoft office outlook ,无法打开outlook窗口 问题的解决 C#获取路径 [转载]程序员能力矩阵 你属于哪一层? 如何用visual studio 2005 编写C语言程序 EXCHANGE2007安装及备份还原操作手册 [转载]PowerShell 经典脚本贮藏室 【转载】全程图解--教你如何做RAID磁盘阵列 【转载】易学易用的Windows PowerShell 【转载】不一样的命令行 – Windows PowerShell简介 【转载】RAID扫盲 安装SQL SERVER 2005 SP3 问题及解决方案 在尝试安装 SQL Server 2005 Service Pack 或 SQL Server 2005 修补程序包时出现错误消息:“Error 29528. The setup has encountered an unexpected error while Setting Internal Properties”(错误 29528。安装程序在设置内部属性时遇到错误) [转载]IIS出现“另一个程序正在使用此文件,进程无法访问。”解决办法 Announcing SharePoint Server 2010 Preliminary System Requirements [转载]在Vista上安装MOSS2007
Refactoring--1
顽石 · 2010-04-01 · via 博客园 - 顽石

When you find you have to add a feature to a program, and the program's code is not structured in a convenient way to add the feature, first refactor the program to make it easy to add the feature, then add the feature.

Before you start refactoring, check that you have a solid suite of tests. These tests must be self-checking.

Refactoring changes the programs in small steps. If you make a mistake, it is easy to find the bug.