That was what I did. I ran it once, and it couldn't find the interface so I immediately just checked the tests to see what classloader was being used. I don't get to use these features very often, thanks. :-)
Advice that seasoned developers have given me: Habitually write code that clearly expresses intent, rather than optimizing performance. The compiler and JVM often perform optimizations for you, and profiling tools can be used to expose bottlenecks. But more importantly, premature optimization leads to obscurification of intent, sometimes without any actual performance benefit.
The Kata is intended as a puzzle, and has a very distinct solution. It makes use of a very cool feature in Java, and it's a matter of knowing, or having to figure it out.
https://stackoverflow.com/questions/20393373/performance-wise-how-fast-are-bitwise-operators-vs-normal-modulus
That was what I did. I ran it once, and it couldn't find the interface so I immediately just checked the tests to see what classloader was being used. I don't get to use these features very often, thanks. :-)
Advice that seasoned developers have given me: Habitually write code that clearly expresses intent, rather than optimizing performance. The compiler and JVM often perform optimizations for you, and profiling tools can be used to expose bottlenecks. But more importantly, premature optimization leads to obscurification of intent, sometimes without any actual performance benefit.
This comment is hidden because it contains spoiler information about the solution
The Kata is intended as a puzzle, and has a very distinct solution. It makes use of a very cool feature in Java, and it's a matter of knowing, or having to figure it out.
The math skills required to solve this are trivial, and possibly one of the first things taught in a student's first java class.
This should certainly be an 8kyu
Instructions were very clear, but unit tests to show how this object would be used would help considerably when writing this.
This comment is hidden because it contains spoiler information about the solution
This comment is hidden because it contains spoiler information about the solution
This comment is hidden because it contains spoiler information about the solution