Build Refactoring into Your Practice

Knowing how to refactor isn't worth much unless it's applied. Resolve to make your code lean and clean. On an XP team, this is part of everyday life. But even approaches that are heavily design driven expect programmers to implement the design well.

Build Testing into Your Practice

There's an old adage (as so many are), "If it ain't broke, don't fix it." (How many times has that last simple change caused an unexpected bug?) In programming, the downside of applying this adage is that the code just gets uglier and uglier.

Refactoring is willing to go against this rule through two mechanisms: safe refactorings and a supply of tests to verify that the transformations have been done correctly. Don't neglect your tests.

Get Help from Others

Get other people's opinions about your code, whether through pair programming, design/code reviews, or simply bugging your neighbor. One of the things that really got hammered home to me in writing this book is that almost any code can be improved (and sometimes we get to take advantage of the whole Internet's worth of help!).

Refactoring Workbook
Refactoring Workbook
ISBN: 0321109295
EAN: 2147483647
Year: 2003
Pages: 146

Similar book on Amazon © 2008-2017.
If you may any questions please contact us: