TDD Practice - Divide without Divide
One question I use to coach test driven development with team members who are new to the concept is:
Write a function to divide without using the
/
operator.
It’s a great exercise, to break habits because /
is a fundamental
function that it’s implemented at the CPU level - one will have to
work to avoid using it.
Given this criteria and the following test:
What would you write?
Think about this and implement it yourself before moving forward.