Finding and Fixing Your Own Problems Before Release
I’m sure that every line of code that you have ever written always works correctly the first time you hit compile. I’m sure that you’ve never had a bug report from the field, and every time you made a change it was really a fix.
For the rest of us, the disciplines of automated unit testing, documentation, and a decent code review help prevent us from having to fix bugs in the production environment where it’s mission critical– or it should.
Test-Driven Design is the philosophy that if you write tests about what a module should do, and write code so that your automated tests prove that it does do, you will prevent yourself from breaking things in the future and think about all the edge cases before turning it over to QA.
This is somewhat linked to Formal Methods of computing, where you use logic to make sure that the output of a given function is what is expected given the inputs.
Documentation helps you to know exactly what was expected as well as the design decisions you took to get there. It’s all-encompassing– which is why it is so large in the image to the right. You can almost never have enough.
But no one signs up for all of that. We all want to write the code and get done and move on to the next challenge.
The Bible covers this tendency in the book of Matthew where it discussed judging. It talks about how we are all too eager to fix someone else’s minor issue when there’s a huge glaring issue of our own we should be fixing. In essence, we’re more than ready to find someone else’s bugs and claim that we can fix their problem when we have problems of our own we should be solving first– and putting in disciplines to keep us from those errors in the future.
Think about how these disciplines apply to our own lives:
- Automated Unit Testing – Memorizing Scripture that applies to our daily lives so that it’s available to catch us
ifwhen we encounter temptation. - Documentation – Reading and Journaling God’s Word so that it’s something that’s foundational to us.
- Bug Fixing – When we fall, confessing our sins, repenting and continuing in our pursuit of Christ
- Code Review- Accountability partners and mentors that can help us grow in Christ.
The disciplines are the same, and they are important and natural. So whether it’s coding or in your Christian life, make sure that you get the green check marks and grow in Him.