2 ms·
> For a CS person, this physical elegance blew my mind. In many cases you can write your code in an analogous way. Sadly, most procedural code I see plods its
by gumby 4y ago
> For a CS person, this physical elegance blew my mind.
In many cases you can write your code in an analogous way. Sadly, most procedural code I see plods its way through transitions in a manner that allows errors, races etc (the old thermos joke comes to mind). Keep these positive hardware approaches in mind when designing your algorithms.
- wayvey 4y agoNot sure if I know that joke. How does it go?
- gumby 4y agoA physicist is showing their friend the computer scientist a thermos flask. "You can put a cold drink in it and no matter how hot it is outside the drink stays cold". The friend is suitably impressed. "But that's not all: you can put a hot drink in it and no matter how cold it is outside the drink stays hot!" Now the friend is puzzled. "But how does it know?" I long ago became depressed by the amount of code I've read that is written this way. Nowadays I just expect it.