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.
I don't think your solution handles leap years correctly.
Think about rounding it as a different datatype, or try using ROUND() to round to an integer.
In what ways were the instructions misleading? Have they been fixed now? (I ask because I solved it by following the instructions and the output of the sample test: perhaps I misread the instructions.)
Yes, please add an instruction only to use postgres to the description, or switch off SQLite, as the error is still there.
Sounds good. It should probably be an 8 kyu kata, which are always useful.
Your English looks great! I think the best of the JS solutions copy the array first to avoid mutating the original array.
Nice kata. The JavaScript version of this feels like a 6 or 5 kyu kata.
I got that test to pass now - thanks for your patience - and for a really interesting kata.
This doesn't test for the infamous underflow bug. I don't think a 7 kyu kata should expect that. But perhaps this is an opportunity for a follow-up kata that forces the coder to rewrite or look up a formula that doesn't underflow. http://googleresearch.blogspot.co.uk/2006/06/extra-extra-read-all-about-it-nearly.html
Here is my test of block. My test passes, but yours doesn't. So I misunderstood something in the specification. Another hint might help.
What does this test result mean?
Block did not affect time - Expected: 148, instead got: 200
Does block() add an event to the event queue that will halt execution when that event is popped off the queue?
I think (from the description) that it doesn't go on the queue, but stops simulated execution the moment it is called.
If you can give me a hint without giving away how to design block() that would help.
I have written tests to match all the example code in the instructions, and wrote a curry function that makes them pass.
But, all 16 tests in the kata fail.
I would like a hint that would get me towards passing the first test.
Here are my tests that pass:
This kata seems to encourage beginners to do type tests. While facts shouldn't be hidden from beginners, I wonder if doing this kata so early in my Javascript/Ruby/Python/Coffeescript career might leave me more likely to reach for a type test rather than refactor the underlying data structure. What do you think?
I think you fixed your code already, but for the benefit of others, the output dog.toString() needs to change when the name is changed. Your version of toString() returns a string that never changes.
You return from your function on the first pass through the loop. Try accumulating a value then returning it.
Loading more items...