Code refactoring isn’t code rewriting. Refactoring is the process of restructuring existing computer code without changing its external behaviour. This Software Gardening article talks about what is refactoring, why to refactor your code and the built-in refactorings in Visual Studio.

Technical debt is a metaphor coined by Ward Cunningham in 1992. This concept refers to the work that needs to be done so that a software development project could be considered as “complete”. Could you try to measure your amount of technical debt? Could you use some tools to do this? These are some of the questions that this article explores.

The Mikado Method is a structured way to make major changes to complex code. When a codebase gets larger and complicated, as they often do, there usually comes a time when you want to improve portions of it to meet new functional requirements, new legal requirements, or a new business model. You may also just want to change it to make it more comprehensible.

The primary purpose of writing characterization tests is to protect business functionality from inadvertent side-effects when difficult-to-change code needs to be modified. Untested or poorly tested legacy code can be complex, difficult to read, and not injectible — all of which makes it hard to change when you need to. This article explains how to characterize such code properly for unit testing so that you can refactor it safely.

Code smells are structural characteristics of software that may indicate a code or design problem that makes software hard to evolve and maintain, and may trigger refactoring of code. Recent research is active in defining automatic detection tools to help humans in finding smells when code size becomes unmanageable for manual review. Since the definitions of code smells are informal and subjective, assessing how effective code smell detection tools are is both important and hard to achieve.

With the growth of PHP from a simple scripting language to a full-fledged programming language, there has been a parallel growth in the complexity of the code bases of a typical PHP application. To control support and maintenance of these applications, various testing tools help automate this process. One method, unit testing, allows you to test the code you write directly for correctness. However, often legacy code bases aren't adaptable to this kind of testing. This article looks at strategies for refactoring common problematic PHP code to make it easier to test using popular unit testing tools, while reducing dependencies that improves your code base.

This article describes the various refactorings available in Eclipse Java™ Development Tools (JDT), including what each refactoring does, when to use it, and how to use it. It also explores the refactoring script functionality in Eclipse, which allows library developers to share code refactorings with their clients.