Why do I resist the test-first approach?
👋 Hey colleagues,
👐 Let me share with you how I finally achieved start and write every single project using a test-first approach, and how you can too.
I feel that the number 1 belief which occurs about the idea of adopting a test-first approach is that it takes up too much time and slows down the development process. Many developers have felt the same way in the past and myself as well.
However, what I found is that incorporating Positive and Emotional intelligence into the process can greatly contribute to its success.
👩 💻 During the summer of 2019, while I was practicing the test-first approach through strong style pair programming with my dear colleague and friend Llewelyn Falco, I noticed a couple of things that were strengthening my resistance towards the test-first approach.
1. Frustration 😤
2. Constant change 😳
3. Stress 🤯
The Empathy Power
🗣️ After a while, I decided to start communicating these things with my colleague. Step by step and we introduced emotions in our observation retrospective mind-up.©️
How can I use PQ to optimize
productivity and wellbeing at the same time?
❇️ Over time I continued by myself to dig deeper and introduced other approaches to the development process working and testing it both alone and with teams. Let’s explore how Positive Intelligence can make a difference:
I understand that writing tests first can be challenging and time-consuming initially. Others have felt frustrated too.
It’s natural to encounter moments of frustration when tests fail or when the process seems slower due to the learning curve.
Working in a team, we found that by managing frustration effectively, we were able to transform it into motivation.
We approached challenges as learning opportunities, persisted in finding solutions, and experienced increased satisfaction when tests and code passed successfully.
🤼 Collaboration and feedback
Some developers have initially hesitated to collaborate and receive feedback on their tests and code.
Shame is so strong due to their personal Judge telling them how it’s embarrassing to not know or to ask for help. However, they found that Positive and Emotional intelligence played a crucial role in fostering effective collaboration.
By actively listening, showing empathy, and remaining open to diverse perspectives, they created an environment of trust and respect.
This led to constructive discussions, improved teamwork, many knowledge transfers, and ultimately, better quality tests and code.
Test-driven development often requires adapting plans and code as the project progresses.
Initially, this can be unsettling, and some developers have felt resistant to change. However, what we found is that Positive Intelligence allowed us to embrace change.
By nurturing a growth mindset, managing emotions, and staying open to new ideas, we were able to adapt to new approaches, refactor code when necessary, and improve the overall effectiveness of tests.
🧘 Stress management
Projects can be demanding, and stress can arise when working under tight deadlines or dealing with complex challenges.
Developers have felt the pressure too. I felt the most stressed when needed to add certain features but the code base had very low or no test coverage at all. I had no clue where to start and there was a huge risk if I added something new that something old will stop working.
However, what we found is that Positive Intelligence helped manage stress more effectively.
It equips us with strategies to manage stress effectively.
By recognizing our saboteurs and stress triggers, and implementing stress-relief techniques, such as PQ reps in terms of deep breathing or taking short breaks, we were able to maintain a clear focus, make both rational and intuitive decisions, and deliver high-quality tests and code.
❇️ Overall, investing time in writing tests upfront can save time and improve the overall quality of the project.
Let me share some statistics with you
Studies have shown that writing tests first can lead to faster development in the long run. Although it may require some initial time investment, writing tests can catch bugs early, preventing them from becoming larger issues later on. This reduces the time spent on debugging and makes the development process more efficient.
🐞 Improved code quality:
Projects that follow a test-driven development approach tend to have higher code quality. Writing tests help identify potential issues early on, forcing developers to think critically about their code and design. As a result, the codebase becomes more maintainable and less prone to bugs, reducing technical debt, and leading to fewer issues during development and in production.
💁 Better collaboration:
Writing tests encourages collaboration between team members. By defining test cases upfront, developers can establish a shared understanding of the project’s requirements and expected behavior. This leads to clearer communication, fewer misunderstandings, an increased level of empathy, and smoother teamwork with fewer code reviews.
🥷 Increased confidence:
Writing tests provide a safety net when adding new features, making changes, or refactoring code. With a comprehensive test suite in place, developers can make modifications without fear of breaking existing functionality. This instills confidence in the team and allows for more experimentation and innovation.
Curious how to build both quality products and loyal and motivated teams?
Don’t underestimate the power of Positive Intelligence in STEM. It can make all the difference in building both quality products and loyal and motivated teams.