Search type Search syntax
Tags [tag]
Exact "words here"
Author user:1234
user:me (yours)
Score score:3 (3+)
score:0 (none)
Answers answers:3 (3+)
answers:0 (none)
isaccepted:yes
hasaccepted:no
inquestion:1234
Views views:250
Sections title:apples
body:"apples oranges"
URL url:"*.example.com"
Favorites infavorites:mine
infavorites:1234
Status closed:yes
duplicate:no
migrated:no
wiki:no
Types is:question
is:answer
Exclude -[tag]
-apples
For more details on advanced search visit our help page
Results tagged with Search options user 919

Refactoring is a disciplined technique for restructuring an existing body of code, altering its internal structure without changing its external behavior.

1
vote
There is no doubt I fall into this trap but some refactoring is important for the future support/debugging. When writing a major piece of code it becomes very easy to keep through lines of code …
answered Oct 14 '10 by Tim Murphy
21
votes
One of the benefits of having unit tests is so you can confidently refactor. If the refactoring does not change the public interface then you leave the unit tests as is and ensure after refactoring … they all pass. If the refactoring does change the public interface then the tests should be rewritten first. Refactor until the new tests pass. I would never avoid any refactoring because it breaks the tests. Writing unit tests can be a pain in a butt but its worth the pain in the long run. …
answered Sep 21 '10 by Tim Murphy