Refactoring Your Code
Because of project time pressures, you often need to make quick changes to code. Over time, these little changes add up, and, as a result, you need to revisit the code before the project is complete. This is known as technical debt. The code base becomes fragile, and it’s easy to introduce bugs and more difficult to maintain the code. It’s important to have a spring cleaning every now and then to fix the most obvious issues.
It makes sense to rearrange the code at a time when you’re not trying to change its functionality, a process referred to as refactoring. Of course, it’s also much easier to change functionality when you have clean, refactored code.
When you’re undertaking a major refactoring, don’t forget to back up ...
Get Learning Android™ Application Programming: A Hands-On Guide to Building Android Applications now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.