WEBVTT

1
00:00:00.350 --> 00:00:03.205
Refactor without changing behavior.

2
00:00:03.345 --> 00:00:07.699
Refactoring changes structure while preserving intended behavior.

3
00:00:07.839 --> 00:00:14.674
A migration changes a dependency, interface, or data representation and needs compatibility planning.

4
00:00:15.664 --> 00:00:18.013
See a concrete example.

5
00:00:18.153 --> 00:00:21.243
Choose one duplicated formatting function.

6
00:00:21.383 --> 00:00:29.182
Write examples of its current inputs and outputs, consolidate it, then run the same examples and callers’ tests.

7
00:00:30.172 --> 00:00:33.357
Pause the video and complete the exercise.

8
00:00:39.172 --> 00:00:41.152
Avoid this mistake.

9
00:00:41.292 --> 00:00:44.631
Combining a broad rewrite with a feature change.

10
00:00:44.771 --> 00:00:47.516
Split them into reviewable stages.

11
00:00:48.506 --> 00:00:50.340
Check your result.

12
00:00:50.480 --> 00:00:55.470
Behavioral examples still pass and callers have not changed their contract.

13
00:00:55.610 --> 00:01:02.129
Open the lesson below, try the exercise, and mark it complete only after checking the result.
