Testing development a circle

pause, start with the tests then do your coding

Testing Driven a trap that developers fall into

Today is my second Day of Self Learning Clinic(SLC) at Andela. As the day commenced i had sparse ideas on how the day will start and end with the SLC. I was introduced to Programming logic and later Test Driven Development(TDD). This period of learning gave me a direct approach to the two concepts .

First, programming logic which gave me a detailed approach on how a computer program has be written and how it be divided. Should it be more lines of code that does a simple thing or a snippet that does a great thing? This made it easy to break tasks to small tasks that can be solved. It thought me how to use python functions, a block of code that can be reused, eliminating my repetition. A program should give the same output regardless of the number of the inputs, making memory and processing cycles used a constant.

Second, Test Driven Development a process of implementing programming code by first writing tests, allowing them fail and make them pass them, then build the code by making a few changes to your tests. Struggling about it ? TDD is a circle of iterations to the code until its functionalities are all capture. The process for TDD is depicted by

writing a failing unit test, make the unit test pass , and refactoring it

When writing my first unit test i did not comprehend of what all this was. Just checking ? why ? But after writing a failing test, then made it pass and then refactoring it. This gave me a solid understanding of what Test Driven Development is.By end of day 2 i have not managed to write the tests for the Buckelist App.