One crucial factor in Stockfish becoming a leading chess engine is its test framework.
Summary: https://en.wikipedia.org/wiki/Stockfish_(chess)#Fishtest
Initial announcement: https://www.talkchess.com/forum3/viewtopic.php?start=0&t=47885&topic_view=flat&sid=b5662f579ad4c7bea91668bb9d9723a4
Lots of engines have clever programmers, but a strong test technique gave it an extra edge!
Related Posts
I love how the CommonMark Spec has a test suite that's just a JSON array. It's really easy to test a library for compliance, and I've seen developers nerd-sniped into full compliance.
https://spec.commonmark.org/0.31.2/spec.json
I'm working on arity errors in Garden, my toy programming language.
Rather than just saying "expected 3, got 4 arguments", I'm trying to report where the extra argument is, or what extra argument was expected.
`init` feels like an unhelpful name in OO. It doesn't give you an initial value, it initialises the instance that has already been created. Developers are often surprised that init doesn't return the instance, because they have a strong association with `new Foo()`.
Perhaps `finish` would have been a less confusing name?