Edit-and-pray

코드를 수정하는 안좋은 (하지만 널리 쓰이는) 방법:

Changes in a system can be made in two primary ways. I like to call them “edit-and-pray” and “cover-and-modify”. Unfortunately, edit-and-pray is pretty much the industry standard. When you use edit-and-pray, you carefully plan the changes you are going to make, you make sure that you understand the code you are going to modify, and then you start to make the changes. When you’re done, you run the system to see if the change was enabled, and then you poke around further to make sure that you didn’t break anything. The poking around is essential. When you make your changes, you are hoping and praying that you’ll get them right, and you take extra time when you are done to make sure that you did. —p9, Working effectively with legacy code

좋은 방법은 Cover-and-modify.

2025 © ak