Edge Case Poisoning (2020)
11–20 of 49 posts
Re: Edge Case Poisoning (2020)
#12My point is, consider the problem space, domain, users when thinking about this stuff. Type systems don’t exist in isolation.
Re: Edge Case Poisoning (2020)
#13Re: Edge Case Poisoning (2020)
#14Recipes are programs, so why are we expressing them as types? The recipe will be valid as long as the individual instructions are.
The downside of this approach is that for subtrees of shared behavior you can go the multi-level inheritance route (risky if you're not sure the leaves will hold their parent's contract) accept the extra boilerplate for similar behavior.
It's interesting to me how this happens quite often and polymorphism is still our go-to solution.
Re: Edge Case Poisoning (2020)
#15Recipes are programs, so why are we expressing them as types? The recipe will be valid as long as the individual instructions are.
This is what you'd do in a classic OOP approach. Allows for different behavior across variants by pulling out the shared interface. (I think this is what the author mentions when they speak of "different level of abstraction"?) The downside of this approach is that for subtrees of shared behavior you can go the multi-level inheritance route (risky if you're not sure the leaves will hold their parent's contract) accep…
Re: Edge Case Poisoning (2020)
#16When doing this for scientific protocols I found that you basically have to give up any hope of specializing types of things. The domain ontology for documenting processes, be they making cupcakes or electron micrographs, has to be matched to the domain in question. Some might say that for processes this means everything must be extremely abstract in order to avoid edge cases like those encountered by the author. How…
Take betting as an example I work on. The basic idea is that if a bet wins you get paid your stake multiplied by the odds of the bet. If I open the codebase it should be trivial to find where that multiplication happens right? It's such a fundamental part of the code. But actually the edge cases (starting price bets, each-way betting, handicap betting with split line handicaps, multiple bets, dividend bets) mean it's very difficult to point to exactly where that happens. If I had to guess 90% of the code isn't needed at all in the majority of bets which are singles or straight accumulators.
Re: Edge Case Poisoning (2020)
#17Recipes are programs, so why are we expressing them as types? The recipe will be valid as long as the individual instructions are.
Re: Edge Case Poisoning (2020)
#18This is why I laugh at talk of "bug free" software. The best you can do is zero reported bugs. Temporarily.
Re: Edge Case Poisoning (2020)
#19Recipes are programs, so why are we expressing them as types? The recipe will be valid as long as the individual instructions are.
So here's a concrete example: the config file / structure for a virtual machine. Your basic VM has a # of cpus, an amount of memory, a virtual disk, and a virtual network card. Oh, but this VM is actually a "service VM" that is providing an emulated device for another VM. And this VM is actually a fast, ephemeral clone of another VM: it has copy-on-write memory and isn't allowed to write to the disk. And this VM is a live-snapshoting clone of a remote VM: it doesn't execute, but just receives memory and disk updates from the remote VM, until the heartbeat is lost, and then continues. Oh, and this VM's disk is actually provided over the network by a SAN. Oh, and...
The result being that if, like 95% of people, you just want to make a plain VM, you have to wade through a massive list of who-knows-what options to make it work. Balancing making it simple for those 95%, while functional for the other 5%, is a challenge.
Re: Edge Case Poisoning (2020)
#20This is why I laugh at talk of "bug free" software. The best you can do is zero reported bugs. Temporarily.
I don't disagree but a philosophy that I find practical says that a bug that exists in software and is never encountered in actual use counts as a non-bug. Of course it would be nicer if the bug-in-software didn't exist, but what really counts are actual use cases.