Test Driven Development.
http://blog.cleancoder.com/uncle-bob/2016/11/10/TDD-Doesnt-work.html
A humorous poke at why test driven development probably (but specificially thinking about what you're writing) is not such a bad idea. ;-)