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.
it's probably also a duplicate of another kata that teaches us about the use of streams in Java
Passing in streams and expecting streams back would be better. Oh wait, the result is an int, not a stream.
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!
Hi, some issues:
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!
I agree, fixed tests should be extensive enough to not allow incomplete solutions to pass. The need for random tests is to not allow hardcoded solutions to pass.
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!
This kata was retired, but keep in mind that. Closing the issue.
I appreciate your constructive feedback. I will be grateful for any help, cause it's my first own kata.
Cheers!
yeah sorry lol i was just experimenting with javadoc comments
edit: also the description was kinda a joke it referenced "this" cuz i removed the this keywords it wasnt about anything else
Btw, I have made the variable names and method names clear to avoid adding comments.
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.
sort may not be better all the time. Go for readability and maintainability.
Loading more items...