Unit Testing With Test Driven Development

Most of us have tried to get better about unit testing, with varying degrees of success. Some folks even manage to succeed. Whether it is due to inexperience, frameworks designed without consideration of testing, or simple management resistance to regular testing, the challenges to getting it right are substantial. However, the rewards are great, which is why we’ve brought John Callaway and Clayton Hunt on the show.

“A comprehensive unit test suite beats outdated documents any day.”

We met John at DevSpace in Huntsville, AL last year. He stopped by our booth and chatted with us which lead to slack and email conversations and ultimately this episode. A Microsoft MVP, John has been a professional developer since 1999. He has focused primarily on web technologies and has experience with everything from PHP to C# to ReactJS to SignalR. Clean code and professionalism are particularly important to him, as well as mentoring and teaching others what he has learned along the way.

Clayton has been programming professionally since 2005 doing mostly web development with an emphasis on JavaScript and C#. He has a focus Software Craftsmanship and is a signatory of both the Agile Manifesto and the Software Craftsmanship manifesto. He believes that through short iterations and the careful gathering of requirements that we can deliver the highest quality and the most value in the shortest time. He enjoys learning and encouraging other to continuously improve themselves.

They are 2/3 of the trio that hosts The 6 Figure Developer Podcast and run the St. Pete .NET Meetup. John and Clayton have recently released a book ‘Practical Test-Driven Development using C# 7: Unleash the power of TDD by implementing real world examples under .NET environment and JavaScript’.

The book is for software developers with a basic knowledge of Test Driven Development (TDD) who want a thorough understanding of how TDD can benefit them and the applications they produce. The examples in this book are in C#, and you will need a basic understanding of C# to work through these examples.

Unit testing is a valuable skill to have, no matter where your code runs or what it does. It reduces the error rate of your software and can often help force a better structure into your code. In addition, this practice can make it easier to make large changes to your software with less risk, as well as making it easier for new developers to understand the structure of your software.

IoTease: Project

The Hammer of Healing and Destruction

 

The idea is that the war hammer is a LARP weapon that can both heal and hurt. Using the Adafruit LSM303 sensor, the weapon will track your moments to determine what mode you have selected (heal or harm) or how much damage your hit dealt. It will track what your movement to determine the amount of damage and calculate that for you. To heal you have to place it in a healing mode by holding it in a certain position for a certain amount of time. While this post is just a proof of concept it’s still a cool idea to bring a bit of technology and IoT into the middle ages.

Tricks of the Trade

Our use of the word bug trivializes the kinds of problems we can create in our software. We should start using the term defect because of the problems that we can cause by having them in our software.

Tagged with: , , , , , , , ,
One comment on “Unit Testing With Test Driven Development
  1. Jonathan says:

    Hey guys, been listening to your podcasts on the way to and from work since you guys were namedropped in a podcast thread on HackerNews a few weeks ago. I was thinking about making a suggestion for a QA/Unit testing episode (I’m in QA Automation, which my company defines as a hybrid QA/Dev role), but someone else beat me to it, and here we are! This was a great episode overall, it was super informative and gave me a lot more to talk about in regards to testing outside of “they help you try to keep your code bug free!”

    I’ve got so many questions about development, but here’s just one: as someone wanting to move towards a completely development role, are there any resources you guys recommend for learning how to develop more complex applications outside of places like Pluralsight, where I’m a subscriber? I sometimes chat with other C#/.NET devs in another online chatroom and I’ll often be left in the dust when they talk about async/await, lazy evaluation, dependency injection, etc. It even happens when I listen to you guys sometimes (ADO.NET, Entity Framework, the Code Smells episode, etc). I know my basics, a little bit about lambdas, a bit about SQL and databases, and some C# things like LINQ, but I feel stuck otherwise. Hope you guys can shine some light on my troubles.

    Looking forward to the next episode!
    – Jon

Enjoy the show? Let us know in the comments.