3 ms·
In the case of date libraries, I think if I ported the tests from a few well-known libraries to my own, I'd have reasonable confidence in my own. Having said t
by flir 1y ago
In the case of date libraries, I think if I ported the tests from a few well-known libraries to my own, I'd have reasonable confidence in my own.
Having said that, I don't think date libraries are hard, I think they're messy. Mostly because humans keep introducing convenience fudges - adding a second here, taking eleven days off there, that kind of thing.
- benlivengood 1y agoI would not be surprised if the state of unit tests on good date parsing libraries are not sufficient to design a new one from scratch. See the number of unit tests in the Linux kernel, for example.
- flir 1y agoYou might be right, I haven't checked. It just seems on the face of it such an easy thing to test. Scalars go in, scalars come out. (This could just be me doing the Dunning-Kruger thing). You could run a fuzzer against two libraries at the same time to find discrepancies....... hmm. That might actually be a good exercise.
- deleted 1y ago[deleted]
- shakna 1y agoMost well-known date library systems have failed in places. Quite a few, still do. So whilst you might get some known regression to test against, nothing can give you a foolproof guide. You can have reasonable confidence that here there be dragons, but not so much that your assumptions about something will hold.
- tbrownaw 1y ago> Having said that, I don't think date libraries are hard, I think they're messy. Messy is just a particular kind of tedious which is the most common form of hard. It's not like typical things that need doing tend to include solving lots of unsolved problems.