3 ms·
This reminds me of a program I wrote whose entire input comes from a blockchain. Everything that the program does is in response to some complex sequences of ev
by jongjong 4y ago
This reminds me of a program I wrote whose entire input comes from a blockchain. Everything that the program does is in response to some complex sequences of events which occurred on a blockchain.
This means that my program is deterministic since I can replay any part of the blockchain history and it will produce exactly the same results/output on each run. If a bug happens, I can replay the bug as many times as I like, exactly as it happened until I understood the cause of the issue and fixed the code - I can even go back and re-process the entire blockchain history to make sure that the new code changes didn't break any previously supported functionality.
That makes for a great debugging experience, I'm almost hoping that my project will hit a bug so that I can have fun debugging it. I only had to debug it once in the last 12 months because of a usability/UX issue.
This approach of writing deterministic code seems to produce much more robust code too. It requires a fair amount of work to weed out non-determinism from the code though (I.e. async logic running in parallel is the main challenge).