I attended a talk at the Toronto Agile Tour on Deliberate Practice that focused on TDD Games and other programming challenges like Kata. Among the challenges were things like solving a problem without using the ‘if’ keyword, or without using primitives.
Solving simple problems using these challenges makes us better programmers because they force us to come up with multiple, creative solutions to the same problem.
Here’s my solution for how to divide without using the division operator ("/") in Java. The method should take a numerator and a denominator and return the largest integer multiplier. For example 10/3 = 3, which would be called as int result = divide(10, 3)
[Read More]