5 ms·
This is why I like using a randomized framework such as QuickCheck (or its derivatives in non-Haskell languages, such as Java) along with typical unit testing.
by gamegoblin 12y ago
This is why I like using a randomized framework such as QuickCheck (or its derivatives in non-Haskell languages, such as Java) along with typical unit testing. It's often easier to write than tedious unit tests, and it can catch a lot of funny corner cases you don't even think to test.
Of course, this still isn't a guarantee. But it does make me feel better about my code.
- sargun 12y agoI love QuickCheck. It might be a little hard to do for Tetris.
- gamegoblin 12y agoDefinitely true, but with enough abstraction to small, composable, pure functions, you can get pretty far.