QDD – Question Driven Development

People learn in different ways. Some individuals prefer having visually stunning materials, others love listening to audio, and the rest of us enjoy learning by doing the most. Yes, you are right; I learn best by doing. Throughout the past couple of weeks, I have had to learn a lot, and today I would like to share with you my secret jutsu that I have employed in this process. Don’t worry, I won’t be suggesting you use illegal substances, but once you learn my mantra, there is a possibility you will become addicted to learning!

In software development, there is a trend or technique with the abbreviation “TDD”. It stands for Test Driven Development. The main point of test driven development is that we create our programs by first writing tests for our code before we actually write the code itself.

TDD is like creating a recipe first and then using it to guide your cooking. To create a recipe, you start by imagining how you want the dish to taste and look. This is similar to writing the tests in TDD, as the tests describe how you want your code to behave. Once you have a clear idea of what you want to achieve, you start writing the recipe. In programming, it’s similar to writing the code that would just pass our tests. Just like how you would taste your dish as you cook it to ensure it is turning out how you imagined, in TDD, you run your tests as you write your code to ensure that it’s behaving as expected. By using test-driven development, you can catch any mistakes early on, before the dish is served (or the code is released).

This approach of constantly writing tests has inspired me to come up with my own methodology for learning. I have named it Question driven development. While during TDD our main goal is to write code that would just pass the given tests, QDD’s main goal is to “do stuff” that would just answer the given questions. And by constantly asking new and more questions, I am forced to look up the answers and gain new knowledge in the process. Let’s take a look at the example of some of the questions I have asked myself when learning Tanium.

I usually ask a lot of these questions, and with each and every one answered, I am learning more and more. You can easily spot that I am starting with pretty general questions and then delving into specific ones. The reason behind this is that if you don’t have a solid understanding of the basics, there is no reason to dive deeper into the topic.

When I am doing the mantra of mine, I am usually following a pretty simple workflow:

  1. Asking and formulating the questions
  2. Looking up the answer (googling, asking collegues or friends, community forums, chatbots etc.)
  3. Implementing and validating the answers
  4. Repeat

Surprisingly, this workflow turned out to be really efficient when it came to troubleshooting or debugging. However, it’s not a perfect solution for every situation.

At the beginning of this article, I mentioned that I love learning by doing. Why I think that QDD is working for me is that I am constantly in a state of “doing”. I am not worried about every aspect of the technology, but I am just focused on making progress on whatever I am currently working on. QDD is also nice because all the problems you are facing while doing it are small and isolated (it can save you a headache by preventing you from being paralyzed by all the information). If you decide to give QDD a shot, let me know!

If you have read so far, you might want to follow me here on Hashnode. Feel free to connect with me over at LinkedIn or Mastodon.