Whats not shown is the 10 other functions calling createPizza and bakePizza that can be tested by mocking that routine centrally.
In the basic case, the linear version is better until the code is duplicated. Adding constants and function aliases before the code has duplicated is generally a bad idea.
In the basic case, the linear version is better until the code is duplicated. Adding constants and function aliases before the code has duplicated is generally a bad idea.