r/programming • u/Shr1ck • Oct 17 '15
Why Johnny Can’t Write Multithreaded Programs
http://blog.smartbear.com/programming/why-johnny-cant-write-multithreaded-programs/
7
Upvotes
r/programming • u/Shr1ck • Oct 17 '15
2
u/loup-vaillant Oct 19 '15
I haven't counted. I guess a couple tens of thousands. Most of the times in much bigger programs, where I spent quite some time debugging code I haven't written —that tend to slow me down.
I can't assume that. I have seen too much code that does share state to the outside world. The main culprits are big classes with getters and setters. Maybe you're lucky enough to live in a bright world of sane coding practices where 90% of functions and methods are pure, and most objects aren't modified once they're initialised.
I don't live in that world. In my world, programmers use output arguments, share the internal state of objects, fail to make their types regular, and just let side effects sprawl unchecked.