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.
Fix
I substituted
numeric
with amoney
datatype as per the suggestion ofhobovsky
. So it is not an issue now.Python fork with description updated to match test specifications
Python tests explicitly ensure that
b >= a + 2
, so it is guaranteed. I'll change the description to specify this.far from resolved. this still exists with javascript
My preference is some biased and ( always ) some unbiased. With biased values, there's always the possibility you miss something in the biasing.
Yes, this depends on people reporting edge cases for their particular solution that come out of any random test. Not everybody will, but people have been known to do that.
My way in Haskell ( includes shrinking; the built-ins now just work ).
I think perhaps we could generate 100 random tests the current way, and 100 your way.
Would random generation be better if we didn't generate fully random numbers and random powers of 2, but random
m,n
s forx = 2^m * (2n + 1)
, maybe with a higher probability ofn = 0
? I think that would distribute generated values more evenly across the rows and columns of the grid.fixed for Haskell. I approximated the odds as used in JS for simplicity, and bumped up the number of tests to 200 to make even more sure every scenario will be tested.
@JohanWiltink Haskell should also generate some random cases with x = pow2 -> (x, x)
fixed for JS & Python
Not fixed tests plural, in different categories ( ie lines in the example ). There's something to be said for more extensive fixed edge case tests.
17
definitely equals17
though. :PETA: wrote this before I saw the previous comment
Loading more items...