DEV Community

Discussion on: Please refactor your code.

Collapse
 
jaronsummers profile image
Jaron Summers

I usually write a terrible hacky mega-function that contains basically the entire application, validate that it works, write tests, and then refactor it to be reasonable, relying on the tests to do most of the work of verifying that it's still behaving.