I have a lot of logic programming experience due to a well spent youth, and find it interesting to see how non-determinism is interpreted today.
- For some reason people think that non-determinism is the new bogeyman that will ruin their perfect code. Spoiler alert -- if your code does any input or output, it is nondeterministic because the entire world outside your program is constantly changing.
- Becuase people assume their code is deterministic -- but it does input and output -- as a system of code + real world -- its very hard to know if any of it is reliable in any way apart from..... testing!
- People feel better about testing for the real world type of non-determinism, despite the fact that they wrote a program that expects a static world -- the mismatch of design vs reality is written off as just the way things work.
- Give someone a function that is non-deterministic and tells you that -- people freak out. Give people an API call that behind the scenes is non-deterministic in unknowable ways and they will just test it a few times and write off the chance of it returning something quite different the next day or when the toner runs out on level 4.
- Ask people to handle a new problem with their deterministic code and ... well watch them copy the code into a new project, rename all their variables and probably introduce some new bugs to anotherwise well thought out manner of thinking.
- Ask the to handle a new problem every minute.... they will say it cant be done.
But of course if you ask someone if they have deterministic thinking in their human brain leading to them being unable to have original thoughts, you'll hear a different story.
I have a lot of logic programming experience due to a well spent youth, and find it interesting to see how non-determinism is interpreted today.
- For some reason people think that non-determinism is the new bogeyman that will ruin their perfect code. Spoiler alert -- if your code does any input or output, it is nondeterministic because the entire world outside your program is constantly changing.
- Becuase people assume their code is deterministic -- but it does input and output -- as a system of code + real world -- its very hard to know if any of it is reliable in any way apart from..... testing!
- People feel better about testing for the real world type of non-determinism, despite the fact that they wrote a program that expects a static world -- the mismatch of design vs reality is written off as just the way things work.
- Give someone a function that is non-deterministic and tells you that -- people freak out. Give people an API call that behind the scenes is non-deterministic in unknowable ways and they will just test it a few times and write off the chance of it returning something quite different the next day or when the toner runs out on level 4.
- Ask people to handle a new problem with their deterministic code and ... well watch them copy the code into a new project, rename all their variables and probably introduce some new bugs to anotherwise well thought out manner of thinking.
- Ask the to handle a new problem every minute.... they will say it cant be done.
But of course if you ask someone if they have deterministic thinking in their human brain leading to them being unable to have original thoughts, you'll hear a different story.