Skip to content
Ameen Abozaid
In reviewJNR-003-L06

Safe refactoring with the IDE

  • Lesson 6 of 7
  • 11 min read
  • Junior
On This Lesson 4 topics

The content for this lesson is written and waiting for review. The outline below shows what it covers. It will be published once it is approved.

In this lesson

change structure without changing behavior.

Planned topics

  • Refactoring: change the code's structure, not what it does.
  • Always have tests first, and run them after each step.
  • Use IDE tools: Rename, Extract Method, Extract Variable, Move, Inline.
  • One small step per commit, named after the refactoring.
  • No new features and no bug fixes in the same commit.
Draft outline details

Demonstration

the Extract Method dialog on a block inside CheckoutService.

Check your understanding

What must you have before refactoring?

Show answer

Tests that pass.

Practice

Apply this lesson with the module's lab, exercises and quiz.

Lab and exercises Quiz

Marking a lesson complete is optional and you can undo it any time. Your progress stays in this browser.

Continue to next lesson

Type to search levels, phases, modules and lessons.