星期六, 二月 10, 2007

Code Complete - fixing a defect

* Understand the problem before you fix it
* Understand the program , not just the problem
- that means the code related to the problem , not a few lines , but a few hundreds
* Confirm the defect diagnosis
* Relax
- This is very important , in many circumstance you will work under pressure
* Save the original source code
- using version control tool
* Fix the problem , not the symptom
* Make one change at a time
* Check your fix
* Add a unit test that express the defect
* Look for similar defects

没有评论: