Are Humans Bad at Concurrency?
I hear it all the time. Humans are bad at parallelism and concurrency. “It’s just hard,” they say.
I think those people have it exactly backwards. Humans are immensely good at concurrent thought, and really bad at sequential thought.
Consider driving. Your brain is processing millions of things in an out-of-order manner, and producing continuous motions in your hands and feet that guide the car so perfectly that few would be surprised to hear of someone who has driven for a lifetime without a major accident. Our brain can learn this task!
Same deal with many concurrent activities, like having a conversation, or playing sports, or listening to music, writing, thinking about the future, or fixing the fridge. In every case, we set our massively parallel architecture on many problems simultaneously, and then integrate a solution in real time without deadlocks or timeouts. Not only can we learn these things, but we can excel at them, once learned.
But we humans have a corresponding weakness for sequential thought. We find it very hard to write a piece of sequential software that lasts more than a week without crashing hard or suffering from a major design flaw. We need to be taught for decades in the most advanced institutions to think sequentially and logically. Only the most elite of us ever manage to produce something that others would actually pay for, and even then we may solve a different problem for people than the one we set out to solve.
Then we try to make people trained in sequential thought solve parallel problems, and they come up with steamy piles of tangled mess, full of deadlocks, races, and side-effects.
Our default state is concurrent thought. We’ve all been trained to think otherwise, by our computers, languages, and education. We’re hard on the poor folks who were carefully trained as sequentialists when they fail to make a parallel problem easy on sequential machines.
By day, I work on a compiler for sequential source-code, but my personal long-term goal is to create a compiler for a language that can form the kernel for a new school of thought separate from the sequentialist mode of thought. As hardware evolves, it will only become more like our own brains, and less like calculators and simple programmable machines.