Software Engineering With Red Green Refactor Approach
Red, Green, Refactor: Write tests before implementation, refactor after passing. Effective TDD approach by Robert C Martin for writing testable and maintainable code.
Red, Green, Refactor is a TDD approach or framework that the developers use to build the test suite first, write the implementation code, and refactor the code once the test suite passes. According to Computer Scientist Robert C Martin who advocates TDD, we can write effective code only when there is a test case to pass and the only time we have the time to write tests is before writing the implementation code. The feasible way to do so is to use the Red, Green, Refactor approach. What are they? We can compartmentalize writing code into 3 segments as the title suggests. Red - Write a...