Linux Journal introduces
ZenTest, with examples of how to use it on Ruby code. "Ryan
Davis has written a great tool called ZenTest, which creates test suites
for existing bodies of code. Because a lot of people are new to
refactoring, unit testing and ZenTest, this article serves as an
introduction to this trio of tools."
(Log in to post comments)
refactoring
Posted Sep 14, 2004 21:15 UTC (Tue) by davidw (subscriber, #947)
[Link]
Isn't that just moving bits of code around when you realize you could make the program a bit more efficient/smaller/cleaner? Why do people treat it like a big deal?
refactoring
Posted Sep 15, 2004 1:42 UTC (Wed) by maney (subscriber, #12630)
[Link]
Why do people treat it like a big deal?
Because if you've been creating code without any overall plan, just doing the minimum needed at each tiny step, in accordance with XP dogma, you will need to do a *lot* of refactoring. Or perhaps you've inherited a crumbling pile of code that originated in a formal, rigid requirements spec, and it's just not practical to dump it and start over, so again, you're going to be refactoring like a madman (except where you can sneak in a complete rewrite of some especially dodgy bit). Etc.
Then again, the sort of improvement by rewriting that refactoring is seems not to be performed excessively often, so anything that encourages it is doing some good, even at the expense of mountaining a few molehills.
refactoring
Posted Sep 15, 2004 11:45 UTC (Wed) by massimiliano (subscriber, #3048)
[Link]
...in accordance with XP dogma, you will need to do a *lot* of refactoring...
Well, in fact "XP dogma" mandates a lot of refactoring at each
iteration: they know that it is really needed, expecially when working
feature by feature, in small incremental steps.
refactoring
Posted Sep 15, 2004 2:05 UTC (Wed) by kevinbsmith (guest, #4778)
[Link]
Refactoring is rarely about making the code smaller or faster. It's usually about making it "cleaner", as you say.
Without refactoring, almost any code base will rot over time. It will become more and more complex, and harder and harder to enhance or maintain.
Without refactoring, even code that was well-designed when it was first written (which is unfortunately rare) cannot evolve to take advantage of what the team learns over time. The design would remain needlessly frozen. Refactoring is really designing.
Sure, refactoring is just pushing code around. But the positive effects are huge.