A Refactor and Its Observable Behavior

A refactor changes implementation structure while preserving the behavior its supported interface promises.

Source
Anbloq
Language
English
Created
Updated
Chapters
2
Reading time
1 min
In this article2 chapters
  1. Trace a moved helper
  2. Exercise more than a typical call

Trace a moved helper

An export can move formatting into a separate module. Bytes and data order should still match the external format unless the task explicitly changes it. See reference-file tests.

Exercise more than a typical call

Check empty input, decoding failures, and shared side effects if supported. Observable values and effects identify what needs preservation.[1]

References

  1. David L. Parnas, On the Criteria to Be Used in Decomposing Systems into Modules, CMU-CS-71-101 ↩