Description
Each method should be written in terms of a single level of abstraction.
Break down your code so that each piece operates at one level of detail. For example, one function could focus on the big picture (like making a sandwich), while another handles a specific task (like slicing tomatoes).
"Within a certain method we look to keep all the code at the same level of abstraction to help us read it more easily." Robert C. Martin
Mixing simple commands with complex logic in the same function or class can make your code a jumbled mess that's tough to follow and maintain.
"In order to make sure our functions are doing ‘one thing’, we need to make sure that the statements within the function are all at the same level of abstraction" - Robert C. Martin
