Important Notice: Our web hosting provider recently started charging us for additional visits, which was unexpected. In response, we're seeking donations. Depending on the situation, we may explore different monetization options for our Community and Expert Contributors. It's crucial to provide more returns for their expertise and offer more Expert Validated Answers or AI Validated Answers. Learn more about our hosting issue here.

When something looks wrong in the code (“smell”), refactor it, but make sure you don break anything. How?

0
Posted

When something looks wrong in the code (“smell”), refactor it, but make sure you don break anything. How?

0

• Check that the code you are refactoring is covered by some unit tests. • Refactor. (Tip: a modern IDE (Eclipse and IDEA for instance) has some functions that may help.) • Check that the code still compiles (including dependent modules) and all the unit tests are still passing, and commit.

Related Questions

What is your question?

*Sadly, we had to bring back ads too. Hopefully more targeted.