Why Refactor?

This is why one writes unit tests and refactors.  Re: line # 13:47

[13:39] Jabley: I reverted the last change I made and it is still broke. Grrr!

[13:45] Adron: ok

[13:45] Jabley: I am just trying to figure out how the f*** to salvage this.

[13:45] Adron: kewl.

[13:45] Adron: not sure what kind of advice for that situation.

[13:45] Jabley: I desperately need to refactor my code

[13:45] Adron: I just punish myself and write it over if I fail on such a grand scale…

[13:45] Jabley: There isn’t any

[13:45] Adron: and refactor a ton…

[13:45] Adron: prevents the situation from happening.

[13:45] Jabley: Thats what I am considering

[13:45] Adron: …at least mostly prevents it.

[13:46] Jabley: I know what I did wrong but I can’t figure out how to make it write in the current app without a full rewrite. That full rewrite would be a ton better because I can refactor the code, which it needs, and start it correctly with UTs

[13:46] Jabley: write = right

[13:47] Jabley: Jeez I want to kick myself in the balls right now

[13:52] Adron: ouch.


So live and learn, WRITE UNIT TESTS AND REFACTOR, the alternatives are painful.  Big Smile [:D]

Technorati Tags:

del.icio.us Tags: