Home

Refactoring

Why put single lines of code into a separate function?

When I wrote previously about refactoring I introduced the clean coding concepts of creating a table of contents, removing duplicated instructions, and never remembering more than is required. There often isn’t much disagreement from developers over removing duplicated instructions. Never remembering more than is required sometimes conflicts with style guides that ask for all variable …