4 ms·
The reason I bristle about blog posts like this is that there are two wholly disparate types of multi-threaded programming: First, there's the type that's hard
by hamburglar 11y ago
The reason I bristle about blog posts like this is that there are two wholly disparate types of multi-threaded programming:
First, there's the type that's hard and should probably be avoided except by supergeniuses. This involves big hairy lock graphs where locks are held across complex operations that may involve other locks, and swirling dependencies of doom. This shit is nasty, and I completely agree that you must be "this tall" to be trusted with it.
The other kind of multi-threaded programming is the simple kind, where you need to have a threadsafe interface to a module, the locking is dead simple if you know what you're doing, and your lock graph has about three states, all of which clear in constant time and have no dependencies. In this case, there is no excuse for not having this basic competency, and the attitude that we should all just throw up our hands and never hope to write multi-threaded code again is massively counterproductive. This shit is not brain-bendingly hard, it just takes a small amount of practice and discipline.
Let's stop pretending all multi-threaded programming is wizardry.
- bholley 11y agoI think you're both misinterpreting the title. The sign is near the ceiling. It's not a question of some people being taller than others. Nobody is that tall - not even dbaron (pictured in the photo), who is one of Mozilla's three Distinguished Engineers. Carefully balancing swirling dependencies of doom doesn't make you a great programmer, at least not in the world of large-scale systems. Choosing the right design to avoid or eliminate those swirling dependencies is much more important.
- hamburglar 11y agoThat's fine, and I even agree -- perhaps nobody should venture into the swirling dependencies of doom territory with multi-threaded programming. However, my point is that this type of argument makes it seem as though nobody should attempt the more mundane, turn-the-crank, not-very-hard multi-threaded programming either, which is a bad attitude to perpetuate.
- deleted 11y ago[deleted]