Summary Of The Source
- The process of TDD: There are three main steps to the TDD process, including the “red phase”, where a test is written but expected to fail. The green phase where code is written, enough to make the test pass. Finally the refactoring phase that aims to improve the code in functionality and in design metrics.
- Benefits of TDD for software teams: TDD is an implementation of agile development, since there is constant feedback on the tests and the code being written for them. This makes it so that the teams are regularly communicating and on the same page for fulfilling the requirements. Other benefits as well such as lower long-term costs, documentation, etc.
- Best practices for TDD: Organize correctly, making sure that naming conventions specify which function is being tested. Create tests that are simple and target only one aspect to assess, this makes it easier to pinpoint failure in the code.
Why I Chose This Resource
I chose this blog post in particular because it is very easy to read for someone who is new to this process, providing all the necessary information needed to really understand what it is and its benefits without too much technical jargon.
Personal Reflection
I have learned in the past about the waterfall development process vs the agile process, and that agile was pretty much just better, both in terms of time and resources spent. This blog made me realize that TDD falls under the agile framework and that makes the development more responsive to change along the way. It personally seemed silly to me at first that the test would be written first, testing seemingly nothing and only being there to cause confusion, but now I understand that it acts as more of a set of restrictions that keep the code produced working correctly, kind of like a mold that the code has to fit to work. This approach actually seems very intuitive because of the constant feedback and the way the functionality is built around something that is tested to work. To me, there don’t really seem to be any glaring downsides to this form of development unless the team decides against it and has a more comfortable development process, which for them would work better. It’s a simple strategy but it seems very clean in its workflow and deployment.
Future Application
After learning more about this process, I would like to work in an environment where this is practiced. It seems very intuitive and efficient and utilizing it would help me get a better personal feel for it. Developing around tests probably seems confining, but I think it does produce more correctly working code than the other way around.
Citation
CircleCI. (2020, August 11). What is test-driven development? Retrieved from https://circleci.com/blog/test-driven-development-tdd/
From the blog CS@Worcester – The Science of Computation by Adam Jacher and used with permission of the author. All other rights reserved by the author.