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.
Okay, that's a personal opinion there. I wrote the original kata 9 years ago and when you look at the JavaScript reference, you'll notice that it doesn't even have a random test. And it still got approved back then (probably by jhoffner himself) and nobody complained :)
And btw. I'm not in the situation where I'm looking for an excuse. I don't need excuses. I'm simply convinced, that we should be more relaxed in regards to the requirements of katas and translations. If someone really wants to cheat to get into top highscores, there are ways to get there. And running more random tests won't prevent that. If someone is just here to have fun and learn, then in many katas we wouldn't need any random tests at all.
Btw. as you might have seen, I already published improvements to the tests, because I liked the idea about mixing successful and error cases.
source: https://www.digitalocean.com/community/tutorials/handling-errors-in-go
There might be a few exceptions to this rule, but usually when the error indicates that you can't rely on the other values, you make them empty. In this case there is no way to return a useful amount of reindeers, therefore it's good practice to return 0.
Mixing valid and invalid tests sounds like a good idea 👍 I'm not sure about the required amount of tests though. Yes, you could run hundreds of tests, but hardcoding those return values and/or having enough luck to pass the random tests requires more effort already than simply solving the kata.
Yes, not sure exactly when. But somewhen this week would be doable
The task was to wrap a function, so that its return values are cached and the wrapped function only needs to be executed once for the same parameters. In my opinion, this was also reflected in the kata description.
Caching function results is a good practice - independent of the used language - when dealing with slow computations (complex algorithms, external network requests, slow filesystem usage, etc.);
So, if we wanted to have a "fair" bigint kata, we would prefer to create a duplicate of this and assign a lower rank? Because in my opinion this kata is still a good excercise.
You mean, exactly like it's done with JavaScript?
But you still solved it using JavaScript, so it can't be that bad? :)
I've decided for myself to keep both for mentioned reason
Yes, it is possible: you can expand the test cases at the top. Yes, they might all be marked as successful, even when they actually failed :/
But there you see first the complete result of your query. And below that you can compare your result with the expected one, including a diff.
This is not very intuitive, but without building an own SQL helper, it seems impossible to change that behavior.
Thanks for this suggestion, I added the detail to the task as well
I guess, it depends on the way you solve the problem. Usually having to deal with two fixed things is easier to implement than dealing with any amount of things.
But when I look at your submissions, I can see what you're referring to. I'm undecided, I personally would think, it still makes sense to have both katas 🤔
You're saying:
And the description says:
I don't see an issue with the tests
This comment is hidden because it contains spoiler information about the solution
Did you modify the input? Because the pasted one is not the original test data.
If it would start at 12:15, then a 90-minute meeting would take until 13:45, which does not fit into A's schedule.
Loading more items...