Just out of curiosity: were these junior devs? Were they maybe more proficient in other language/IDE? Couldn't better mentoring/on-job training help - rather than just to "weed them out"?
I might be naive but (and I have also been on leading positions) I still believe that if it seems that somebody "cannot code" it (most of the time) just means that somebody a bit more senior just have to invest a bit of time to coach them...