I think I perform poorly in these sorts of interview, because in the wild I never solve programming problems by writing things on a whiteboard or on paper (unless it's a geometry problem), and I also frequently use external references like books or the internet which are never available in the interview setting. Another problem is that I almost never debug code exclusively by staring at it on paper.