6 ms·
Interestingly the source code base does not seem to have any tests. I guess it speaks of the strength of Scala's type system or the rigorousness of the develope
by ajnin 4y ago
Interestingly the source code base does not seem to have any tests. I guess it speaks of the strength of Scala's type system or the rigorousness of the developer.
I tried Scala a long time ago but I didn't like it, it felt every student of Martin Odersky's CS course at the EPFL got to design their own language feature, and they often
picked the same one but came up with different implementations.
- shmageggy 4y agoYeah I was kinda surprised how YOLO some of this was. For example > At some point I had to rewrite the Glicko2 rating system from Java to Scala 3 [...] No-one noticed broken ratings, so I suppose it worked. Sheesh. Seems like just the kind of thing for which a couple unit tests would be relatively easy to write and would add a lot of confidence.
- opportune 4y agoAs a few-hours-a-week Lichess user I knew they had to have been yoloing a bit in prod because sometimes they’ll restart servers several times within an hour interval, presumably as they deploy to prod, try to fix them, and redeploy. But I’m honestly shocked it works as well as it does without tests. I mean I’m not a paying customer and I much prefer Lichess to the other chess website so I guess I have little say… Does anybody know if Lichess would accept code contributions to add tests?
- valenterry 4y agoScala certainly doesn't remove the needs for tests. But it reduces it a lot. I would say that it reduces the required number of tests to something between 1% to 10%, depending on the domain. The more "calculations"/"math" the domain contains, the more tests are necessary. But for the "plumbing" which usually makes up for the biggest amount of code, it does wonders. Scala 3 is also quite different compared to the early times. Unfortunately the reputation is still a bit outdated.
- dikei 4y agoThere are some tests, but definitely not a lot for a project of this size https://github.com/lichess-org/lila/search?q=Specification https://github.com/lichess-org/lila/search?q=Specification