2 ms·
The code I'm most likely to waste an inordinate time on is any kind of non-determinism in the hands of an inexperienced programmer. Threads are the worst (poss
by rstuart4133 7y ago
The code I'm most likely to waste an inordinate time on is any kind of non-determinism in the hands of an inexperienced programmer. Threads are the worst (possibly because languages like Java make them so easily available), but interrupts and multiple parallel even javascript promises returning in an unexpected order 1 time in 1000 can all create heisenbugs that take forever to find.
- partyboat1586 7y agoInexperienced devs should pair program async and threaded code before they can do it on their own. They drive with the experienced dev over their shoulder to point out the footguns. Or at least have an interactive code review. Unfortunately lots of teams are under too much pressure to deliver so pair programming doesn't get done as much as it should. It's how I learnt to write safe threaded code and I can still hear the voice of the senior dev in the back of my mind when I write it now.