Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
Step 3: Post Cleanup
This step is about going over your logic. Try to make it flatter (if possible). Break out any local-state wrapper functions - either inside their relevant function scope (not testable - example below), or name & move it on up to higher scope.
This code isn't perfect, and there are definitely places to improve it; nonetheless, I feel this code largely meets my original goals of improved readability, testability, reusability, et al.