Loading collection data...
Collections are a way for you to organize kata so that you can create your own training routines. Every collection you create is public and automatically sharable with other warriors. After you have added a few kata to a collection you and others can train on the kata contained within the collection.
Get started now by creating a new collection.
Thanks for your fast and constructive feedback. I appreciate it in a high manner.
The odd numbers issue should be fixed now.
In terms of enforce stream usage, do you suggest to pass or return a stream directly?
Kind regards. Cheers!
I totally agree on the harcoded aspect. That's what's drives the TDD approach anyway. Finding a test that forces you to change the hardcoded solution.
I appreciate your feedback and the time you spent to reply on my thoughts. Cheers!
The guidelines of codewars recommend random tests. I had some random ones in my kata. So I thought that monadius pointing with his statement towards bad practice.
In a real life setup the core test suite should consist of deterministic test cases. To test edge cases it is also widely recommended to use deterministic and meaningful
values. Randomness is more common in black box testing. Other test strategies like using property basesd testing or even permutation testing could help to reveal bugs or gaps of the test suite. Failing tests of this kind should envolve into deterministic tests anyway and be part of the core test suite later. In some Katas I could already watch people struggling with given random tests cause of missing meaningfulness. I had this experience myself already. The effect might be that people pushing the attempt button as long as the test passes. Shure, in some cases TDD might force you to write a test with some random value (e.q. to extract a member). But even then a well named and deterministic test is the better choice. Please don't get me we wrong. This is what I have learned and experienced so far. And I am here to continuous improve and learn. I appreciate your feedback. Kind regards. Cheers!
I appreciate your constructive feedback. I will be grateful for any help, cause it's my first own kata.
Cheers!
Nice one. Clean!
You got a point here. The aspect we often not intuitively think about, but we should care with high standards.
Often voted best practices are not very explanatory at all. I have a lot to learn too. At the end of the day that's the reason why we are here. Share knowledge. I appreciate your commitment.
Overall your solution is nice and solid. The comments are obsolete and clutter your code. Use comments only in places where code cannot explain itself. Streams are a fancy way to make things more readable (in most cases) and shorten code. Kind regards Simon